Bug 1272980 - Can't set array parameters to hosts
Can't set array parameters to hosts
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: --
Assigned To: Tomas Strachota
Jitendra Yejare
: Triaged
Depends On:
Blocks: 1272979
  Show dependency treegraph
Reported: 2015-10-19 06:46 EDT by Tomas Strachota
Modified: 2016-07-27 07:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 07:17:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
[Verified] Screenshot Attached (125.40 KB, image/png)
2016-04-25 09:00 EDT, Jitendra Yejare
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 10547 None None None 2016-04-22 12:05 EDT

  None (edit)
Description Tomas Strachota 2015-10-19 06:46:44 EDT
hammer host update --id 26 --parameters 'servers=["time.apple.com","pool.ntp.org"]'
Could not update the host:
  undefined method `strip!' for ["a", "b"]:Array

The error happens on api side because hammer sends array object in value of the parameter instead of expected string.
Comment 1 Tomas Strachota 2015-10-19 06:46:45 EDT
Created from redmine issue http://projects.theforeman.org/issues/10547
Comment 2 Tomas Strachota 2015-10-19 06:46:50 EDT
Upstream bug assigned to tstrachota@redhat.com
Comment 4 Bryan Kearney 2015-10-19 08:01:59 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/10547 has been closed
Applied in changeset commit:hammer-cli-foreman|1a31a19778c3d687aee0f387691305c3afca5c58.
Comment 8 Jitendra Yejare 2016-04-25 09:00 EDT
Created attachment 1150462 [details]
[Verified] Screenshot Attached
Comment 9 Jitendra Yejare 2016-04-25 09:00:54 EDT
Verified in Sat 6.2 snap 9.2

The issue is not repro and so fixed. No error is thrown as mentioned in Description.

# hammer host update --id 5 --parameters 'servers=["time.apple.com","pool.ntp.org"]'
Host updated

# hammer host update --id 5 --parameters 'targets=[5,6]'
Host updated

Verified from UI as well. [Screenshot Attached]

Moving to Verified.
Comment 10 Bryan Kearney 2016-07-27 07:17:50 EDT
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.