Alon Bar-Lev has posted comments on this change. Change subject: Avoiding automatically restart of sanlock service when starting vdsmd ......................................................................
Patch Set 4: (3 comments) .................................................... File lib/vdsm/tool/configurator.py Line 29: Line 30: SANLOCK_PID = "/var/run/sanlock/sanlock.pid" Line 31: Line 32: PROC_STATUS_PATH = "/proc/%s/status" Line 33: PROC_STATUS_GROUPS = "Groups:\t" why not move these to the function that actually uses it? Line 34: PROC_STATUS_GROUPS_LEN = len(PROC_STATUS_GROUPS) Line 35: Line 36: Line 37: def exec_libvirt_configure(action, *args): Line 30: SANLOCK_PID = "/var/run/sanlock/sanlock.pid" Line 31: Line 32: PROC_STATUS_PATH = "/proc/%s/status" Line 33: PROC_STATUS_GROUPS = "Groups:\t" Line 34: PROC_STATUS_GROUPS_LEN = len(PROC_STATUS_GROUPS) this is stupid constant... Line 35: Line 36: Line 37: def exec_libvirt_configure(action, *args): Line 38: """ Line 111: if status_line.startswith(PROC_STATUS_GROUPS): Line 112: groups = [int(x) for x in Line 113: status_line[PROC_STATUS_GROUPS_LEN:].strip().split(" ")] Line 114: break Line 115: else: for/else? Line 116: raise RuntimeError("Unable to find sanlock service groups") Line 117: Line 118: diskimage_gid = grp.getgrnam(DISKIMAGE_GROUP)[2] Line 119: return 0 if diskimage_gid in groups else 1 -- To view, visit http://gerrit.ovirt.org/19890 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48658066f707632719df8d65799d26c7b239dcd5 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches