Project

General

Profile

Actions

Bug #6975

closed

Hammer does not work with nested hostgroups with same name

Added by Dominic Cleal over 9 years ago. Updated about 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
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=1127572
Description of problem:
Nested hostgroups that have the same name cannot be retrieved on hammer commandline. Specifying the full path/label does not work either:

  1. hammer -c /opt/hoici/etc/hammer-hoici.yaml --csv hostgroup list --per-page=9999 | grep Server
    48,Server,"",,,,41/46
    40,Server,"",,,,35/38
  2. hammer -c /opt/hoici/etc/hammer-hoici.yaml hostgroup info --name=Server
    Error: hostgroup found more than once
  3. hammer -c /opt/hoici/etc/hammer-hoici.yaml hostgroup info --name=prod/Stibo/Server
    Error: hostgroup not found

Secondly the list option does also not include the full path. The Label column is always empty

  1. hammer -c /opt/hoici/etc/hammer-hoici.yaml --csv hostgroup list
    Id,Name,Label,Operating System,Environment,Model,Ancestry
    52,crash,"",,,,""
    53,IPS,"",,,,52
    56,CITest,"",,,,52/53
    54,Satellite6,"",,,,52/53
    55,UserTest,"",,,,52/53
    41,dev,"",,,,""

To retrieve the full path

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

How reproducible:

Steps to Reproduce:
1. Create nested hostgroups with duplicate names
2. List hostgroups
3. Info of hostgroup, List/Add puppet classes to hostgroup, etc.

Actual results:

Expected results:
Hostgroup list shall provide Label as unique identifier
All actions on Hostgroups shall allow Label as hostgroup input.

Additional info:


Related issues 2 (0 open2 closed)

Related to Hammer CLI - Bug #6755: Parent host groups not shown clearly in hammer hostgroup listRejected07/23/2014Actions
Is duplicate of Hammer CLI - Bug #9318: does not resolve a nested host group to id when updating a hostClosed02/10/2015Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Foreman commands (obsolete)
  • Assignee deleted (Martin Bacovsky)
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #6755: Parent host groups not shown clearly in hammer hostgroup list added
Actions #3

Updated by Tomáš Strachota about 9 years ago

  • Status changed from New to Duplicate
Actions #4

Updated by Tomáš Strachota about 9 years ago

  • Is duplicate of Bug #9318: does not resolve a nested host group to id when updating a host added
Actions

Also available in: Atom PDF