Hide Forgot
Description of problem: `syspurpose show` fails with '[Errno -2] Name or service not known" when host is unreachable on both registered and unregistered systems Version-Release number of selected component (if applicable): subscription-manager: 1.24.2-1.git.142.1f459b1.el8 How reproducible: Always Steps to Reproduce: On a unregistered system ======================== 1 set some values for syspurpose ex: # cat /etc/rhsm/syspurpose/syspurpose.json { "usage": "Production", "addons": [ "addon1", "addon2" ], "role": "foo" } 2.configure bad hostname in rhsm.conf # subscription-manager config --list | grep hostname hostname = bad-hostname.usersys.redhat.com 3.Execute `syspurpose show` On a registered system : ======================= # subscription-manager register Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: username Password: The system has been registered with ID: 9d28d39e-f27a-4171-92b1-81ab40693497 The registered system name is: dell-r730-001-guest13.dsal.lab.eng.rdu2.redhat.com [root@dell-r730-001-guest13 test]# syspurpose show { "addons": [ "addon2", "addon1" ], "role": "foo", "usage": "Production" } System purpose successfully sent to subscription management server. Configure host name to a bad name # subscription-manager config --list | grep hostname hostname = BADsubscription.rhsm.stage.redhat.com # syspurpose show [Errno -2] Name or service not known Actual results: # syspurpose show [Errno -2] Name or service not known Expected results: syspurpose show should display the values saved in the local system when host is not reachable on a unregistered system. Additional info: Notice that on registered system with a bad hostname the subscription-manager status continues to show the last known status [root@dell-r730-001-guest13 test]# subscription-manager status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Invalid Red Hat Enterprise Linux for x86_64 High Touch Beta: - Not supported by a valid subscription. System Purpose Status: Unknown
Let's log the name resolution error, and simply show what's in the file in this scenario.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.