Bug 1421867

Summary: rpm-ostree daemon does not start when system is unsubscribed
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: rpm-ostree-clientAssignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: lfriedma, mjenner
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-02 22:39:44 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 Micah Abbott 2017-02-13 22:16:05 UTC
Using the cloud image from the pending 7.3.3 RHELAH release, it was observed that users were unable to use 'atomic host status'.  Neither privileged or unprivileged users were successful.

$ atomic host status
error: No such interface 'org.projectatomic.rpmostree1.Sysroot' on object at path /org/projectatomic/rpmostree1/Sysroot
$ sudo atomic host status
error: The name :1.15 was not provided by any .service files


Inspection of the service and journal shows the following:

$ systemctl status rpm-ostreed.service 
● rpm-ostreed.service - OSTree+RPM package management daemon
   Loaded: loaded (/usr/lib/systemd/system/rpm-ostreed.service; static; vendor preset: disabled)
   Active: inactive (dead)

Feb 13 22:05:51 rhel-atomic-7.2-test systemd[1]: Starting OSTree+RPM package management daemon...
Feb 13 22:05:51 rhel-atomic-7.2-test rpm-ostreed[7477]: rpm-ostreed starting
Feb 13 22:05:51 rhel-atomic-7.2-test rpm-ostreed[7477]: Couldn't start daemon: Error setting up sysroot: origin unconfigured-state: This system is not registered to Red Hat Subscription Managemen... to register.
Feb 13 22:05:51 rhel-atomic-7.2-test systemd[1]: Started OSTree+RPM package management daemon.
Feb 13 22:05:51 rhel-atomic-7.2-test rpm-ostreed[7477]: rpm-ostreed exiting
Feb 13 22:06:24 rhel-atomic-7.2-test systemd[1]: Starting OSTree+RPM package management daemon...
Feb 13 22:06:24 rhel-atomic-7.2-test rpm-ostreed[11973]: rpm-ostreed starting
Feb 13 22:06:24 rhel-atomic-7.2-test rpm-ostreed[11973]: Couldn't start daemon: Error setting up sysroot: origin unconfigured-state: This system is not registered to Red Hat Subscription Manageme... to register.
Feb 13 22:06:24 rhel-atomic-7.2-test rpm-ostreed[11973]: rpm-ostreed exiting
Feb 13 22:06:24 rhel-atomic-7.2-test systemd[1]: Started OSTree+RPM package management daemon.
Hint: Some lines were ellipsized, use -l to show in full.
 

The culprit (IMO):

rpm-ostreed[7477]: Couldn't start daemon: Error setting up sysroot: origin unconfigured-state: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.



This will be a problem for users that have freshly installed a VM but have not yet registered with subscription-manager.

We did not see this in our upgrade testing, because the system was already registered prior to performing the upgrade from 7.3.2 to 7.3.3.


This is a regression and a blocker.

Comment 2 Micah Abbott 2017-02-13 22:18:23 UTC
$ rpm -q rpm-ostree-client ostree
rpm-ostree-client-2017.1-3.atomic.el7.x86_64
ostree-2017.1-2.atomic.el7.x86_64

Comment 3 Colin Walters 2017-02-13 22:20:37 UTC
Ug.  Yes, this is likely to be due to changes in the daemon for parsing the sysroot state.

Comment 4 Colin Walters 2017-02-13 22:22:50 UTC
Two things to improve:

 - The autobrew stream being broken for ENOSPC for a while and us not consistently watching the results
 - Upstream tests don't currently have coverage of this special unsubscribed state

Comment 5 Colin Walters 2017-02-13 22:25:44 UTC
I'll work on this tonight.

Comment 6 Colin Walters 2017-02-14 02:15:24 UTC
https://github.com/projectatomic/rpm-ostree/pull/626

Comment 7 Micah Abbott 2017-02-14 15:44:35 UTC
(In reply to Colin Walters from comment #4)
> Two things to improve:
> 
>  - The autobrew stream being broken for ENOSPC for a while and us not
> consistently watching the results

Agreed.  Need a better way of getting nagged when the builds fail.

>  - Upstream tests don't currently have coverage of this special unsubscribed
> state

https://trello.com/c/6o9me2xB/654-3-add-test-for-running-rpm-ostreed-on-unsubscribed-system

Comment 9 Micah Abbott 2017-02-15 18:16:36 UTC
This is fixed with rpm-ostree-client-2017.1-6.atomic.el7.x86_64

Comment 11 errata-xmlrpc 2017-03-02 22:39:44 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://access.redhat.com/errata/RHSA-2017:0444