Closed benblasco closed 1 year ago
The problem can be found in line 391 of the attached log rhelconfigure_log:
"rhsm_baseurl": "",
Please also note that the issue has been tested against the following collection versions (as discussed with @ptoscano )
[bblasco@opti rhel]$ ansible-galaxy collection list | grep general
community.general 7.2.0
community.general 6.6.2
community.general 6.6.0
[bblasco@opti rhel]$ ansible-galaxy collection list | grep fedora
fedora.linux_system_roles 1.44.0
fedora.linux_system_roles 1.46.0
I have also verified the issue in 1.50.0 which was released today.
In case it is necessary, the credentials I am passing to the role look like:
---
rhn_username: <USER>
rhn_password: <PASSWORD>
organization_id: <ORG_ID>
activation_key: <AK>
Actual values above redacted for security reasons.
Is there a workaround? Can you pass in the actual url for rhsm_baseurl
, or some other value?
@richm Yes I have just tested your proposed work-around successfully.
Config change:
rhc_baseurl: "https://cdn.redhat.com/"
Result:
[bblasco@rhel91 ~]$ sudo grep base /etc/yum.repos.d/redhat.repo |head
baseurl = https://cdn.redhat.com/content/dist/middleware/rhosds/3.0/x86_64/os
baseurl = https://cdn.redhat.com/content/e4s/rhel9/$releasever/x86_64/sap-solutions/debug
baseurl = https://cdn.redhat.com/content/aus/rhel9/$releasever/x86_64/sat-client/6/source/SRPMS
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/dirsrv/12.3/source/SRPMS
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/cert/1/os
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/fast-datapath/os
baseurl = https://cdn.redhat.com/content/dist/rhel/atomic/7/7Server/$basearch/cdk/3.5/source/SRPMS
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/rhv-tools/4/debug
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/network-observability/1/debug
baseurl = https://cdn.redhat.com/content/dist/rhel9/$releasever/x86_64/sap/os
Ops, apologies for the regression: I forgot that the variable actually exists, since it is provided in defaults/main.yml
. The regression is there since 1.2.0.
Hopefully #127 should fix this.
Fix tested successfully. Thanks @richm @ptoscano
When using the role in its most basic configuration subscription-manager completes successfully, but sets
rhsm_baseurl
to "" instead of NULL. As a consequence software installations and otherdnf
operations cannot run successfully.Software installation error message (after rhc role run):
Cause of error above is that the
baseurl
is set incorrectly for every repository in /etc/yum.repos.d/redhat.repo:In the above, the prefix
https://cdn.redhat.com/
is missing from every baseurl. It should look like:I believe the issue may be caused by this commit: https://github.com/linux-system-roles/rhc/commit/b95a84e621bd98a74a5c57d5b76077895a7f71a0
The issue is that when the task
- name: Call subscription-manager
in tasks/subscription-manager.yml is called, it passes the parameter"rhsm_baseurl": ""
to the playbook. That value should be NULL, which I have confirmed by testing thecommunity.general.redhat_subscription
module in its own playbook. I have attached a run of my playbook that uses the rhc role to this case to prove that this is what is happening.The code I am testing with can be found here: https://github.com/benblasco/fedoralaptop/blob/master/rhel/rhelconfigure.yml