Change in vdsm[master]: Introducing configurator package in vdsm-tool

danken at redhat.com danken at redhat.com
Tue Oct 22 09:35:29 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Introducing configurator package in vdsm-tool
......................................................................


Patch Set 16:

(4 comments)

....................................................
File init/systemd/systemd-vdsmd.in
Line 25: 
Line 26: [ "$1" != "reconfigure" ] && usage_exit
Line 27: [ -n "$2" -a "$2" != "force" ] && usage_exit
Line 28: 
Line 29: "@BINDIR@/vdsm-tool" configure-all ${2:+--force}
use new vdsm-too verbs.


....................................................
File lib/vdsm/tool/configurator.py
Line 24: 
Line 25: from vdsm import utils
Line 26: import vdsm.tool
Line 27: from vdsm.tool import service
Line 28: from vdsm.constants import P_VDSM_EXEC, DISKIMAGE_GROUP
in my opinion, this is an over-complicated semantics for a "configure" verb.

I think that "configure" should do only editing of configuration files. As an output, it should print which modules need to be restarted.

Then, another verb (say, configure_and_restart) should call "configure" and restart the needed modules.
Line 29: 
Line 30: 
Line 31: class _ModuleConfigure(object):
Line 32:     def __init__(self):


Line 188:         c.configure(force=args.force)
Line 189:     return 0
Line 190: 
Line 191: 
Line 192: @vdsm.tool.expose("isconfigured")
is-configured is a bit more readable.
Line 193: def isconfigured():
Line 194:     """
Line 195:     Determine if module is configured
Line 196:     """


Line 205:     """
Line 206:     Determine if configuration is valid for module
Line 207:     """
Line 208:     args = parse_configure_actions_args('validate_config')
Line 209:     for c in __configurers and (not args.module or c.getName() in args.module):
args.modules
Line 210:         c.validate()
Line 211:     return 0
Line 212: 
Line 213: 


-- 
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: 16
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: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list