Bug 1942073
| Summary: | Satellite 6.7.5 to 6.8.5 upgrade failed with error "could not change directory to "/root"". | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Jameer Pathan <jpathan> |
| Component: | Installation | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Devendra Singh <desingh> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.8.0 | CC: | apatel, desingh, egolov, ehelms, kgaikwad, pcreech |
| Target Milestone: | 6.8.5 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-installer-2.1.2.13-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-04-01 14:44:46 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: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1940473 | ||
|
Description
Jameer Pathan
2021-03-23 15:28:52 UTC
The relevant log entry doesn't make any sense to me: [DEBUG 2021-03-24T00:49:32 main] Executing: foreman-maintain service start --only=postgresql [DEBUG 2021-03-24T00:49:43 main] Running Start Services [DEBUG 2021-03-24T00:49:43 main] ================================================================================ [DEBUG 2021-03-24T00:49:43 main] Check if command is run as root user: ESC[32mESC[1m[OK]ESC[0m [DEBUG 2021-03-24T00:49:43 main] -------------------------------------------------------------------------------- [DEBUG 2021-03-24T00:49:43 main] Start applicable services: [DEBUG 2021-03-24T00:49:43 main] [DEBUG 2021-03-24T00:49:43 main] Starting the following service(s): [DEBUG 2021-03-24T00:49:43 main] postgresql [DEBUG 2021-03-24T00:49:43 main] ^M ^M| ^M ^M/ ^M ^M/ starting postgresql^M ^M/ All services started ESC[32mESC[1m[OK]ESC[0m [DEBUG 2021-03-24T00:49:43 main] -------------------------------------------------------------------------------- [DEBUG 2021-03-24T00:49:43 main] [DEBUG 2021-03-24T00:49:43 main] foreman-maintain service start --only=postgresql finished successfully! [DEBUG 2021-03-24T00:49:44 main] Executing: foreman-maintain service stop [DEBUG 2021-03-24T00:49:55 main] Running Stop Services [DEBUG 2021-03-24T00:49:55 main] ================================================================================ [DEBUG 2021-03-24T00:49:55 main] Check if command is run as root user: ESC[32mESC[1m[OK]ESC[0m [DEBUG 2021-03-24T00:49:55 main] -------------------------------------------------------------------------------- [DEBUG 2021-03-24T00:49:55 main] Stop applicable services: [DEBUG 2021-03-24T00:49:55 main] [DEBUG 2021-03-24T00:49:55 main] Stopping the following service(s): [DEBUG 2021-03-24T00:49:55 main] rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflow-sidekiq@orchestrator, elasticsearch, httpd, puppetserver, dynflow-sidekiq@worker, foreman-proxy [DEBUG 2021-03-24T00:49:55 main] ^M ^M| ^M ^M/ ^M ^M/ stopping foreman-proxy^M ^M/ stopping dynflow-sidekiq@worker^M ^M/ stopping puppetserver^M ^M/ stopping httpd^M ^M/ stopping elasticsearch^M ^M/ stopping dynflow-sidekiq@orchestrator^M ^M/ stopping tomcat^M ^M/ stopping smart_proxy_dynflow_core^M ^M/ stopping pulp_workers^M ^M/ stopping pulp_streamer^M ^M/ stopping pulp_resource_manager^M ^M/ stopping pulp_celerybeat^M ^M/ stopping squid^M ^M/ stopping qpidd^M ^M/ stopping qdrouterd^M ^M/ stopping postgresql^M ^M/ stopping rh-mongodb34-mongod^M ^M/ All services stopped ESC[32mESC[1m[OK]ESC[0m [DEBUG 2021-03-24T00:49:55 main] -------------------------------------------------------------------------------- [DEBUG 2021-03-24T00:49:55 main] [DEBUG 2021-03-24T00:49:55 main] foreman-maintain service stop finished successfully! [DEBUG 2021-03-24T00:49:55 main] Exit with status code: 1 (signal was 1) [DEBUG 2021-03-24T00:49:55 main] Cleaning /tmp/kafo_installation20210324-12467-l0g2ac [DEBUG 2021-03-24T00:49:55 main] Cleaning /tmp/default_values.yaml [ INFO 2021-03-24T00:49:55 main] Installer finished in 40.259736021 seconds Ah, the line before that is
[DEBUG 2021-03-24T00:49:32 main] Hook /usr/share/foreman-installer/hooks/pre/25-remove_apache_from_foreman_group.rb returned true
So it's done with 25-remove_apache_from_foreman_group.rb and the next hook is 30-el7_upgrade_postgresql.rb, and the start and stop above matches the following:
start_services(['postgresql'])
(_name, _owner, _enconding, collate, ctype, _privileges) = `runuser postgres -c 'psql -lt | grep -E "^\s+postgres"'`.chomp.split('|').map(&:strip)
stop_services
But stop services would only exit 1, if services stop was not successful, but the line above says it was?!
Ah, sneaky... it's not the f-maintain that failed, it's the RPM that was added in here:
https://gitlab.sat.engineering.redhat.com/satellite6/foreman-installer/-/commit/5d1c0af2ff48454c647aaab72fd3a6b6ad66b8a3
Satellite 6.7.5 to Satellite 6.8.5 snap 3 upgrade completed successfully for me. Verified on 6.8.5 Snap 3 Satellite upgrade completed successfully from 6.7.5 to 6.8.5 Snap3. 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 (Satellite 6.8.5 Async Bug Fix Update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:1057 |