Katello Smart Proxy Upgrade 3.8 Broken

Problem:
Performing Smart Proxy Upgrade, and receiving failures.
During the process, it is attempting to upgrade postgresql. But wait, this is a foreman-content-proxy host. There should not be any postgresql upgrades.

[ cut-paste ]

Upgrading, to monitor the progress on all related services, please do:
  foreman-tail | tee upgrade-$(date +%Y-%m-%d-%H%M).log

Upgrade Step: stop_services...
Redirecting to 'foreman-maintain service'
Running Stop Services

Check if command is run as root user:                                 [OK]

--------------------------------------------------------------------------------
Stop applicable services: Stopping the following service(s):

rh-mongodb34-mongod, squid, foreman-proxy, smart_proxy_dynflow_core, pulp_streamer, pulp_celerybeat, pulp_resource_manager, pulp_workers, puppetserver

\ All services stopped                                                [OK]      

--------------------------------------------------------------------------------
katello-service stop finished successfully!

**Upgrade Step: start_postgresql...**
**Redirecting to 'foreman-maintain service'**
**Running Start Services**

Check if command is run as root user:                                 [OK]

--------------------------------------------------------------------------------

Start applicable services: Starting the following service(s):
[FAIL] 
No services found matching your parameters
--------------------------------------------------------------------------------
Scenario [Start Services] failed.

The following steps ended up in failing state:

  [service-start]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="service-start"


katello-service start --only postgresql failed! Check the output for error!
Upgrade step start_postgresql failed. Check logs for more information.

Expected outcome:
Successful

Foreman and Proxy versions:
katello-repos-3.8.0-4.el7.noarch
foreman-proxy-1.19.0-1.el7.noarch
foreman-installer-katello-3.8.0-1.el7.noarch
foreman-proxy-content-3.8.0-5.el7.noarch

Foreman and Proxy plugin versions:

Other relevant data:

foreman-installer --scenario foreman-proxy-content --upgrade\
              --foreman-proxy-content-certs-tar ~/capsule3.domain.com-certs.tar\
              --certs-update-all --certs-regenerate true --certs-deploy true

Same here – is there any way to hack around this? I’d rather not rollback the master to 3.7 at this point.

@fbachmann - Yeah, what I did was modify the following to bypass the attempt to upgrade postgresql on a capsule host. (which postgresql should not be on a capsule)

On the capsule host(s): Modify the pre hooks steps
vi /usr/share/katello-installer-base/hooks/pre/30-upgrade.rb

# Comment out the line,  and just repeat the previous stop condition. 
def start_postgresql
+  Kafo::Helpers.execute('katello-service stop')
-  #Kafo::Helpers.execute('katello-service start --only postgresql')
end

This worked w/o issue and was able to upgrade the capsule as intended.

I also found another issue on upgrading the main Katello host(s)

  • During a 3.8 upgrade, it will bomb due to database migrations was not called during the upgrade.

    To resolve:
    Stop all services
    Start just postgres and mongo
    sudo -u apache /usr/bin/pulp-manage-db

Then restart the upgrade, should work w/o issues then.

I ran into this same issue while updating my smart proxies to 3.8.0. I resolved it by applying the patch mentioned in #25011.