Bug 1376888

Summary: Failed to run in-place upgrade from 5.5 to 5.7
Product: Red Hat CloudForms Management Engine Reporter: luke couzens <lcouzens>
Component: Red Hat AccessAssignee: Satoe Imaishi <simaishi>
Status: CLOSED CURRENTRELEASE QA Contact: luke couzens <lcouzens>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: abellott, dajohnso, ihands, jhardy, lphiri, ncarboni, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: black:upgrade:migration
Fixed In Version: 5.7.0.3 (rh-ruby23-rubygem-redhat_access_cfme-1.1.0-1, rh-ruby23-rubygem-redhat_access_lib-0.1.0-1) Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 20:20:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description luke couzens 2016-09-16 18:30:15 UTC
Description of problem: Package conflict when upgrading from 5.5 to 5.7


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


How reproducible:100%


Steps to Reproduce:
1.provision 5.5 appliance
2.add repos for 5.7 upgrade
3.run yum update

Actual results:upgrade fails


Expected results:upgrade completes


Additional info:
Transaction check error:
  file /var/www/miq/vmdb/product/menubar/redhat_access_insights_section.yml from install of rh-ruby23-rubygem-redhat_access_cfme-1.0.3-1.el7cf.noarch conflicts with file from package rh-ruby22-rubygem-redhat_access_cfme-0.0.7-1.el7cf.noarch

Error Summary
-------------

Comment 2 Satoe Imaishi 2016-09-21 14:20:22 UTC
Lindani, can you take a look at this?  We moved to ruby 2.3 in CFME 5.7 and the RPM name changed, so it's no longer considered as an upgrade.

Comment 3 Lindani Phiri 2016-09-21 14:28:32 UTC
@Satoe We need to add an "obsoletes" directive to the the ruby 2.3 spec file.

Comment 4 Nick Carboni 2016-09-21 14:31:10 UTC
Okay, so it sounds like this is an issue with the RPM itself. If you're going to work on that can you take this BZ Lindani?

Comment 5 Lindani Phiri 2016-09-21 14:45:29 UTC
@Nick, I am taking this one.

Comment 6 Nick Carboni 2016-09-21 15:12:50 UTC
Thanks Lindani!

Comment 7 Lindani Phiri 2016-09-22 19:32:27 UTC
Updated Access RPMs with Obsolete directive. Will also require Obsolete directives for cfme rpm

Comment 9 Satoe Imaishi 2016-09-26 20:38:59 UTC
It looks like just using the new Access Insight RPMs is enough to get rid of that error. The new RPMs will be included in the next 5.7 build.

There were some warning messages during upgrade. I will take a look at that separately as that's not related to access insight and that doesn't cause upgrade to fail.

Since we're going from ruby 2.2 to ruby 2.3 as well as postgresql 9.4 to 9.5, the upgrade instruction will need to be updated.  NickC will look into that.

Comment 10 Satoe Imaishi 2016-10-04 17:31:00 UTC
Nick, can you please provide the updated instruction when ready?

Comment 11 Nick Carboni 2016-10-04 17:34:37 UTC
Will do, will likely be waiting on https://github.com/ManageIQ/manageiq-appliance/pull/92

Comment 12 luke couzens 2016-10-07 12:19:48 UTC
Hey Nick,

Any update on the instructions to upgrade?

Cheers,

Luke

Comment 13 Nick Carboni 2016-10-07 12:42:12 UTC
I'm still waiting on https://github.com/ManageIQ/manageiq-appliance/pull/92 to be merged, but when that happens, I got it to work with the following steps:

To put it simply it's https://access.redhat.com/articles/2297391 without the rubyrep stuff and with a postgres upgrade. I'll outline the steps I took here for clarity.

First, set up the upgrade repos on all the appliances

On all appliances:
1. `systemctl stop evmserverd`
2. `yum update`
3. `bin/rake db:migrate`
4. `bin/rake evm:automate:reset`

On database server appliances:
1. `miq_postgres_upgrade.sh` (See PR referenced in comment 11)
2. Make required edits to postgresql.conf (a patch should be printed by the previous script)
3. `systemctl enable rh-postgresql95-postgresql && systemctl start rh-postgresql95-postgresql`

On all appliances:
`systemctl start evmserverd`

Rebuild replication if rubyrep was being used
  - This upgrade will remove all the rubyrep tables and triggers as well as all the remote region data from the global database.

After everything looks good you can `yum remove rh-postgresql94-*` on the database server appliances.

I haven't actually upgraded a replicated environment though so this is just my best guess for that (we'll need to check both pglogical -> pglogical and rubyrep -> pglogical for this upgrade).

Comment 14 Nick Carboni 2016-10-07 12:45:24 UTC
You may also need to log out and log back in after the `yum update` and before the `bin/rake db:migrate` to properly load the new ruby 2.3 SCL.

Comment 15 luke couzens 2016-10-18 15:04:12 UTC
Verified yum update works from 5.5 to 5.7.0.5