Project

General

Profile

Actions

Bug #36258

closed

Installation of multiple errata failed because of reg-exp

Added by Bernhard Suttner about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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.)

Actions #1

Updated by David Hämmerle almost 2 years ago

Workaround using json: `--inputs '{"errata":"ERRATA1,ERRATA2"}'`

Actions #2

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
Actions #3

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
Actions #4

Updated by Oleh Fedorenko almost 2 years ago

  • Bugzilla link set to 2218930
Actions #5

Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases hammer-cli-3.8.0 added
Actions #6

Updated by Oleh Fedorenko almost 2 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF