Project

General

Profile

Bug #32002

While using foreman-installer --reset-data throws few "Permission Denied" errors

Added by Eric Helms 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
foreman-installer script
Target version:

Description

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.

Associated revisions

Revision 8310aa68 (diff)
Added by Eric Helms 5 months ago

Fixes #32002: Use runuser for executing reset commands

Hides nonsense errors such as when a user cannot change directories
when running the reset-data command. Additionally, converts reset-data
execution into log output only.

History

#1 Updated by Ewoud Kohl van Wijngaarden 5 months ago

  • Triaged changed from No to Yes
  • Category set to foreman-installer script
  • Subject changed from While using satellite-installer --reset-data throws few "Permission Denied" errors to While using foreman-installer --reset-data throws few "Permission Denied" errors
  • Found in Releases 2.3.3 added

#2 Updated by The Foreman Bot 5 months ago

  • Assignee set to Eric Helms
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-installer/pull/657 added

#3 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 2.5.0 added

#4 Updated by Eric Helms 5 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/theforeman/foreman-installer/pull/660 added

#6 Updated by Ewoud Kohl van Wijngaarden 5 months ago

  • Target version set to 2.4.0
  • Fixed in Releases 2.4.0 added
  • Fixed in Releases deleted (2.5.0)

Also available in: Atom PDF