Jiří Moskovčák has posted comments on this change.

Change subject: storage: iscsi: ensure service directory exists
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/27994/1/ovirt_hosted_engine_ha/lib/storage_backends.py
File ovirt_hosted_engine_ha/lib/storage_backends.py:

Line 144:                     # but if anything else happened, raise it again
Line 145:                     raise
Line 146:             try:
Line 147:                 if not os.path.exists(self._storage_path):
Line 148:                     os.mkdir(self._storage_path)
drop the os.path.exists test - it's racy anyway and just call the os.mkdir and 
just discard the exception if it fails because the directory already exist
Line 149:                 os.symlink(os.path.join("/dev", uuid, lv), 
service_link)
Line 150:             except OSError as e:
Line 151:                 raise Exception(
Line 152:                     "%s -> %s failed: %s" % (


Line 153:                         os.path.join("/dev", uuid, lv),
Line 154:                         service_link,
Line 155:                         str(e)
Line 156:                     )
Line 157:                 )
please use '%s' when printing the value of some variable
Line 158: 
Line 159:     def disconnect(self):
Line 160:         pass
Line 161: 


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

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