Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1138939

Summary: rhnsd should start correctly and then not do anything if the system is not registered to Satellite. It should not fail to start.
Product: Red Hat Enterprise Linux 7 Reporter: John Fulton <johfulto>
Component: rhnsdAssignee: Jan Dobes <jdobes>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: bugproxy, cperry, dyordano, ggainey, hannsj_uhl, hvyas, jdobes, jhutar, john, lmiksik, msvistun
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhnsd-5.0.13-5.el7 Doc Type: Bug Fix
Doc Text:
Previously, if the rhnsd service was unable to find a system ID file, the rhnsd.init script was exiting with an error. This update modifies rhnsd.init, which now exits gracefully.
Story Points: ---
Clone Of:
: 1139408 (view as bug list) Environment:
Last Closed: 2015-11-19 12:13:36 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:
Bug Depends On:    
Bug Blocks: 1118366, 1133060    
Attachments:
Description Flags
sosreport none

Description John Fulton 2014-09-06 14:36:53 UTC
Description of problem:

rhnsd, a program for querying the Red Hat Network, is enabled by default in a minimal install of RHEL7. Instances of this image may have a short life so assuming they will be registered on each boot may not make sense. 

On a side note, it's enabled also on a minimal install of RHEL7. Given the move away from RHN (https://access.redhat.com/rhn-to-rhsm) should a separate bug be filed to have it not run by default there too? 

Version-Release number of selected component (if applicable):

rhel-guest-image-7.0-20140618.1.x86_64.qcow2 with SHA-256 Checksum d3f6052b5b381f11a767d7918dfe2c75f68fb2d6508e0077ba9b70bc7941b522. 

How reproducible:

Deterministic. 

Steps to Reproduce:

* Download the image (https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.0/x86_64/product-downloads) 
* Boot it on RHEL-OSP4 or RHEL-OSP4
* View full console log 

Actual results:

rhnsd is enabled so it fails to start since the system in question is not registered to RHN / RHN Satellite. Is it reasonable to assume the instance will be registered to RHN / RHN Satellite? 

Expected results:

rhnsd should not be enabled by default on an instance.

Comment 1 John Fulton 2014-09-06 14:46:56 UTC
Apologies for my typo above. The first sentence should read:

rhnsd, a program for querying the Red Hat Network, is enabled by default on *our KVM image* ...

Comment 3 Stephen Herr 2014-09-08 14:31:32 UTC
1) If you want a service to not be enabled by default on your KVM image then you need to let whoever built your KVM image know, not the component owner of the package in question.

2) RHEL 7 guests can be registered to Satellite, so it is reasonable to have rhnsd enabled by default to support that case. Is this causing any problems at all besides a "failed to start" message in the boot log? If not I will close this as notABug

Comment 4 Stephen Herr 2014-09-08 14:35:50 UTC
(In reply to Stephen Herr from comment #3)
> Is this causing any problems
> at all besides a "failed to start" message in the boot log? If not I will
> close this as notABug

Actually I'm going to assume the answer is "no" and close it now. Feel free to reopen if there is an actual bug here.

Comment 5 Stephen Herr 2014-09-08 14:51:01 UTC
I take it back: there is a bug here.

rhnsd should start correctly and then not do anything if the system is not registered to Satellite. It should not fail to start. Re-opening.

Comment 6 John Fulton 2014-09-08 21:03:07 UTC
(In reply to Stephen Herr from comment #3)
> 1) If you want a service to not be enabled by default on your KVM image then
> you need to let whoever built your KVM image know, not the component owner
> of the package in question.

OK. I will clone this bug into a bug report for the component rhel-guest-image. 

I see you're keeping this bug for the reasons stated in comment #5 so I'm just going to edit the title accordingly.

Comment 7 Matej Kollar 2015-04-15 13:36:59 UTC
*** Bug 1189833 has been marked as a duplicate of this bug. ***

Comment 8 IBM Bug Proxy 2015-04-15 14:11:44 UTC
Created attachment 1014798 [details]
sosreport

Comment 9 Jan Dobes 2015-05-25 15:35:24 UTC
this behaviour is not new in RHEL7, it's caused by rhnsd init script lines 43-44:

RHN_SYSTEMID_FILE=`awk -F '=[[:space:]]*' '/^[[:space:]]*systemIdPath[[:space:]]*=/ {print $2}' $RHN_UP2DATE_FILE`

[ -f $RHN_SYSTEMID_FILE ] || exit 6

it just exits if typically '/etc/sysconfig/rhn/systemid' does not exist

Comment 10 Jan Dobes 2015-05-25 16:32:24 UTC
rhnsd itself checks systemid file again before each action, so it should work without checking in init script

Comment 11 Jan Dobes 2015-06-23 12:13:53 UTC
fixed in spacewalk master:

62080bbcb37b74ee2a21e4e381ddf0d4e809cd96

Comment 18 errata-xmlrpc 2015-11-19 12:13:36 UTC
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, 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://rhn.redhat.com/errata/RHBA-2015-2380.html