Red Hat Bugzilla – 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
Last modified: 2018-08-31 11:19 EDT
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 Password: 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 production.log: ================ 2016-03-23 03:42:18 [app] [I] Started POST "/rhsm/consumers?owner=Default_Organization&activation_keys=ak_ostree" for 192.168.100.48 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: always Steps to Reproduce: 1. Provision atomic host 2. register it with satellite 3. 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:
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 -> https://github.com/Katello/puppet-certs/blob/master/templates/rhsm-katello-reconfigure.erb#L27 and on your atomic machine rerun -> "curl -s http://<sat>/pub/katello-rhsm-consumer | bash" and try registering.
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 -
Created redmine issue http://projects.theforeman.org/issues/14388 from this bug
Upstream bug component is Content Management
Should be fixed when https://github.com/Katello/katello/pull/5926 gets in
Moving to POST since upstream bug http://projects.theforeman.org/issues/14388 has been closed ------------- Partha Aji Applied in changeset commit:katello|5926f92b1a19397dd3f57f0d932221279c4d4180.
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.
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
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/RHBA-2016:1501