Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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.
DescriptionJitendra Yejare
2018-06-18 10:35:48 UTC
Description of problem:
The virt-who json file is not being posted to satellite for creating virt-who hosts. The satellite returns '{"displayMessage":"undefined method `[]' for nil:NilClass","errors":["undefined method `[]' for nil:NilClass"]}'.
Version-Release number of selected component (if applicable):
satellite-6.4.0-9.beta.el7sat.noarch
How reproducible:
Always
Steps to Reproduce:
1. Create a json file containing host details to upload to satellite as virt-who hosts. (I attached my json file)
2. Send API call to satellite to upload the data in this json file.
# curl -k -X POST --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pem https://$SATHOST/rhsm/hypervisors -H "Content-Type: application/json" -d @"/tmp/temp.json"
Actual results:
The satelite is returning '{"displayMessage":"undefined method `[]' for nil:NilClass","errors":["undefined method `[]' for nil:NilClass"]}'.
Expected results:
Successfully created virt-who hosts as per json data.
Additional info:
2018-07-05T15:28:06 [E|bac|4cd3d] undefined method `[]' for nil:NilClass (NoMethodError)
| /home/vagrant/git/katello/app/lib/actions/katello/host/hypervisors.rb:29:in `block (2 levels) in parse_hypervisors'
| /home/vagrant/git/katello/app/lib/actions/katello/host/hypervisors.rb:25:in `map'
| /home/vagrant/git/katello/app/lib/actions/katello/host/hypervisors.rb:25:in `block in parse_hypervisors'
| /home/vagrant/git/katello/app/lib/actions/katello/host/hypervisors.rb:23:in `each'
| /home/vagrant/git/katello/app/lib/actions/katello/host/hypervisors.rb:23:in `parse_hypervisors'
candlepin changed the results from the hypervisor checkin to only include uuids for the 'unchanged' set of hypervisors results. This results in katello not being able to properly process the results and create the hypervisors in our db.
Candlepin will need to either revert some or all of that change, or katello will need to fetch all hypervisors from candlepin after each checkin, potentially increasing the checkin time.
Not clean to revert...
Changing component to candlepin. Dev, we need to address both sync and async responses in this. Given that we already have the name, uuid, and key while building the response, we'll make a DTO for this.
Verified!
@ Satellite 6.4 snap 14
Steps:
Ditto as per description.
Observations:
1. The virt-who hosts are being created on satellite as per json data.
2. Description like error is not observed.
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-2018:2927
Hello,
I am re-opening this bug because I have a customer who is facing this issue after upgrading to 6.4
logs:
==> /var/log/foreman/production.log <==
2019-01-09T11:28:39 [I|app|] Started POST "/rhsm/hypervisors/ACME?reporter_id=[FILTERED]&cloaked=False&env=Library" for 1.2.3.4 at XXXX-01-09 XX:XX:XX +0000
2019-01-09T11:28:39 [I|app|d2d11] Processing by Katello::Api::Rhsm::CandlepinProxiesController#async_hypervisors_update as JSON
2019-01-09T11:28:39 [I|app|d2d11] Parameters: {"reporter_id"=>"[FILTERED]", "cloaked"=>"False", "env"=>"Library", "owner"=>"ADMIN"}
2019-01-09T11:28:39 [I|app|d2d11] Current user: foreman_admin (administrator)
2019-01-09T11:28:39 [I|kat|d2d11] Authorized user admin(Admin User)
2019-01-09T11:28:39 [I|app|d2d11] Current user: admin (administrator)
2019-01-09T11:28:39 [I|app|d2d11] Current user: foreman_admin (administrator)
2019-01-09T11:28:39 [I|app|d2d11] Current user: admin (administrator)
2019-01-09T11:28:39 [I|app|d2d11] Completed 200 OK in 216ms (Views: 0.6ms | ActiveRecord: 23.8ms)
2019-01-09T11:28:40 [W|bac|d2d11] Polling failed, attempt no. 1, retrying in 0.5
2019-01-09T11:28:40 [W|bac|d2d11] undefined method `[]' for nil:NilClass (NoMethodError)
Mihir,
we're going to need more details around this. Can you find a traceback under monitor > Tasks > hypervisor update? Any traceback in production.log when the error occurs?
A foreman-debug might help
Description of problem: The virt-who json file is not being posted to satellite for creating virt-who hosts. The satellite returns '{"displayMessage":"undefined method `[]' for nil:NilClass","errors":["undefined method `[]' for nil:NilClass"]}'. Version-Release number of selected component (if applicable): satellite-6.4.0-9.beta.el7sat.noarch How reproducible: Always Steps to Reproduce: 1. Create a json file containing host details to upload to satellite as virt-who hosts. (I attached my json file) 2. Send API call to satellite to upload the data in this json file. # curl -k -X POST --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pem https://$SATHOST/rhsm/hypervisors -H "Content-Type: application/json" -d @"/tmp/temp.json" Actual results: The satelite is returning '{"displayMessage":"undefined method `[]' for nil:NilClass","errors":["undefined method `[]' for nil:NilClass"]}'. Expected results: Successfully created virt-who hosts as per json data. Additional info: