[node-patches] Change in ovirt-node[master]: kdump: copy kernel from /boot for iscsi installs
jboggs at redhat.com
jboggs at redhat.com
Thu Oct 17 20:35:37 UTC 2013
Joey Boggs has uploaded a new change for review.
Change subject: kdump: copy kernel from /boot for iscsi installs
......................................................................
kdump: copy kernel from /boot for iscsi installs
rhbz#885960
Bug-Url:https://bugzilla.redhat.com/show_bug.cgi?id=885960
Signed-off-by: Joey Boggs <jboggs at redhat.com>
Change-Id: I60c9b832e10e6e4ae0ba1a7a4e370f95525553e7
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/ovirt-init-functions.sh.in
M src/ovirtnode/install.py
2 files changed, 12 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/76/20276/1
diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index 8ab95c7..affedb8 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -938,8 +938,13 @@
if [ -f /dev/.initramfs/live/backup-vmlinuz ]; then
# try backup image
cp -p /dev/.initramfs/live/backup-vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
- else
+ elif [ -f /dev/.initramfs/live/vmlinuz0 ]; then
cp -p /dev/.initramfs/live/vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
+ # check for iscsi install
+ elif [ -f /boot/backup-vmlinuz0 ]; then
+ cp -p /boot/backup-vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
+ elif [ -f /boot/vmlinuz0 ]; then
+ cp -p /boot/vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
fi
else
# try source image
diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index 0cc60c6..8bc3957 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -101,6 +101,7 @@
def grub_install(self):
if _functions.is_iscsi_install():
self.disk = _functions.findfs("BootNew")
+ self.grub_dict["partN"] = int(self.disk[-1:]) - 1
if not "/dev/mapper/" in self.disk:
self.disk = self.disk[:-1]
else:
@@ -164,10 +165,6 @@
partB = 1
if self.partN == 1:
partB = 2
- if _functions.is_iscsi_install():
- partB = 0
- if self.partN == 0:
- partB = 1
self.grub_dict['oldtitle'] = self.oldtitle
self.grub_dict['partB'] = partB
grub_conf.write(GRUB_BACKUP_TEMPLATE % self.grub_dict)
@@ -346,11 +343,12 @@
time.sleep(1)
_functions.system("partprobe")
for candidate_name in boot_candidate_names:
+ logger.debug(os.listdir("/dev/disk/by-label"))
if _functions.findfs(candidate_name):
self.boot_candidate = candidate_name
break
logger.debug("Trial %s to find candidate (%s)" % \
- (trial, self.boot_candidate))
+ (trial, candidate_name))
if self.boot_candidate:
logger.debug("Found candidate: %s" % self.boot_candidate)
break
@@ -374,7 +372,8 @@
if not _functions.system(e2label_cmd):
logger.error("Failed to label new Boot partition")
return False
- _functions.system("mount LABEL=%s /boot &>/dev/null" % self.boot_candidate)
+ _functions.system("mount %s /boot &>/dev/null" \
+ % boot_candidate_dev)
if os.path.exists("/boot/ovirt"):
try:
@@ -582,7 +581,7 @@
if _functions.is_iscsi_install():
# copy default for when Root/HostVG is inaccessible(iscsi upgrade)
shutil.copy(_functions.OVIRT_DEFAULTS, "/boot")
- # mark new Root ready to go, reboot() in ovirt-function switches it
+ # mark new Boot ready to go, reboot() in ovirt-function switches it
# to active
e2label_cmd = "e2label \"%s\" BootUpdate" % boot_candidate_dev
--
To view, visit http://gerrit.ovirt.org/20276
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I60c9b832e10e6e4ae0ba1a7a4e370f95525553e7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list