Bug #36258
closedInstallation of multiple errata failed because of reg-exp
Description
Using the hammer cli to install multiple errata fails:
[root@or hammer_cli-3.3.0]# hammer job-invocation create --feature katello_errata_install --inputs errata=ERRATA1,ERRATA2 --search-query "name=example.host"
Error: Option '--inputs': Value must be defined as a comma-separated list of key=value or valid JSON..
The errata job template expectes a "comma separated list of errata" like "Errata1,Errata" as "inputs":
https://github.com/Katello/katello/blob/master/app/views/foreman/job_templates/install_errata.erb#L10
Unfortuantely, a "," is not a valid "value" of the hammer cli:
https://github.com/theforeman/hammer-cli/blob/master/lib/hammer_cli/options/normalizers.rb#L54
Solution 1: fix the hammer cli somehow
Solution 2: use another way to separate multiple errata in the job-template. Possiblity is high, that "comma" is used in other job templates, too (restart_services template e.g.)
Updated by David Hämmerle almost 2 years ago
Workaround using json: `--inputs '{"errata":"ERRATA1,ERRATA2"}'`
Updated by Oleh Fedorenko almost 2 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
- Triaged changed from No to Yes
Updated by The Foreman Bot almost 2 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/374 added
Updated by The Foreman Bot almost 2 years ago
- Fixed in Releases hammer-cli-3.8.0 added
Updated by Oleh Fedorenko almost 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset b5e8b52dee9daaa1690886d24c27b2b2e8f9e0c0.