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.
Bug 1470242 - Discovery kexec does not work due to incorrect JSON format
Summary: Discovery kexec does not work due to incorrect JSON format
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-12 14:57 UTC by Roman Plevka
Modified: 2019-09-26 16:14 UTC (History)
3 users (show)

Fixed In Version: foreman_discovery-9.1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:11:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20290 0 High Closed Discovery kexec does not work due to incorrect JSON format 2020-01-14 21:43:52 UTC

Description Roman Plevka 2017-07-12 14:57:25 UTC
Description of problem:
The error is HTTP 500:

#<JSON::ParserError: 757: unexpected token at '{"comment"=>"WARNING: Both kernel and initram are not set in preview mode due to http://projects.theforeman.org/issues/19737", "kernel"=>"http://xxxx.redhat.com/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.3/x86_64/kickstart//images/pxeboot/vmlinuz", "initram"=>"http://xxxx.redhat.com/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.3/x86_64/kickstart//images/pxeboot/initrd.img", "append"=>"ks=http://xxxx.redhat.com/unattended/provision?token=6d999547-cxxx2&static=yes inst.ks.sendmac ip=192.168.100.13::192.168.100.1:255.255.255.0:::none nameserver=192.168.100.1 ksdevice=bootif BOOTIF=00-52-54-00-eb-8a-cd nomodeset ", "extra"=>["--args-linux"]}'>

Introduced by #19412 or #19732 where
old.becomes(Host::Discovered).kexec json.to_s

this creates string represantion of Ruby hash instead of valid JSON. This must be:
old.becomes(Host::Discovered).kexec json.to_json

Version-Release number of selected component (if applicable):
tfm-rubygem-foreman_discovery-9.1.1-1.fm1_15.el7sat.noarch
rubygem-smart_proxy_discovery-1.0.4-3.el7sat.noarch

Steps to Reproduce:
1. perform  pxless discovery (to force kexec instead of reboot):
- have a host (VM is fine) and load foreman discovery image
- make sure the facts are being sent to satellite successfully and the message: waiting for kexec appeared
[- alternatively, remaster the FDI to automatically send out the custom info]
* start monitoring production.log at this point
- after the host appears in Discovered hosts on satellite, try to provision it.
- there should be an err 500 on trying to kexec the host (the error is not visible in UI)
- UI creates the host host entity in the build mode, but the host is not being kexec-ed and thus never going to be provisioned.


Expected results:
kexec works jsut fine

Comment 2 Lukas Zapletal 2017-07-13 09:24:18 UTC
Blocker, upstream PR pending.

Comment 3 Satellite Program 2017-08-24 12:15:39 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20290 has been resolved.

Comment 4 Roman Plevka 2017-10-26 14:51:59 UTC
VERIFIED
on sat6.3.0-snap#20

kexec now works as expected, unblocking the whole pxless discovery-based provisioning.

Comment 5 Bryan Kearney 2018-02-21 17:11:23 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-2018:0336


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