Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1981883 - Enabling katello-agent installer flag fails with error `could not find user qdrouterd`, and flag still set as true
Summary: Enabling katello-agent installer flag fails with error `could not find user q...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks: 1945534
TreeView+ depends on / blocked
 
Reported: 2021-07-13 16:08 UTC by Jitendra Yejare
Modified: 2022-07-19 16:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-09 19:07:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jitendra Yejare 2021-07-13 16:08:19 UTC
Description of problem:
In 6.10, the katello-agent is disabled by default but to enable katello agent, one needs to run satellite installer with foreman-proxy-content-enable-katello-agent flag set to true.

Enabling this flag is failing with error:
```
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Client/Certs::Keypair[qpid_router_client]/File[/etc/pki/katello/qpid_router_client.crt]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
```

Version-Release number of selected component (if applicable):
Satellite 6.10 snap 8.0

How reproducible:
Always

Steps to Reproduce:
1. Install fresh satellite 6.10
2. Observe katello-agent plugin is disabled by default in Satellite.
3. Attempt to enable the same by running satellite-installer as below:
# satellite-installer --scenario satellite  --foreman-proxy-content-enable-katello-agent true

Actual results:
The installer fails with error:
```
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Client/Certs::Keypair[qpid_router_client]/File[/etc/pki/katello/qpid_router_client.crt]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
```

Expected results:
1. Satellite installer succeeds.
2. The katello agent plugin is installed successfully.
2. The qpid is configured.

Entire Stacktrace:
```
# satellite-installer --scenario satellite  --foreman-proxy-content-enable-katello-agent true
2021-07-13 11:56:11 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-07-13 11:56:17 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-07-13 11:56:17 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
Package versions are locked. Continuing with unlock.
2021-07-13 11:56:32 [NOTICE] [configure] Starting system configuration.
2021-07-13 11:56:47 [NOTICE] [configure] 250 configuration steps out of 2120 steps complete.
2021-07-13 11:56:48 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install qpid-tools' returned 1: Error: Nothing to do
2021-07-13 11:56:48 [ERROR ] [configure] /Stage[main]/Qpid::Tools/Package[qpid-tools]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install qpid-tools' returned 1: Error: Nothing to do
2021-07-13 11:56:49 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-server' returned 1: Error: Nothing to do
2021-07-13 11:56:49 [ERROR ] [configure] /Stage[main]/Qpid::Install/Package[qpid-cpp-server]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-server' returned 1: Error: Nothing to do
2021-07-13 11:56:50 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-client' returned 1: Error: Nothing to do
2021-07-13 11:56:50 [ERROR ] [configure] /Stage[main]/Qpid::Install/Package[qpid-cpp-client]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-client' returned 1: Error: Nothing to do
2021-07-13 11:56:50 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install cyrus-sasl-plain' returned 1: Error: Nothing to do
2021-07-13 11:56:50 [ERROR ] [configure] /Stage[main]/Qpid::Install/Package[cyrus-sasl-plain]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install cyrus-sasl-plain' returned 1: Error: Nothing to do
2021-07-13 11:56:51 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-server-linearstore' returned 1: Error: Nothing to do
2021-07-13 11:56:51 [ERROR ] [configure] /Stage[main]/Qpid::Install/Package[qpid-cpp-server-linearstore]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install qpid-cpp-server-linearstore' returned 1: Error: Nothing to do
2021-07-13 11:56:53 [ERROR ] [configure] Execution of '/bin/yum -d 0 -e 0 -y install qpid-dispatch-router' returned 1: Error: Nothing to do
2021-07-13 11:56:53 [ERROR ] [configure] /Stage[main]/Qpid::Router::Install/Package[qpid-dispatch-router]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install qpid-dispatch-router' returned 1: Error: Nothing to do
2021-07-13 11:57:23 [NOTICE] [configure] 500 configuration steps out of 2120 steps complete.
2021-07-13 11:57:23 [NOTICE] [configure] 750 configuration steps out of 2122 steps complete.
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Server/Certs::Keypair[qpid_dispatch_server]/File[/etc/pki/katello/qpid_router_server.key]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Server/Certs::Keypair[qpid_dispatch_server]/File[/etc/pki/katello/qpid_router_server.crt]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Client/Certs::Keypair[qpid_router_client]/File[/etc/pki/katello/qpid_router_client.key]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] Could not find user qdrouterd
2021-07-13 11:57:28 [ERROR ] [configure] /Stage[main]/Certs::Qpid_router::Client/Certs::Keypair[qpid_router_client]/File[/etc/pki/katello/qpid_router_client.crt]/owner: change from 'root' to 'qdrouterd' failed: Could not find user qdrouterd
2021-07-13 11:57:28 [NOTICE] [configure] 1000 configuration steps out of 2127 steps complete.
2021-07-13 11:57:28 [NOTICE] [configure] 1250 configuration steps out of 2131 steps complete.
2021-07-13 11:58:34 [NOTICE] [configure] 1500 configuration steps out of 2132 steps complete.
2021-07-13 11:58:35 [NOTICE] [configure] 1750 configuration steps out of 2132 steps complete.
2021-07-13 11:58:35 [NOTICE] [configure] 2000 configuration steps out of 2132 steps complete.
2021-07-13 11:58:48 [NOTICE] [configure] System configuration has finished.

  There were errors detected during install.
  Please address the errors and re-run the installer to ensure the system is properly configured.
  Failing to do so is likely to result in broken functionality.

  The full log is at /var/log/foreman-installer/satellite.log
Package versions are being locked.
```

Comment 1 Jitendra Yejare 2021-07-13 16:15:11 UTC
Needs to document that katello-agent has to be enabled explicitly in 6.10!

Comment 2 Eric Helms 2021-07-13 16:22:21 UTC
The problem is the yum errors in the output. Can you double check what repositories are enabled?

Comment 3 Jitendra Yejare 2021-07-14 09:03:54 UTC
@ehelms 

You are right here! My satellite setup had repositories enabled earlier during installation and later it has been removed as part of the teardown process in Ansible Tower!

I enabled it and ran the installer again to enable the katello agent and it just works fine!

Closing this bug as NOTABUG.

Comment 4 Gaurav Talreja 2021-07-27 07:28:34 UTC
Hi,


I also hit the same error as mentioned in the description, when no repos enabled on a system, but even after installer failure `--foreman-proxy-content-enable-katello-agent` is set to true, which shouldn't be set I believe.

And if it is set to true, so this causes katello-agent to fail while performing host operations like,

# hammer host package install --packages zsh --host-id 5
This command uses katello agent and will be removed in favor of remote execution in a future release.
The remote execution equivalent is `hammer job-invocation create --feature katello_package_install`.
[................................................................................................................................] [100%]
Error: Connection refused - connect(2) for "localhost" port 5671


so reopening this BZ for the installer, let me know here or in chat if any details are required.


Thanks, 
Gaurav

Comment 5 Eric Helms 2021-07-27 15:44:30 UTC
I don't follow the issue here. You cannot enable katello-agent with no repositories configured. That will fail and is expected to fail as it throws errors with missing packages. I still recommend this be closed notabug.

Comment 6 Gaurav Talreja 2021-08-06 06:32:04 UTC
Yes true, it is expected to fail when no repositories are configured and it throws the right errors for missing packages, but even after failure in enabling, a flag is being set to TRUE, which shouldn't be set I believe.

Comment 7 Eric Helms 2021-08-06 13:54:11 UTC
The user has set it to 'true' indicating what they want to happen, the flag in this case does not indicate the state of the system but rather the desire of the user. Our installer does not unset a users input if something fails, there is no rollback on failure. The user would need to fix the problem, in this case repositories missing, and then re-run the installer so that they get a successful run. This should be the case for anything the user does with the installer.


Note You need to log in before you can comment on or make changes to this bug.