Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
in kernel boot command line, user could specify
storage_init=/dev/mapper/* uninstall to uninstall the exist HostVG,
but if there is any fail, like follow storage_init can't find the disk
we should drop to shell, or better, we could provide the command let
the user to manually uninstall the HostVG in emergency shell
in ovirt-early, we just wipe the disk's mbr, if disk could not be
found,we should call autoinstall_failed to drop to shell, sth like that,
wipe_mbr "$init_disk"
if [ $rc -ne 0 ]; then
autoinstall_failed
fi
Version-Release number of selected component (if applicable):
rhev-hypervisor-6.2-0.5
How reproducible:
always
Steps to Reproduce:
1,boot to rhev-hypervisor kernel command line
2,specify invalid disk in "storage_init=$invalidisk uninstall"
Actual results:
Expected results:
Additional info:
It's not that simple.
autoinstall_failed is a local function in ovirt-firstboot and isn't available in ovirt-early where this check is. It can be refactored pretty easily though.
This is actually a bigger issue. If you specify an invalid disk, that gets handled silently earlier in the process. When we parse the storage_init parameter, an invalid device gets dropped
ovirt-early runs parse_disk_id from ovirt-boot-functions which has a case statement:
case
...
/dev/*)
disk="$(ls -1 "$i" 2>/dev/null | grep -m 1 "$dev")"
;;
(In reply to comment #5)
> /dev/*)
> disk="$(ls -1 "$i" 2>/dev/null | grep -m 1 "$dev")"
> ;;
So in case of invalid storage_init we end up with disk="", we could check for that and bail-out:
diff --git a/scripts/ovirt-early b/scripts/ovirt-early
index fa24720..47864fe 100755
--- a/scripts/ovirt-early
+++ b/scripts/ovirt-early
@@ -364,10 +364,14 @@ start_ovirt_early () {
IFS=,
init=
for d in $hostvgdisks; do
+ did="$(IFS="$oldIFS" parse_disk_id "$d")"
+ if [ -z "$did" ]; then
+ autoinstall_failed
+ fi
if [ -n "$init" ]; then
- init="$init${SEP}$(IFS="$oldIFS" parse_disk_id "$d")"
+ init="$init${SEP}$did"
else
- init="$(IFS="$oldIFS" parse_disk_id "$d")"
+ init="$did"
fi
done
IFS="$oldIFS"
@@ -378,10 +382,14 @@ start_ovirt_early () {
IFS=,
init_app=
for d in $appvgdisks; do
+ did="$(IFS="$oldIFS" parse_disk_id "$d")"
+ if [ -z "$did" ]; then
+ autoinstall_failed
+ fi
if [ -n "$init_app" ]; then
- init_app="$init_app${SEP}$(IFS="$oldIFS" parse_disk_id "$d")"
+ init_app="$init_app${SEP}$did"
else
- init_app="$(IFS="$oldIFS" parse_disk_id "$d")"
+ init_app="$did"
fi
done
IFS="$oldIFS"
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1783.html
Description of problem: in kernel boot command line, user could specify storage_init=/dev/mapper/* uninstall to uninstall the exist HostVG, but if there is any fail, like follow storage_init can't find the disk we should drop to shell, or better, we could provide the command let the user to manually uninstall the HostVG in emergency shell in ovirt-early, we just wipe the disk's mbr, if disk could not be found,we should call autoinstall_failed to drop to shell, sth like that, wipe_mbr "$init_disk" if [ $rc -ne 0 ]; then autoinstall_failed fi Version-Release number of selected component (if applicable): rhev-hypervisor-6.2-0.5 How reproducible: always Steps to Reproduce: 1,boot to rhev-hypervisor kernel command line 2,specify invalid disk in "storage_init=$invalidisk uninstall" Actual results: Expected results: Additional info: