Project

General

Profile

Actions

Bug #11880

closed

[BUG] updating multiple puppet-classes to hostgroup via hammer fails to update the hostgroup

Added by Marek Hulán about 9 years ago. Updated over 8 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1264163
Description of problem:
updating multiple puppet-classes to hostgroup via hammer fails to update the hostgroup

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a hostgroup and try adding puppet classes to it via hammer.
2. As per hammer --help options, multiple classes can be uploaded using below option:
----
  1. hammer hostgroup update --help
    :
    :
    --puppet-classes PUPPET_CLASS_NAMES Comma separated list of values.
    ----
3. when trying to upload multiple classes using a comma to separate list:
----
  1. hammer hostgroup update --name "hostgroup1" --puppet-classes 'motd,apache'
    Could not update the hostgroup:
    Error: one of puppetclasses not found
    ----

4. When trying to upload multiple classes using a SPACE to separate list completes successfully but the hostgroup is not updated:
----
$ hammer hostgroup update"hostgroup1" --puppet-classes 'motd apache'
Hostgroup updated
----

Actual results:
The command fails if the list is separated with comma as mentioned in the hammer help.

And when list is separated using SPACE the message shows that it was successful. But the hostgroup is not updated:
----
$ hammer hostgroup info --name "hostgroup1"
Id: 1
Name: hostgroup1
Title: hostgroup1
Operating System:
Environment: KT_Default_Organization_Library_Testaladke_8
Model:
Subnet:
Domain:
Architecture:
Partition Table:
Medium:
Puppet CA Proxy Id:
Puppet Master Proxy Id:
ComputeProfile:
Puppetclasses:

Parameters:

Organizations:
Redhat
Parent Id:
----

Expected results:

The hostgroup should be updated with the puppet classes.

Additional info:

Using puppet ids separated using comma works:
---
  1. hammer hostgroup update --name "hostgroup1" --puppet-class-ids 2,1,7
    Hostgroup updated
    ---

Related issues 2 (0 open2 closed)

Has duplicate Hammer CLI - Bug #12444: Can not assign multiple puppet classes to a hostgroupDuplicate11/11/2015Actions
Has duplicate Hammer CLI - Bug #13471: Error when updating puppet-classes for a single hostDuplicate01/29/2016Actions
Actions

Also available in: Atom PDF