Alon Bar-Lev has posted comments on this change. Change subject: Introducing configurator package in vdsm-tool ......................................................................
Patch Set 18: (4 comments) .................................................... File lib/vdsm/tool/configurator.py Line 175: services_to_configure = [] Line 176: for m in args.modules: Line 177: if m.getName() not in __configurers: Line 178: raise RuntimeError("Module %s does not exists") Line 179: else: no need else Line 180: if not __configurers[m].isconfigured(): Line 181: services_to_configure.append(m.getServiceName()) Line 182: Line 183: for s in services_to_configure: Line 177: if m.getName() not in __configurers: Line 178: raise RuntimeError("Module %s does not exists") Line 179: else: Line 180: if not __configurers[m].isconfigured(): Line 181: services_to_configure.append(m.getServiceName()) it is services_that_should_be_stopped... you configure package... Line 182: Line 183: for s in services_to_configure: Line 184: if service.service_status(s) and not args.force: Line 185: raise RuntimeError("Cannot configure while %s is running" % Line 184: if service.service_status(s) and not args.force: Line 185: raise RuntimeError("Cannot configure while %s is running" % Line 186: s) Line 187: service_to_start = [] Line 188: for s in services_to_configure: why not add this at the previous loop? you already ask for each service status. Line 189: if service.service_status(s): Line 190: service_to_start.append(s) Line 191: service.service_stop(s) Line 192: Line 193: for m in args.modules: Line 194: for ds in m.getDependedServicesList(): Line 195: if service.service_status(ds): Line 196: service_to_start.append(ds) Line 197: service.service_stop(ds) please finish with all service handling before you configure anything. Line 198: m.configure() Line 199: Line 200: for s in reversed(service_to_start): Line 201: service.service_start(s) -- To view, visit http://gerrit.ovirt.org/20100 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16bf5894e7e55a84b4c2a0caacde383ae7c19242 Gerrit-PatchSet: 18 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: Zhou Zheng Sheng <zhshz...@linux.vnet.ibm.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