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.
Bug 912711 - RFE: Upgrade Enhancements for ovirt-node/RHEV-H
Summary: RFE: Upgrade Enhancements for ovirt-node/RHEV-H
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Joey Boggs
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1006390
TreeView+ depends on / blocked
 
Reported: 2013-02-19 13:35 UTC by Mike Burns
Modified: 2014-01-21 19:26 UTC (History)
13 users (show)

Fixed In Version: ovirt-node-3.0.0
Doc Type: Enhancement
Doc Text:
Previously the Hypervisor upgrade process used the already installed codebase. If there were issues in the existing upgrade script they would cause upgrade failures, and users would have to use installation media to correctly upgrade. The new process uses the new image's codebase to perform the upgrade.
Clone Of:
Environment:
Last Closed: 2014-01-21 19:26:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0033 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update 2014-01-22 00:14:30 UTC

Description Mike Burns 2013-02-19 13:35:52 UTC
Description of problem:
Historically, we've taken a somewhat naive approach to upgrades where we simply lay down the new iso image and that's it.  This leads to some problems

The most glaring one is that new options, defaults, configurations, etc in the base image can be overridden if the file in the old image is persisted.

Example:  
* 6.3 had no sanlock user (at GA), 6.4 does have a sanlock user.  
* /etc/passwd is persisted (due to setting passwords for admin)
* Upgrade to 6.4
* because the sanlock user is only in 6.4 /etc/passwd, and not in 6.3, it is not in the persisted /etc/passwd

Version-Release number of selected component (if applicable):
6.4

How reproducible:
always

Some thoughts:

/etc/passwd and /etc/shadow are pretty easy, just do a diff of the old image vs the new image and apply that diff to the persisted copy (not touching admin or root users).

Some other files might be more involved, though perhaps writing out configuration to /etc/default/ovirt and always applying from there would work.

Open to suggestions on ways to solve this.

Comment 1 Mike Burns 2013-02-19 13:44:33 UTC
Just a side note: 

The sanlock specific issue is filed in bug 912348 and will be fixed in either 6.4 or 6.4.z.  

This bug is to track a more generic issue with upgrades and try to prevent things like bug 912348 from happening in the future.

Comment 2 Fabian Deutsch 2013-02-27 14:51:04 UTC
(In reply to comment #0)
> Some other files might be more involved, though perhaps writing out
> configuration to /etc/default/ovirt and always applying from there would
> work.

I believe that this ain't always possible (e.g. admin/rootpw), but it's surely a good idea for other parts.
In general I'd appreciate some hook based solution ...

Comment 3 Mike Burns 2013-02-27 14:57:48 UTC
(In reply to comment #2)
> 
> I believe that this ain't always possible (e.g. admin/rootpw), but it's
> surely a good idea for other parts.
> In general I'd appreciate some hook based solution ...

Right, there needs to be some smart logic around this particular fix.  it should ignore root and admin in both /etc/shadow and /etc/passwd.  In fact, I think it should *only* do pure additive changes.  IOW, something like this:

get all users in installed/persisted version of /etc/passwd
get all users in new version image
parse the lists so that you only have the net-new users in the new version
add those uses

As for hooks, I believe that is in the plans for upgrades to have pre- and post- hooks that plugins can make use of, but I'll let jboggs comment on that

Comment 11 cshao 2013-10-12 07:41:14 UTC
Test version:
rhev-hypervisor6-6.5-20130930.0.auto665.el6.iso
ovirt-node-3.0.1-3.el6.noarch

Test steps:
1. Run command #ovirt-node-upgrade --iso $ISONAME and then reboot host.
2. Run command #ovirt-node-upgrade --iso $ISONAME --reboot 5
3. Run hook scripts in /usr/libexec/ovirt-node/hooks/
ovirt-node-upgrade --iso $ISONAME --skip-existing-hooks
4. Testing stdin as the iso image
cat $ISO|ovirt-node-upgrade --iso - --reboot 5
5. Run #ovirt-node-upgrade command twice.

Test results:
1. ovirt-node update can successful, no auto reboot. After reboot grub can list the backup version.
2. No error and RHEV-H can start reboot after 5 sec delay.
3. No error and post-upgrade hooks completed.
4. Ovirt-node update can successful and start reboot after 5 sec delay.
5. After the second run, pop-up msg:RuntimeError: Previous upgrade completed, you must reboot

So this bug is fixed in rhev-hypervisor6-6.5-20130930.0.auto665.el6.iso. I will recheck it when I got official build.

Comment 14 Cheryn Tan 2013-11-08 00:39:02 UTC
This bug is currently attached to errata RHBA-2013:15277. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 17 cshao 2013-12-17 02:36:31 UTC
Test version:
rhevh-6.5-20131213.0.0
ovirt-node-3.0.1-9.el6_5.noarch

Test steps:
1. Run command #ovirt-node-upgrade --iso $ISONAME and then reboot host.
2. Run command #ovirt-node-upgrade --iso $ISONAME --reboot 5
3. Run hook scripts in /usr/libexec/ovirt-node/hooks/
ovirt-node-upgrade --iso $ISONAME --skip-existing-hooks
4. Testing stdin as the iso image
cat $ISO|ovirt-node-upgrade --iso - --reboot 5
5. Run #ovirt-node-upgrade command twice.

Test results:
1. ovirt-node update can successful, no auto reboot. After reboot grub can list the backup version.
2. No error and RHEV-H can start reboot after 5 sec delay.
3. No error and post-upgrade hooks completed.
4. Ovirt-node update can successful and start reboot after 5 sec delay.
5. After the second run, pop-up msg:RuntimeError: Previous upgrade completed, you must reboot

So the bug is fixed, change bug status to VERIFIED.

Comment 19 errata-xmlrpc 2014-01-21 19:26:58 UTC
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-2014-0033.html


Note You need to log in before you can comment on or make changes to this bug.