Change in vdsm[master]: Adding remove\disable verbs to vdsm-tool for admin usages

Alon Bar-Lev alonbl at redhat.com
Sun Mar 2 19:15:59 UTC 2014


Alon Bar-Lev has posted comments on this change.

Change subject: Adding remove\disable verbs to vdsm-tool for admin usages
......................................................................


Patch Set 3:

(7 comments)

http://gerrit.ovirt.org/#/c/21772/3//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2013-11-27 13:23:56 +0200
Line 4: Commit:     Mooli Tayer <mtayer at redhat.com>
Line 5: CommitDate: 2014-03-02 20:10:47 +0200
Line 6: 
Line 7: Adding remove\disable verbs to vdsm-tool for admin usages
I must comment.... \ -> / :)))
Line 8: 
Line 9: The spec will be modified separately to use vdsm-tool instead of hard-coded
Line 10: operations
Line 11: 


http://gerrit.ovirt.org/#/c/21772/3/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:

Line 148:         for path in [
Line 149:             P_VDSM_LCONF,
Line 150:             P_VDSM_QCONF,
Line 151:             P_VDSM_LDCONF,
Line 152:         ]:
tuple and not list will be better.
Line 153:             if os.path.exists(path):
Line 154:                 removeSectionFromFile(path, conf_prefix, conf_suffix)
Line 155:         utils.rmFile(P_SYSTEMCTL_CONF)
Line 156: 


Line 151:             P_VDSM_LDCONF,
Line 152:         ]:
Line 153:             if os.path.exists(path):
Line 154:                 removeSectionFromFile(path, conf_prefix, conf_suffix)
Line 155:         utils.rmFile(P_SYSTEMCTL_CONF)
is this one^ related to libvirt?
Line 156: 
Line 157: 
Line 158: class SanlockModuleConfigure(_ModuleConfigure):
Line 159: 


Line 168:     def getServices(self):
Line 169:         return ['sanlock']
Line 170: 
Line 171:     def removeConf(self):
Line 172:         pass
no need
Line 173: 
Line 174:     def configure(self):
Line 175:         """
Line 176:         Configure sanlock process groups


Line 360:                 c.removeConf()
Line 361:             except:
Line 362:                 failed.append(c.getName)
Line 363:     if failed:
Line 364:         sys.stdout.write(
stderr?
Line 365:             "Could not remove configuration for modules %s\n" % ','.join(failed),
Line 366:         )
Line 367:         raise RuntimeError("Remove configuration failed")
Line 368: 


http://gerrit.ovirt.org/#/c/21772/3/lib/vdsm/tool/passwd.py
File lib/vdsm/tool/passwd.py:

Line 50: def remove_saslpasswd():
Line 51:     """
Line 52:     Remove vdsm password for libvirt connection
Line 53:     """
Line 54:     p = subprocess.Popen(('/usr/sbin/saslpasswd2', '-p', '-a', 'libvirt', '-d', constants.SASL_USERNAME))
should be in P_EXEC_XXXX
Line 55:     output, err = p.communicate()
Line 56:     if p.returncode != 0:


Line 52:     Remove vdsm password for libvirt connection
Line 53:     """
Line 54:     p = subprocess.Popen(('/usr/sbin/saslpasswd2', '-p', '-a', 'libvirt', '-d', constants.SASL_USERNAME))
Line 55:     output, err = p.communicate()
Line 56:     if p.returncode != 0:
please use vdsm utilities for process execution, I guess there are.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7f2c031436a6d202f856c24d9c9420c8bfdf6df
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list