Project

General

Profile

Actions

Feature #16208

closed

Support changing PostgreSQL user

Added by James Shewey over 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

On version 1.12.1 that ships from:

http://fedorapeople.org/groups/katello/releases/yum/3.1/katello/el7/x86_64/katello-repos-latest.rpm
http://yum.theforeman.org/releases/latest/el7/x86_64/foreman-release.rpm
http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

In my answers file, if I change:

db_username: foreman

to

db_username: admin

And then do a clean install:

I then receive the following errors during installation

[root@katello01 scenarios.d]# /sbin/foreman-installer --scenario katello
[---snip---]
Installing             Notice: /Stage[main]/Foreman::Database/Foreman::Ra [84%] [.................................................................................................................................                        ] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
 /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
Installing             Notice: /Stage[main]/Foreman::Database/Foreman_con [84%] [.................................................................................................................................                        ]Installing             Info: RESOURCE Certs_bootstrap_rpm[katello-ca-cons [88%] [.......................................................................................................................................                  ]Installing             Info: RESOURCE Privkey[/etc/pki/katello/private/ka [88%] [........................................................................................................................................                 ]Installing             Info: RESOURCE File[/etc/pki/katello/keystore_pass [90%] [..........................................................................................................................................               ]Installing             Info: RESOURCE Service[qpidd]                      [91%] [...........................................................................................................................................              ]Installing             Debug: /Stage[main]/Certs::Candlepin/Exec[create c [91%] [............................................................................................................................................             ]Installing             Debug: /Stage[main]/Certs::Candlepin/Exec[import c [91%] [............................................................................................................................................             ]Installing             Notice: /Stage[main]/Certs::Candlepin/Exec[import  [91%] [............................................................................................................................................             ]Installing             Info: RESOURCE Cert[katello01.d.noc.panasonic.loca [92%] [.............................................................................................................................................            ]Installing             Info: RESOURCE Service[pulp_workers]               [93%] [..............................................................................................................................................           ]Installing             Info: RESOURCE Concat_fragment[qdrouter+ssl_server [95%] [..................................................................................................................................................       ]Installing             Debug: Executing '/usr/bin/systemctl is-active qdr [96%] [...................................................................................................................................................      ]Installing             Debug: /Stage[main]/Katello::Qpid/Exec[bind katell [96%] [...................................................................................................................................................      ]Installing             Notice: /Stage[main]/Katello::Qpid/Exec[bind katel [96%] [...................................................................................................................................................      ]Installing             Debug: /Stage[main]/Katello::Qpid/Exec[create kate [96%] [...................................................................................................................................................      ]Installing             Notice: /Stage[main]/Foreman::Database/Foreman::Ra [96%] [...................................................................................................................................................      ] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
 /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
Installing             Debug: Executing '/usr/sbin/foreman-rake -- config [96%] [...................................................................................................................................................      ] Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_cert' -v '/etc/pki/katello/certs/pulp-client.crt'' returned 1: rake aborted!
Installing             Error: Execution of '/usr/sbin/foreman-rake -- con [96%] [...................................................................................................................................................      ] /Stage[main]/Katello::Config::Pulp_client/Foreman_config_entry[pulp_client_cert]/value: change from  to /etc/pki/katello/certs/pulp-client.crt failed: Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_cert' -v '/etc/pki/katello/certs/pulp-client.crt'' returned 1: rake aborted!
Installing             Notice: /Stage[main]/Foreman::Database/Foreman::Ra [96%] [....................................................................................................................................................     ] /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
 /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
Installing             Debug: Executing '/usr/sbin/foreman-rake -- config [98%] [......................................................................................................................................................   ] Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
Installing             Error: Execution of '/usr/sbin/foreman-rake -- con [98%] [......................................................................................................................................................   ] /Stage[main]/Foreman::Plugin::Puppetdb/Foreman_config_entry[puppetdb_enabled]/value: change from  to true failed: Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
Installing             Debug: Executing '/usr/sbin/foreman-rake -- config [98%] [......................................................................................................................................................   ] Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_key' -v '/etc/pki/katello/private/pulp-client.key'' returned 1: rake aborted!
Installing             Error: Execution of '/usr/sbin/foreman-rake -- con [98%] [......................................................................................................................................................   ] /Stage[main]/Katello::Config::Pulp_client/Foreman_config_entry[pulp_client_key]/value: change from  to /etc/pki/katello/private/pulp-client.key failed: Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_key' -v '/etc/pki/katello/private/pulp-client.key'' returned 1: rake aborted!
Installing             Notice: /Stage[main]/Foreman::Service/Exec[restart [99%] [.......................................................................................................................................................  ]Installing             Debug: Foreman_smartproxy[katello01.d.noc.panasoni [99%] [........................................................................................................................................................ ] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[katello01.d.noc.panasonic.local]: Could not evaluate: Proxy katello01.d.noc.panasonic.local cannot be retrieved: unknown error (response 500)
Installing             /usr/share/ruby/vendor_ruby/puppet/resource/catalo [99%] [........................................................................................................................................................ ]Installing             Debug: Stored state in 0.20 seconds                [99%] [........................................................................................................................................................ ]Installing             Debug: /File[/etc/puppet/environments/production]/ [99%] [........................................................................................................................................................ ]Installing             Done                                               [100%] [........................................................................................................................................................]Installing             Done                                               [100%] [........................................................................................................................................................]

  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/katello.log

[root@katello01 scenarios.d]# /usr/sbin/foreman-rake db:migrate
rake aborted!
PG::Error: FATAL:  Peer authentication failed for user "admin" 
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
[---snip---]

[root@katello01 scenarios.d]# tail -n 20 /var/log/foreman-installer/katello.log
[DEBUG 2016-08-20 15:24:36 main] Hook /usr/share/katello-installer-base/hooks/post/30-upgrade.rb returned nil
[ INFO 2016-08-20 15:24:36 main] All hooks in group post finished
[DEBUG 2016-08-20 15:24:36 main] Exit with status code: 6 (signal was 6)
[ERROR 2016-08-20 15:24:36 main] Errors encountered during run:
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_cert' -v '/etc/pki/katello/certs/pulp-client.crt'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Katello::Config::Pulp_client/Foreman_config_entry[pulp_client_cert]/value: change from  to /etc/pki/katello/certs/pulp-client.crt failed: Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_cert' -v '/etc/pki/katello/certs/pulp-client.crt'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: Failed to call refresh: /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Database/Foreman::Rake[apipie:cache:index]/Exec[foreman-rake-apipie:cache:index]: /usr/sbin/foreman-rake apipie:cache:index returned 1 instead of one of [0]
[ERROR 2016-08-20 15:24:36 main]  Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman::Plugin::Puppetdb/Foreman_config_entry[puppetdb_enabled]/value: change from  to true failed: Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_enabled' -v 'true'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_key' -v '/etc/pki/katello/private/pulp-client.key'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Katello::Config::Pulp_client/Foreman_config_entry[pulp_client_key]/value: change from  to /etc/pki/katello/private/pulp-client.key failed: Execution of '/usr/sbin/foreman-rake -- config -k 'pulp_client_key' -v '/etc/pki/katello/private/pulp-client.key'' returned 1: rake aborted!
[ERROR 2016-08-20 15:24:36 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[katello01.d.noc.panasonic.local]: Could not evaluate: Proxy katello01.d.noc.panasonic.local cannot be retrieved: unknown error (response 500)
[DEBUG 2016-08-20 15:24:36 main] Cleaning /etc/foreman-installer/scenarios.d/d20160820-82918-scqbwn
[DEBUG 2016-08-20 15:24:36 main] Cleaning /tmp/kafo_hiera20160820-82918-1rutjkd
[DEBUG 2016-08-20 15:24:36 main] Cleaning /tmp/default_values.yaml
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Tracker changed from Bug to Feature
  • Project changed from Foreman to Installer
  • Subject changed from Can't change postgres user to Support changing PostgreSQL user
  • Description updated (diff)
  • Category set to Foreman modules
  • translation missing: en.field_release deleted (175)

The default configuration relies on ident authentication, so this would probably be incompatible with changing the role name.

Actions #2

Updated by Anonymous almost 7 years ago

  • Status changed from New to Rejected

out of scope.

Actions

Also available in: Atom PDF