Sandro Bonazzola has posted comments on this change.

Change subject: try harder when initializing the sanlock
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

a couple of notes and fails pep8

http://gerrit.ovirt.org/#/c/28047/1/ovirt_hosted_engine_ha/agent/hosted_engine.py
File ovirt_hosted_engine_ha/agent/hosted_engine.py:

Line 461:                            " is acquired (file: %s)",
Line 462:                            constants.LOCKSPACE_NAME, self.host_id, 
lease_file)
Line 463: 
Line 464:         max_attempts = 5
Line 465:         attempt_delay = 2  # how many secs should we wait before next 
attempt
move to global scope and make them constants and uppercase?
Line 466:         for attempt in xrange(max_attempts):
Line 467:             try:
Line 468:                 sanlock.add_lockspace(constants.LOCKSPACE_NAME,
Line 469:                                       self.host_id, lease_file)


Line 462:                            constants.LOCKSPACE_NAME, self.host_id, 
lease_file)
Line 463: 
Line 464:         max_attempts = 5
Line 465:         attempt_delay = 2  # how many secs should we wait before next 
attempt
Line 466:         for attempt in xrange(max_attempts):
please use range: xrange doesn't work with python 3
Line 467:             try:
Line 468:                 sanlock.add_lockspace(constants.LOCKSPACE_NAME,
Line 469:                                       self.host_id, lease_file)
Line 470:             except sanlock.SanlockException as e:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac39bedfa78479f71674c3f5e673ba3814f52279
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@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