Project

General

Profile

Actions

Bug #19048

closed

hammer host create doesnt work with --hostgroup-title

Added by Tomáš Strachota over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1436162

Description of problem:
hammer host create doesnt work with --hostgroup-title

Steps to Reproduce:
1. create 2 nested host groups with the lowest hostgroub being non-unique
2. try to create a host with the hammer command using --hostgroup-title and not --hostgroup

Actual results:
Command fials

Expected results:
Host created

Additional info:
We use nested hostgroups and one of the layers of nesting is the DC name (p1 or p2). We have created hostgroups under these 2 locations that represent our lifecycle environments - dit100 sit100 etc.

hg-rhel6-base/p1/sit100
hg-rhel6-basep1/dit100
...
hg-rhel6-base/p2/sit100
hg-rhel6-base/p2/dit100
...

etc

As the hostgroup name (dit100) is not unique, we cant use --hostgroup with hammer host create as it finds more than one hostgroup that matches.

We were happy to see that we could use --hostgroup-title as these ARE unique but the command fails

hammer host create --name tdi-tst242  --hostgroup-title "hg-rhel6-base/p1/dit100-p1"  --ip 172.31.5.242 --compute-resource 'VMware DC1'  --compute-profile 1-Small --location P1 --organization TLG
Could not create the host:
  Error: Options --environment-id, --architecture-id, --domain-id, --puppet-proxy-id, --operatingsystem-id, --partition-table-id are required

  See: 'hammer host create --help'

As a work around we have added the DC name to each hostgorup to make it unique but this means duplicating info in the name

hammer host create --name tdi-tst242-p1  --hostgroup dit100-p1  --ip 172.31.5.242 --compute-resource 'VMware DC1'  --compute-profile 1-Small --location P1 --organization TLG
Host created
Actions #1

Updated by Tomáš Strachota over 7 years ago

  • Subject changed from hammer host create doesnt work with --hostgroup-title to hammer host create doesnt work with --hostgroup-title
  • Category changed from Other commands to Hosts
  • Assignee set to Tomáš Strachota
  • Target version set to 1.12.3
Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/294 added
Actions #3

Updated by Marek Hulán over 7 years ago

  • Target version changed from 1.12.3 to 1.13.0
Actions #4

Updated by Anonymous over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Tomáš Strachota over 7 years ago

  • Translation missing: en.field_release set to 243
Actions

Also available in: Atom PDF