[node-patches] Change in ovirt-node[master]: migration: Set version during installation
hadong0720 at gmail.com
hadong0720 at gmail.com
Wed Jul 16 08:22:51 UTC 2014
hadong has uploaded a new change for review.
Change subject: migration: Set version during installation
......................................................................
migration: Set version during installation
… to prevent migration rnus when it's a fresh installation.
Change-Id: I78a7ea85074d8fe7d55c1d0c5c553793def7230e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1051728
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1054036
Signed-off-by: hadong <hadong at redhat.com>
---
M scripts/ovirt-auto-install.py
M src/ovirt/node/config/defaults.py
M src/ovirt/node/installer/core/progress_page.py
3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/47/30147/1
diff --git a/scripts/ovirt-auto-install.py b/scripts/ovirt-auto-install.py
index 287b7da..8d9b5c5 100755
--- a/scripts/ovirt-auto-install.py
+++ b/scripts/ovirt-auto-install.py
@@ -35,6 +35,13 @@
import time
+class PrepareInstallation(Transaction.Element):
+ title = "Prepare installation"
+
+ def commit(self):
+ defaults.ConfigVersion().set_to_current()
+
+
class ConfigureNetworking(Transaction.Element):
title = "Configuring network"
@@ -214,6 +221,8 @@
tx = Transaction("Automatic Installation")
+ tx.append(PrepareInstallation())
+
# setup network before storage for iscsi installs
if is_iscsi_install():
tx.append(ConfigureNetworking())
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 4ed9f9a..04a1a6f 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -211,6 +211,11 @@
def update(self, ver):
pass
+ def set_to_current(self):
+ curver = system.node_version()
+ self.logger.debug("Setting config version to: %s" % curver)
+ self.update(curver)
+
class Network(NodeConfigFileSection):
"""Sets network stuff
diff --git a/src/ovirt/node/installer/core/progress_page.py b/src/ovirt/node/installer/core/progress_page.py
index 9958341..ca8f15f 100644
--- a/src/ovirt/node/installer/core/progress_page.py
+++ b/src/ovirt/node/installer/core/progress_page.py
@@ -228,6 +228,9 @@
kbd = defaults.Keyboard()
kbd.update(self.config["keyboard.layout"])
+ vercfg = defaults.ConfigVersion()
+ vercfg.set_to_current()
+
def commit(self):
pass
# Everything done during prepare
--
To view, visit http://gerrit.ovirt.org/30147
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78a7ea85074d8fe7d55c1d0c5c553793def7230e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
More information about the node-patches
mailing list