Bug #14872

Updating hostgroup causes classes associated with hostgroup to dissapear

Added by Josh Baird about 1 year ago. Updated 2 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Host groups
Target version:Foreman - Team Marek Iteration 13
Difficulty: Bugzilla link:
Found in release:1.11.1 Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/303
Story points-
Velocity based estimate-
Releasehammer-cli-foreman-0.10.1Release relationshipAuto

Description

Working with this hostgroup:

Id: 52
Name: role-corp-dns-ext-auth
Title: role-corp-base/role-corp-dns-ext-auth
Puppet CA Proxy Id: 1
Puppet Master Proxy Id: 1
Puppetclasses:
profiles::bind
Parameters:
app => dns
Locations:
DC1
DC2
HI
MCH
Organizations:
CORP
EFOL
FHEG
Parent Id: 5

I use the following commands to update the hostgroup's puppet-ca-proxy-id and puppet-proxy-id:

jbaird@fmpr-d1-ap01:~$ hammer hostgroup update --id 52 --puppet-ca-proxy-id 6
Hostgroup updated
jbaird@fmpr-d1-ap01:~$ hammer hostgroup update --id 52 --puppet-proxy-id 7
Hostgroup updated

Following, you can see that the hostgroup no longer has 'profiles::bind' associated with it:

jbaird@fmpr-d1-ap01:~$ hammer hostgroup info --id 52
Id: 52
Name: role-corp-dns-ext-auth
Title: role-corp-base/role-corp-dns-ext-auth
Puppet CA Proxy Id: 6
Puppet Master Proxy Id:
Puppetclasses:

Parameters:
app => dns
Locations:
DC1
DC2
HI
MCH
Organizations:
CORP
EFOL
FHEG
Parent Id: 5

hammerlog.txt Magnifier (6.67 KB) Josh Baird, 05/02/2016 11:10 AM

hammer.log (8.33 KB) Evan Powell, 12/14/2016 10:56 PM

Associated revisions

Revision 0c792be2
Added by Tomas Strachota 2 months ago

Fixes #14872 - prevent sending nil values in hostgroup update

History

#1 Updated by Dominic Cleal about 1 year ago

  • Category set to Foreman commands

If you get the chance, could you re-run the hammer update commands with -d and attach the log? e.g. hammer -d hostgroup update --id 52 --puppet-ca-proxy-id 6

#2 Updated by Josh Baird about 1 year ago

Log attached.

#3 Updated by Evan Powell 6 months ago

This also happens when updating the partition table. My log with -d is attached. I've excerpted the good bit here:

[ INFO 2016-12-15 03:41:23 API] PUT /api/hostgroups/2
[DEBUG 2016-12-15 03:41:23 API] Params: {
    "hostgroup" => {
                      "name" => "TestHostgroup",
                 "ptable_id" => 12,
           "puppet_proxy_id" => nil,
        "puppet_ca_proxy_id" => nil,
           "puppetclass_ids" => nil
    }

#4 Updated by Tomáš Strachota 2 months ago

  • Category changed from Foreman commands to Host groups
  • Status changed from New to Assigned
  • Assigned To set to Tomáš Strachota
  • Release set to hammer-cli-foreman-0.10.1

#5 Updated by The Foreman Bot 2 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/303 added

#6 Updated by Tomáš Strachota 2 months ago

  • Target version set to Team Marek Iteration 13

#7 Updated by Anonymous 2 months ago

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

Also available in: Atom PDF