Bug 1380881

Summary: In place upgrade to RHEL 7 using the rhevm-appliance ova breaks SELinux
Product: Red Hat Enterprise Virtualization Manager Reporter: Bryan Yount <byount>
Component: rhevm-applianceAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.5CC: cshabazi, dfediuck, gklein, mkalinin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-03 14:16:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
preupgrade results none

Description Bryan Yount 2016-09-30 23:39:17 UTC
Created attachment 1206377 [details]
preupgrade results

Description of problem:
I attempted an upgrade of the hosted-engine RHEV 3.6 environment in my lab so that I could verify all of the steps in the documentation for my customer. I ran into an SELinux issue after the upgrade where I was not able to log into the system as root. When I would enter the correct password, it would just kick me right back to the login prompt. Did anyone test the in place upgrade procedure with the hosted-engine appliance?

1. Upgrade RHEL 6.8 to RHEL 7 first: https://access.redhat.com/solutions/637583
2. Upgrade RHEV 3.6 to RHEV 4: https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/single/self-hosted-engine-guide/#Upgrading_the_Self-Hosted_Engine


Version-Release number of selected component (if applicable):
rhevm-appliance-20160413.0-1.el7ev.noarch

How reproducible:
Unsure

Steps to Reproduce:
1. Install RHEL 7 systems to use as hosted engine hypervisors
2. Install rhevm-appliance-20160413.0-1.el7ev.noarch to provide the .ova that hosted-engine-setup needs.
3. Run the hosted-engine-setup and provide the path to the rhevm-appliance.ova
4. Upgrade to the latest RHEL 6.8 and RHEV-M 3.6
5. Follow the "Upgrading the Self-Hosted Engine to RHV 4" procedure in documentation which says to upgrade RHEL 6 to RHEL 7 first before upgrading RHV.
6. Follow kcs to upgrade RHEL 6 to RHEL 7 (https://access.redhat.com/solutions/637583)
7. Ran the preupgrade assistant which told us to use a few --addrepo flags and --cleanup-post when we ran the redhat-upgrade-tool command.
8. redhat-upgrade-tool --network 7.2 --instrepo ftp://ftp.example.com/pub/rhel7/ --addrepo=rhel-7-server-optional-rpms --addrepo=rhel-ha-for-rhel-7-server-rpms --cleanup-post

Actual results:
After the system rebooted, it was upgraded to RHEL 7.2 but I was unable to login as root. Every time I tried to log in with the correct password, it kicked me right back to the login prompt. I had a feeling it might be SELinux or something but I couldn't get to grub to put it in permissive mode because the rhevm-appliance has the grub timeout set to 1 second. So, I had to use guestfish to edit grub.conf and, while I was there, I also set SELinux to Permissive which finally allowed me to log in.

Expected results:
The upgrade should have completed successfully

Additional info:
Additional logs will be posted soon. I have the virtual disk image in a tar file which I can share if someone is able to help me diagnose what went wrong. If I ran into this problem, I know we're going to see customers run into it too.

Comment 1 Fabian Deutsch 2016-10-03 14:09:06 UTC
Did you try to run restorecon on / to reset all labels?

Comment 2 Sandro Bonazzola 2016-10-03 14:16:39 UTC
Upgrade using the redhat-upgrade-tool is not supported for RHEV.
The only upgrade path for hosted engine appliance is using the hosted engine upgrade tool which migrate the engine content from the existing el6 appliance to the new el7 appliance.
It should be stated correctly in the existing documentation.
Closing as not a bug.

Comment 3 Bryan Yount 2016-10-03 18:29:10 UTC
(In reply to Fabian Deutsch from comment #1)
> Did you try to run restorecon on / to reset all labels?

I haven't tried that yet as I was trying to narrow down the issue. Good suggestion though. I will give it a shot.

Comment 4 Bryan Yount 2016-10-03 18:31:35 UTC
(In reply to Sandro Bonazzola from comment #2)
> Upgrade using the redhat-upgrade-tool is not supported for RHEV.
> The only upgrade path for hosted engine appliance is using the hosted engine
> upgrade tool which migrate the engine content from the existing el6
> appliance to the new el7 appliance.
> It should be stated correctly in the existing documentation.
> Closing as not a bug.

Sandro, it's not stated correctly in the documentation. That's why I opened this BZ. If you look at the hosted-engine upgrade section, it says you need to upgrade to RHEL 7:

"To upgrade your Red Hat Enterprise Virtualization 3.6 self-hosted engine environment to Red Hat Virtualization 4.0, the Manager virtual machine must be upgraded from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7. After the Manager is upgraded you can update the self-hosted engine hosts, and any standard hosts, to 4.0."

But then it contradicts itself right after that when it says:

"The upgrade utility builds a new Manager based on a template. Manual changes or custom configuration to the original Manager such as custom users, SSH keys, and monitoring will need to be reapplied manually on the new Manager."

And then, the step where you're supposed to add a RHEL 7 software channel to the RHEL 6 RHEV-M doesn't work:

3. On the Manager virtual machine, enable the required repository.
# subscription-manager repos --enable=rhel-7-server-rhv-4.0-rpms

Comment 5 Marina Kalinin 2016-10-03 19:31:43 UTC
1. First, we need to make this documentation bug, specifying what Sandro said in comment#2. 
2. Closing it as duplicate of this bug: bz#1380896. 



https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/single/self-hosted-engine-guide/#Upgrading_the_Self-Hosted_Engine

*** This bug has been marked as a duplicate of bug 1380896 ***

Comment 6 Bryan Yount 2016-10-03 19:35:40 UTC
Btw, the reason I selected RHEV-M version 3.6.5 is because of the version of the rhevm-appliance.ova I originally downloaded...