Bug 1700441
| Summary: | With no /etc/yum.repos.d no repo file is created after successful registration & attach, no log message or error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Martin Kolman <mkolman> |
| Component: | subscription-manager | Assignee: | Jiri Hnidek <jhnidek> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8.1 | CC: | csnyder, jhnidek, jsefler, jstavel, mkolman, redakkan, wpoteat |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | subscription-manager-1.27.9-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 01:38:37 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
Martin Kolman
2019-04-16 14:59:43 UTC
So this is still happening with subscription-manager-1.26.5-1.el8 - if /etc/yum.repos.d does not exist, it will not be created and attach will fail. [root@kvm-02-guest02 rhsm-scenarios]# rpm -qa | egrep 'subscription|cockpit'
cockpit-bridge-224.1-1.el8.x86_64
subscription-manager-cockpit-1.27.11-1.el8.noarch
python3-subscription-manager-rhsm-1.27.11-1.el8.x86_64
dnf-plugin-subscription-manager-1.27.11-1.el8.x86_64
subscription-manager-1.27.11-1.el8.x86_64
cockpit-system-224.1-1.el8.noarch
subscription-manager-initial-setup-addon-1.27.11-1.el8.x86_64
subscription-manager-plugin-ostree-1.27.11-1.el8.x86_64
cockpit-ws-224.1-1.el8.x86_64
cockpit-224.1-1.el8.x86_64
subscription-manager-migration-data-2.0.51-1.noarch
cockpit-packagekit-224.1-1.el8.noarch
subscription-manager-rhsm-certificates-1.27.11-1.el8.x86_64
subscription-manager-migration-1.27.11-1.el8.x86_64
[root@kvm-02-guest02 rhsm-scenarios]# mv /etc/yum.repos.d/ /etc/yum.repos.d.orig
[root@kvm-02-guest02 rhsm-scenarios]# subscription-manager register --username jstavel_stage_demo01 --password ********
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
CACHED_SYSPURPOSE: /var/lib/rhsm/cache/syspurpose.json
The system has been registered with ID: 2ebad4d3-5642-429b-9f1d-2a56082a5286
The registered system name is: kvm-02-guest02.lab.eng.rdu2.redhat.com
[root@kvm-02-guest02 rhsm-scenarios]# ls -al /etc | grep yum.repos
drwxr-xr-x. 2 root root 4096 7. srp 04.41 yum.repos.d.orig
If I use dbus call than the directory is created.
# Create new unix socket used for registration
echo "starting RegisterServer..."
dbus-send --system --print-reply --dest='com.redhat.RHSM1' \
'/com/redhat/RHSM1/RegisterServer' com.redhat.RHSM1.RegisterServer.Start string:"" > /root/register_server_output.txt
if [[ $? -eq 0 ]]
then
export my_addr=`cat /root/register_server_output.txt | gawk '/string/{ print $2 }' | sed 's/\"//g'`
fi
# Try to register
echo "registering..."
dbus-send --address=${my_addr} --print-reply --dest='com.redhat.RHSM1.Register' \
'/com/redhat/RHSM1/Register' com.redhat.RHSM1.Register.Register string:"" string:"jstavel_stage_demo01" \
string:"********" dict:string:string:"","" dict:string:string:"","" string:"" > /root/register_output.txt
if [[ $? -eq 0 ]]
then
echo "Registration sucess"
else
echo "Registration FAILED"
fi
echo "stoping RegisterServer..."
dbus-send --system --print-reply --dest='com.redhat.RHSM1' \
'/com/redhat/RHSM1/RegisterServer' com.redhat.RHSM1.RegisterServer.Stop string:"" > /dev/null
# Unregister
echo "unregistering..."
dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/Unregister' \
com.redhat.RHSM1.Unregister.Unregister dict:string:string:"","" string:"" > /dev/null
root@kvm-02-guest02 rhsm-scenarios]# ls -al /etc | grep yum.repos
drwxr-xr-x. 2 root root 6 7. srp 07.14 yum.repos.d
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 (subscription-manager bug fix and enhancement update), 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/RHBA-2020:4460 |