Sandro Bonazzola has posted comments on this change.

Change subject: Avoiding legacy health servlet usage
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.ovirt.org/#/c/26878/3/src/ovirt_hosted_engine_setup/check_liveliness.py
File src/ovirt_hosted_engine_setup/check_liveliness.py:

Line 56:             sock.set_post_connection_check_callback(check_ignore)
Line 57:             sock.connect(fqdn)
Line 58:             sock.shutdown(socket.SHUT_RDWR)
Line 59:             c_c = [c.as_pem() for c in sock.get_peer_cert_chain()]
Line 60:             if c_c[-1]:
> if you need only -1, then get it from the sock.get... directly, no?
Maybe better to store the CA in /etc/ovirt-hosted-engine on setup and use that.
Line 61:                 self.logger.debug(content)
Line 62:                 fd, self.cacert = tempfile.mkstemp(
Line 63:                     prefix='engine-ca',
Line 64:                     suffix='.crt',


Line 86:                 ),
Line 87:                 username='admin@internal',
Line 88:                 password=self.environment[
Line 89:                     ohostedcons.EngineEnv.ADMIN_PASSWORD,
Line 90:                 ],
you'll need to change also __main__ for asking the password.
you don't have it in self.environment when you run is from command line.

also please check that HA daemons can still use this validation, I think that 
for having this working using a password we'll need to store it somewhere.
Line 91:                 # it's simply a ping, we are basically
Line 92:                 # trusting any certs
Line 93:                 ca_file=self.cert,
Line 94:             )


Line 129:             )
Line 130:         )
Line 131:         sys.exit(2)
Line 132: 
Line 133:     with LivelinessChecker() as live_checker:
I think you're missing __enter__ and __exit__ in LivelinessChecker for using it 
as context.
Line 134:         if not live_checker.isEngineUp(config['fqdn']):
Line 135:             print _('Hosted Engine is not up!')
Line 136:             sys.exit(1)
Line 137:     print _('Hosted Engine is up!')


-- 
To view, visit http://gerrit.ovirt.org/26878
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3522ccb82eee4bf7f04ded012d9badc97c55b5a0
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Lev Veyde <lve...@gmail.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to