Bug 1911341

Summary: While using satellite-installer --reset-data throws few "Permission Denied" errors
Product: Red Hat Satellite Reporter: Ashish Humbe <ahumbe>
Component: InstallationAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.9.0CC: ehelms, pcreech, wclark
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-installer-2.3.1.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:25:01 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:

Description Ashish Humbe 2020-12-28 18:45:07 UTC
Description of problem:

While using satellite-installer --reset-data throws few "Permission Denied" errors, here is the installer output


2020-12-28 22:33:26 [NOTICE] [pre_commit] All hooks in group pre_commit finished
2020-12-28 22:33:26 [NOTICE] [pre] Executing hooks in group pre
Executing: sudo -u postgres dropdb foreman
could not change directory to "/root": Permission denied  <<<<<<<<<<<<<<<
Executing: rm -f /var/lib/candlepin/.puppet-candlepin-cpdb*
Executing: sudo -u postgres dropdb candlepin
could not change directory to "/root": Permission denied   <<<<<<<<<<<<<<<
Executing: rm -f /var/lib/pulp/init.flag
Executing: mongo pulp_database   --host localhost --port 27017    --eval 'db.dropDatabase();'
MongoDB shell version v3.4.9
connecting to: mongodb://localhost:27017/pulp_database
MongoDB server version: 3.4.9
{ "dropped" : "pulp_database", "ok" : 1 }
Executing: rm -rf /var/lib/pulp/{distributions,published,repos,content}/*
2020-12-28 22:35:02 [NOTICE] [pre] All hooks in group pre finished


The installer does not exit with these permission denied errors, it continues its work but the error message is a bit concerning.

Comment 1 Eric Helms 2021-03-03 13:01:24 UTC
Created redmine issue https://projects.theforeman.org/issues/32002 from this bug

Comment 2 Bryan Kearney 2021-03-04 16:05:53 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32002 has been resolved.

Comment 5 Devendra Singh 2021-03-15 06:33:28 UTC
Verified on 6.9 Snap 17

Verification steps:

1- Ran the satellite-installer with --reset operation and it completed successfully.

# satellite-installer --reset-data
2021-03-15 02:12:31 [NOTICE] [root] Loading default values from puppet modules...
2021-03-15 02:12:36 [NOTICE] [root] ... finished
Are you sure you want to continue? This will drop the databases, reset all configurations that you have made and bring all application data back to a fresh install. [y/n]
y
2021-03-15 02:13:06 [NOTICE] [root] Running validation checks
Package versions are locked. Continuing with unlock.
2021-03-15 02:14:12 [NOTICE] [pre] Dropping foreman database!
2021-03-15 02:14:12 [NOTICE] [pre] Dropping candlepin database!
Executing: rm -f /var/lib/pulp/init.flag
Executing: mongo pulp_database   --host localhost --port 27017    --eval 'db.dropDatabase();'
MongoDB shell version v3.4.9
connecting to: mongodb://localhost:27017/pulp_database
MongoDB server version: 3.4.9
{ "dropped" : "pulp_database", "ok" : 1 }
Executing: rm -rf /var/lib/pulp/{distributions,published,repos,content}/*
2021-03-15 02:14:13 [NOTICE] [pre] Dropping pulpcore database!
2021-03-15 02:14:13 [WARN  ] [pre] Pulpcore content directory not present at '/var/lib/pulp/docroot'
2021-03-15 02:14:18 [NOTICE] [configure] Starting system configuration.
  The total number of configuration tasks may increase during the run.
  Observe logs or specify --verbose-log-level to see individual configuration tasks.
2021-03-15 02:14:31 [NOTICE] [configure] 100 out of 2311 done.
2021-03-15 02:14:31 [NOTICE] [configure] 200 out of 2311 done.
2021-03-15 02:14:31 [NOTICE] [configure] 300 out of 2311 done.
2021-03-15 02:14:32 [NOTICE] [configure] 400 out of 2311 done.
2021-03-15 02:14:32 [NOTICE] [configure] 500 out of 2311 done.
2021-03-15 02:14:57 [NOTICE] [configure] 600 out of 2311 done.
2021-03-15 02:14:59 [NOTICE] [configure] 700 out of 2313 done.
2021-03-15 02:15:00 [NOTICE] [configure] 800 out of 2313 done.
2021-03-15 02:15:00 [NOTICE] [configure] 900 out of 2315 done.
2021-03-15 02:15:01 [NOTICE] [configure] 1000 out of 2316 done.
2021-03-15 02:15:02 [NOTICE] [configure] 1100 out of 2317 done.
2021-03-15 02:15:02 [NOTICE] [configure] 1200 out of 2319 done.
2021-03-15 02:15:03 [NOTICE] [configure] 1300 out of 2321 done.
2021-03-15 02:15:03 [NOTICE] [configure] 1400 out of 2323 done.
2021-03-15 02:15:18 [NOTICE] [configure] 1500 out of 2323 done.
2021-03-15 02:15:18 [NOTICE] [configure] 1600 out of 2325 done.
2021-03-15 02:15:33 [NOTICE] [configure] 1700 out of 2325 done.
2021-03-15 02:25:11 [NOTICE] [configure] 1800 out of 2325 done.
2021-03-15 02:25:11 [NOTICE] [configure] 1900 out of 2325 done.
2021-03-15 02:27:32 [NOTICE] [configure] 2000 out of 2325 done.
2021-03-15 02:27:32 [NOTICE] [configure] 2100 out of 2325 done.
2021-03-15 02:27:35 [NOTICE] [configure] 2200 out of 2325 done.
2021-03-15 02:28:08 [NOTICE] [configure] 2300 out of 2325 done.
2021-03-15 02:28:20 [NOTICE] [configure] System configuration has finished.
  Success!

2- Checked the fixed package on the installed satellite.

# rpm -qa|grep foreman-installer-2.3.1.7-1
foreman-installer-2.3.1.7-1.el7sat.noarch

Comment 8 errata-xmlrpc 2021-04-21 13:25:01 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 (Moderate: Satellite 6.9 Release), 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/RHSA-2021:1313