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 1451410 - Atomic Host build needs rework to work with subscription manager in RHEL AH 7.4
Summary: Atomic Host build needs rework to work with subscription manager in RHEL AH 7.4
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rhel-server-atomic
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1464361 1464369 1465800 1466437 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 15:08 UTC by Michael Nguyen
Modified: 2021-01-15 07:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-15 07:36:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michael Nguyen 2017-05-16 15:08:13 UTC
Description of problem:
This is a tracking bug.  In 7.4 subscription manager no longer touches the origin file.  The Atomic Host build needs to be reworked to work with the subman changes.

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

How reproducible:
Always

Steps to Reproduce:
1. Boot RHEL Atomic Host 7.4
2. Subscribe
3. atomic host upgrade

Actual results:
error: origin unconfigured-state: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.


Expected results:
Subscription is successful and Red Hat content is accessible

Additional info:
See: https://trello.com/c/7N8t3fuY/593-3-tweak-rhelah-build-process-for-new-subman-and-verify


[root@rhelah ~]# rpm-ostree status
State: idle
Deployments:
● custom:rhel-atomic-host/7/x86_64/standard
             Version: 7.4.0 (2017-04-28 00:37:19)
              Commit: a235ce70ad4f5b7306d995e1f92308f535d1723e520cb3f6d853005cbebab081
              OSName: rhel-atomic-host
[root@rhelah ~]# cat /ostree/deploy/rhel-atomic-host/deploy/a235ce70ad4f5b7306d995e1f92308f535d1723e520cb3f6d853005cbebab081.0.origin 
[origin]
refspec=custom:rhel-atomic-host/7/x86_64/standard
unconfigured-state=This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
[root@rhelah ~]# subscription-manager register --auto-attach --force --serverurl=***** --baseurl=*****  --username=***** --password=*****
Registering to: *****/subscription
The system has been registered with ID: 8ee1503e-136a-48ec-97bf-e5071060daf5 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Atomic Host
Status:       Subscribed

Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@rhelah ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current
[root@rhelah ~]# cat /ostree/deploy/rhel-atomic-host/deploy/a235ce70ad4f5b7306d995e1f92308f535d1723e520cb3f6d853005cbebab081.0.origin 
[origin]
refspec=custom:rhel-atomic-host/7/x86_64/standard
unconfigured-state=This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
[root@rhelah ~]# atomic host upgrade
error: origin unconfigured-state: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

[root@rhelah ~]# rpm -qa | grep subscription
subscription-manager-plugin-ostree-1.19.9-1.el7.x86_64
subscription-manager-1.19.9-1.el7.x86_64
subscription-manager-plugin-container-1.19.9-1.el7.x86_64

Comment 3 Jon Disnard 2017-05-19 21:21:09 UTC
The changes in comment #2 into installer-post.ks seem to cause the rpm-ostree-toolbox throw a traceback while generating an install_tree.

"""
(686/687) [100%] installing iwl3945-firmware-15.32.2.9-52.el7.noarch
(687/687) [100%] installing iwl7260-firmware-22.0.7.0-52.el7.noarch
2017-05-19 20:42:58,779: plymouth.x86_64 0:0.8.9-0.26.20140113.el7 - u scriptlet output:
2661 blocks

plymouth.x86_64 0:0.8.9-0.26.20140113.el7 - u scriptlet output:
2661 blocks

2017-05-19 20:44:01,394: kernel.x86_64 0:3.10.0-663.el7 - i scriptlet output:
No '/dev/log' or 'logger' included for syslog logging

kernel.x86_64 0:3.10.0-663.el7 - i scriptlet output:
No '/dev/log' or 'logger' included for syslog logging

Traceback (most recent call last):
  File "/usr/sbin/lorax", line 337, in <module>
    main(sys.argv)
  File "/usr/sbin/lorax", line 235, in main
    remove_temp=True)
  File "/usr/lib/python2.7/site-packages/pylorax/__init__.py", line 259, in run
    rb.install()
  File "/usr/lib/python2.7/site-packages/pylorax/treebuilder.py", line 116, in install
    self._runner.run(tmpl, **self.add_template_vars)
  File "/usr/lib/python2.7/site-packages/pylorax/ltmpl.py", line 181, in run
    commands = t.parse(templatefile, variables)
  File "/usr/lib/python2.7/site-packages/pylorax/ltmpl.py", line 50, in parse
    template = lookup.get_template(template_file)
  File "/usr/lib/python2.7/site-packages/mako/lookup.py", line 245, in get_template
    return self._load(srcfile, uri)
  File "/usr/lib/python2.7/site-packages/mako/lookup.py", line 311, in _load
    **self.template_args)
  File "/usr/lib/python2.7/site-packages/mako/template.py", line 321, in __init__
    module = self._compile_from_file(path, filename)
  File "/usr/lib/python2.7/site-packages/mako/template.py", line 399, in _compile_from_file
    filename)
  File "/usr/lib/python2.7/site-packages/mako/template.py", line 647, in _compile_text
    generate_magic_comment=template.disable_unicode)
  File "/usr/lib/python2.7/site-packages/mako/template.py", line 628, in _compile
    node = lexer.parse()
  File "/usr/lib/python2.7/site-packages/mako/lexer.py", line 232, in parse
    if self.match_expression():
  File "/usr/lib/python2.7/site-packages/mako/lexer.py", line 395, in match_expression
    lineno=line, pos=pos)
  File "/usr/lib/python2.7/site-packages/mako/lexer.py", line 132, in append_node
    node = nodecls(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mako/parsetree.py", line 180, in __init__
    self.code = ast.PythonCode(text, **self.exception_kwargs)
  File "/usr/lib/python2.7/site-packages/mako/ast.py", line 37, in __init__
    expr = pyparser.parse(code.lstrip(), "exec", **exception_kwargs)
  File "/usr/lib/python2.7/site-packages/mako/pyparser.py", line 60, in parse
    ), **exception_kwargs)
mako.exceptions.SyntaxException: (SyntaxError) invalid syntax (<unknown>, line 1) (u'ostree_remote:-') in file '/root/lorax.tmpl' at line: 15 char: 779
Traceback (most recent call last):
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose-main", line 75, in <module>
    main()
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose-main", line 59, in main
    installer.main(cmd)
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/installer.py", line 232, in main
    composer.create(post=args.post)
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/taskbase.py", line 484, in create
    self.impl_create(**kwargs)
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/installer.py", line 187, in impl_create
    run_sync(dr_cmd, env=child_env)
  File "/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/utils.py", line 36, in run_sync
    subprocess.check_call(args, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'run', '--rm', '--workdir', '/out', '--net=host', '--privileged=true', '-v', '/data/GA.staging/Atomic-7.4-20170519.0/x86_64/install_tree/work:/out', 'registry.access.redhat.com/rhel72/rpmostree-toolbox-lorax']' returned non-zero exit status 1
"""

Comment 4 Jon Disnard 2017-05-19 22:12:38 UTC
We got it fixed after an update to the instaler-post.ks

Comment 7 Micah Abbott 2017-06-19 19:14:58 UTC
After booting the most recent 7.4 cloud image (rhel-atomic-cloud-7.4.0-5.x86_64.qcow2) which corresponds to the ostree commit 0b62181fb3, the system ends up with two specifications for the 'rhel-atomic-host-ostree' remote.


# ostree remote list -u
rhel-atomic-host         http://download.eng.bos.redhat.com/devel/candidate-trees/latest-Atomic-7.4/x86_64/ostree/repo/
rhel-atomic-host-ostree  file:///install/ostree/repo

# cat /etc/ostree/remotes.d/rhel-atomic-host{,-ostree}.conf
[remote "rhel-atomic-host"]
url=http://download.eng.bos.redhat.com/devel/candidate-trees/latest-Atomic-7.4/x86_64/ostree/repo/
gpg-verify=false
[remote "rhel-atomic-host-ostree"]
# This remote configuration is just a stub; use subscription-manager or
# a local mirror of the repository.
url=file:///install/ostree/repo

# subscription-manager register  
Registering to: subscription.rhn.stage.redhat.com:443/subscription
The system has been registered with ID: df769f40-c5b2-434f-959b-e483825dc443 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Atomic Host
Status:       Subscribed

Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

# ostree remote list -u                                                                                                                                                            
error: Multiple specifications found for remote "rhel-atomic-host-ostree"

# ls /etc/ostree/remotes.d/
redhat.conf  rhel-atomic-host.conf  rhel-atomic-host-ostree.conf

# cat /etc/ostree/remotes.d/redhat.conf 
[remote "rhel-atomic-host-ostree"]
url = https://cdn.redhat.com/content/dist/rhel/atomic/7/7Server/x86_64/ostree/repo
gpg-verify = false
tls-client-cert-path = /etc/pki/entitlement/2042810464506967397.pem
tls-client-key-path = /etc/pki/entitlement/2042810464506967397-key.pem
tls-ca-path = /etc/rhsm/ca/redhat-uep.pem



Just putting this out there as an FYI.

Comment 11 Colin Walters 2017-06-23 13:02:22 UTC
*** Bug 1464369 has been marked as a duplicate of this bug. ***

Comment 12 Colin Walters 2017-06-23 13:02:57 UTC
*** Bug 1464361 has been marked as a duplicate of this bug. ***

Comment 14 Alex Jia 2017-06-28 07:00:36 UTC
[root@atomic-host-test cloud-user]# atomic host status
State: idle
Deployments:
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-27 16:55:35)
                 Commit: 13b30690b7573d0749bf15d0e60394a5ee939a70f5272f4982fa29209042e7ad
           GPGSignature: 1 signature
                         Signature made Tue 27 Jun 2017 04:59:28 PM UTC using RSA key ID 199E2F91FD431D51
                         Good signature from "Red Hat, Inc. <security>"

[root@atomic-host-test cloud-user]# ls /etc/ostree/remotes.d/
redhat.conf  rhel-atomic-host-ostree.conf

Comment 15 Alex Jia 2017-06-28 09:23:43 UTC
*** Bug 1465800 has been marked as a duplicate of this bug. ***

Comment 16 Colin Walters 2017-06-29 15:19:24 UTC
*** Bug 1466437 has been marked as a duplicate of this bug. ***

Comment 17 Micah Abbott 2017-06-30 13:59:24 UTC
Latest compose also has two deployments/commits listed when booting a QCOW2 cloud image for the first time:

# atomic host status
State: idle
Deployments:
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-27 16:55:35)
                 Commit: 13b30690b7573d0749bf15d0e60394a5ee939a70f5272f4982fa29209042e7ad

● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-27 16:55:35)
                 Commit: 13b30690b7573d0749bf15d0e60394a5ee939a70f5272f4982fa29209042e7ad



Side-effect of having multiple remotes defined in /etc/ostree/remotes.d/  perhaps?

Comment 19 Micah Abbott 2017-07-03 18:30:53 UTC
The findings in comment #1 still exist in the latest 7.4 compose.

I started with a system at 7.3.6 and then rebased to the the latest 7.4 compose.  I ran our automated sanity test against it and they failed because the 'unconfigured-state' line remains in the origin file.


# atomic host status 
State: idle
Deployments:
● 7.4_latest:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-30 18:37:40)
                 Commit: 8018f95c2f2f38a79e68f174dd5888b53769c0e4adcd89c87a802219091c9d0e
           GPGSignature: 1 signature
                         Signature made Fri 30 Jun 2017 06:59:48 PM UTC using RSA key ID 199E2F91FD431D51
                         Good signature from "Red Hat, Inc. <security>"
               Unlocked: hotfix

  7.4_latest:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-30 18:37:40)
                 Commit: 8018f95c2f2f38a79e68f174dd5888b53769c0e4adcd89c87a802219091c9d0e
           GPGSignature: 1 signature
                         Signature made Fri 30 Jun 2017 06:59:48 PM UTC using RSA key ID 199E2F91FD431D51
                         Good signature from "Red Hat, Inc. <security>"

# rpm-ostree install httpd
error: origin unconfigured-state: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

# cat $(ostree admin --print-current-dir).origin
[origin]
refspec=7.4_latest:rhel-atomic-host/7/x86_64/standard
unconfigured-state=This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
unlocked=hotfix

Comment 20 Colin Walters 2017-07-05 13:32:44 UTC
Hmm...you did a subscription *after* the rebase?  Offhand, I don't think customers can hit that case since there's no rebasing for them, just upgrades.

Basically the vast majority of cases (and I think all customer ones) fall under:

1) Upgrading a subscribed system
2) Fresh 7.4 cloud images or ISO installs

But we should fix this anyways; it's going to crop up in various ways.

Comment 21 Micah Abbott 2017-07-05 13:51:44 UTC
(In reply to Colin Walters from comment #20)
> Hmm...you did a subscription *after* the rebase?  Offhand, I don't think
> customers can hit that case since there's no rebasing for them, just
> upgrades.

Yeah, that was a side-effect of running the sanity tests (I think).

If I subscribe, rebase, then try to 'rpm-ostree install'...all is well.

Comment 22 Colin Walters 2017-07-05 15:13:24 UTC
Let's change the tests to do the sed in
https://github.com/projectatomic/rpm-ostree/issues/232#issue-140188132
?

Comment 24 RHEL Program Management 2021-01-15 07:36:08 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.