Bug 1320422 - Registering a atomic host with satellite server failed with validation error: Medium Atomic_media does not belong to RedHat 7.2 operating system
Summary: Registering a atomic host with satellite server failed with validation error:...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On:
Blocks: 1321771
TreeView+ depends on / blocked
Reported: 2016-03-23 08:01 UTC by Sachin Ghai
Modified: 2019-09-26 17:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 09:28:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 14388 None None None 2016-04-22 16:04:44 UTC
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Sachin Ghai 2016-03-23 08:01:31 UTC
Description of problem: 

I provisioned a atomic host via Satellite. Since I've synced rhel7 base OS as well as rhel 7.2 atomic ostree in same org, so when I tried to provision atomic host, it got failed due to bz1318743.

As a workaround, I didn't select content-source for provisioning atomic host. Host was provisioned successfully. 

Later, I tried to register the host with satellite server with and w/o activation-key and got following error:

-bash-4.2# subscription-manager register --org "Default_Organization"
Registering to: <sat_server>:443/rhsm
Username: admin
Environment: Library
Validation failed: Medium Atomic_media does not belong to RedHat 7.2 operating system

-bash-4.2# subscription-manager register --org "Default_Organization" --activationkey ak_ostree
Validation failed: Medium Atomic_media does not belong to RedHat 7.2 operating system


2016-03-23 03:42:18 [app] [I] Started POST "/rhsm/consumers?owner=Default_Organization&activation_keys=ak_ostree" for at 2016-03-23 03:42:18 -0400
2016-03-23 03:42:18 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-03-23 03:42:18 [app] [I]   Parameters: {"facts"=>"[FILTERED]", "installedProducts"=>[{"productName"=>"Red Hat Enterprise Linux Atomic Host", "arch"=>"x86_64", "version"=>"7", "productId"=>"271"}, {"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"7.1", "productId"=>"69"}], "type"=>"system", "name"=>"atomichost.idmqe.lab.eng.bos.redhat.com", "contentTags"=>["rhel-atomic-7", "rhel-atomic", "rhel-7", "rhel-7-server"], "owner"=>"Default_Organization", "activation_keys"=>"ak_ostree"}
2016-03-23 03:42:19 [app] [I] Import facts for 'atomichost.idmqe.lab.eng.bos.redhat.com' completed. Added: 106, Updated: 1, Deleted 0 facts
2016-03-23 03:42:19 [foreman-tasks/action] [E] Validation failed: Medium Atomic_media does not belong to RedHat 7.2 operating system (ActiveRecord::RecordInvalid)
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!'

Please note that before registering the host, I setup host with  katello-rhsm-consumer. And /etc/rhsm/rhsm.conf  was pointing to correct satellite server.

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

How reproducible:

Steps to Reproduce:
1. Provision atomic host
2. register it with satellite

Actual results:
[E] Validation failed: Medium Atomic_media does not belong to RedHat 7.2 operating system 

Expected results:
host should be registered successfully with server

Additional info:

Comment 2 Partha Aji 2016-03-28 21:30:24 UTC
Sachin I need you to try a couple of things here 
1) Paste your rhsm.conf here and "grep ostree /etc/rhsm/rhsm.conf" returns true.

2) https://bugzilla.redhat.com/show_bug.cgi?id=1318066 didn't make the last snap (I guess we didnt mark as high sev even though it was...) So the katello-rhsm-conusmer script will likely not set the correct URL.. I suggest you manually apply this change to your /var/www/html/pub/katello-rhsm-consumer -> 


and on your atomic machine rerun ->  "curl -s http://<sat>/pub/katello-rhsm-consumer | bash" and try registering.

Comment 5 Sachin Ghai 2016-03-29 08:17:49 UTC
I made changes as you suggested on line 27 in katello-rhsm-conusmer script. But no luck. Still getting

-bash-4.2# subscription-manager register --org="Default_Organization" --activationkey=ak_rhel7_atomic
Validation failed: Medium Atomic Media does not belong to RedHat 7.2 operating system

Comment 6 Partha Aji 2016-03-29 23:17:17 UTC
Created redmine issue http://projects.theforeman.org/issues/14388 from this bug

Comment 7 Bryan Kearney 2016-03-30 00:11:20 UTC
Upstream bug component is Content Management

Comment 8 Partha Aji 2016-03-30 22:54:53 UTC
Should be fixed when https://github.com/Katello/katello/pull/5926 gets in

Comment 9 Bryan Kearney 2016-04-01 20:14:16 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14388 has been closed
Partha Aji
Applied in changeset commit:katello|5926f92b1a19397dd3f57f0d932221279c4d4180.

Comment 10 Og Maciel 2016-04-06 20:34:27 UTC
For QE, you may want to look at https://github.com/Katello/katello/pull/5926#issuecomment-203667995 for more information as to what to expect to see when verifying this issue.

Comment 11 Sachin Ghai 2016-04-12 06:17:49 UTC
Verified with Satellite 6.2 snap7.1

I can register atomic host with satellite using katello-rhsm-consumer and with activation-key as below:

# subscription-manager register --org="Default_Organization" --activationkey=ak_atomic
The system has been registered with ID: dc5c5083-ebf0-488f-8a9f-e1443b7192b3 

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

Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

redhat.conf contains following:

[remote "rhel-atomic-host-ostree"]
url = https://cloud-qe-3.idmqe.lab.eng.bos.redhat.com/pulp/ostree/web/Default_Organization/Dev/cv_ostree/content/dist/rhel/atomic/7/7Server/x86_64/ostree/repo
gpg-verify = false
tls-client-cert-path = /etc/pki/entitlement/6139460787062692853.pem
tls-client-key-path = /etc/pki/entitlement/6139460787062692853-key.pem
tls-ca-path = /etc/rhsm/ca/katello-server-ca.pem

Manual register:
-bash-4.2# subscription-manager register --username admin --password changeme --org="Default_Organization"
Registering to: cloud-qe-3.idmqe.lab.eng.bos.redhat.com:443/rhsm
Environment: Library
The system has been registered with ID: cd4f72a5-0470-449e-8799-2b85fe72d984

Comment 13 errata-xmlrpc 2016-07-27 09:28:29 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.


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