Change in vdsm[ovirt-3.5]: vdsm-tool: Change upgrade mechanism

ybronhei at redhat.com ybronhei at redhat.com
Mon Jun 30 15:26:53 UTC 2014


Yaniv Bronhaim has submitted this change and it was merged.

Change subject: vdsm-tool: Change upgrade mechanism
......................................................................


vdsm-tool: Change upgrade mechanism

The upgrade decorator is a mechanism within vdsm-tool to allow commands
to only run once. It has flags to override, but being a function
decorator, it did not have any direct access to command line arguments
and did access via sys.argv[2:].

The patch: http://gerrit.ovirt.org/#/c/27481/ adds flags to vdsm-tool and
will break upgrade and its argument parsing. I'm proposing to change the
upgrade from being a decorated function, to a function that operates on
an upgrade object (interface documented in apply_upgrade docstring) and
the command line arguments.

This also allows to have a single argument parser for both
general upgrade flags and specific per-upgrade flags (no current
upgrades define flags but we might want this in future, available via
extendArgParser method, see docs).

Change-Id: I6e1d28570dedfeff9fe60624b1db72d8cadf136a
Signed-off-by: Dima Kuznetsov <dkuznets at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/29420
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M .gitignore
M debian/vdsm.install
M lib/vdsm/tool/unified_persistence.py
M lib/vdsm/tool/upgrade.py
M lib/vdsm/tool/upgrade_300_networks.py
M tests/toolTests.py
M vdsm.spec.in
M vdsm/Makefile.am
D vdsm/upgrade.logger.conf.in
9 files changed, 181 insertions(+), 165 deletions(-)

Approvals:
  Yaniv Bronhaim: Looks good to me, approved
  Dima Kuznetsov: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e1d28570dedfeff9fe60624b1db72d8cadf136a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list