Project

General

Profile

Actions

Bug #3214

closed

No location / Organization if host added by default from puppet run

Added by Jon Shanks about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a host does a puppet run, but the host isn't known by foreman, the reports / facts are pushed to the host at the end of the run and the host is added to foreman. I am guessing the location / organization is selected based on the puppet smart proxy that has pushed up the facts + reports, so it naturally associates the host with those are that associated with the smart proxy. However, when i edit host, they are greyed out and autoamtically selected, if i select the host, it shows a blank location + organization under the properties section.

I have had to delete the host and add it manually to get these feels populated.


Related issues 5 (1 open4 closed)

Related to Foreman - Bug #1830: Puppet run triggers "no puppet proxy defined - cant continue" after 1.0 upgradeClosed08/20/2012Actions
Related to Foreman - Refactor #4992: Default Puppet run organization/location should be defined on model not settingNewActions
Related to Foreman - Bug #5690: Taxonomy fact name not retrieved from settingsClosedStephen Benjamin05/13/2014Actions
Related to Foreman - Bug #9654: If taxonomies are seeded, they should be the default orgsClosedStephen Benjamin03/05/2015Actions
Has duplicate Foreman - Bug #4668: (nightlies 3-14-14) a system not provisioned via foreman but registered appears as "any org" host and cannot be movedDuplicate03/14/2014Actions
Actions #1

Updated by Dominic Cleal about 11 years ago

  • Related to Bug #1830: Puppet run triggers "no puppet proxy defined - cant continue" after 1.0 upgrade added
Actions #2

Updated by Dominic Cleal about 11 years ago

  • Category set to Organizations and Locations

Linking to #1830, as that also suggests picking up some data about hosts based on the smart proxy that uploaded reports/facts.

Actions #3

Updated by Dominic Cleal about 11 years ago

Workaround: go to the host list page, use the tickboxes to select the host(s) and then use Assign Location or Organisation from the "Select Actions" dropdown menu to change it.

Actions #4

Updated by Jim Greenleaf about 11 years ago

As discussed in IRC, we are interested in the ability to auto-set the location of our nodes based on an arbitrary fact, known to facter.

Actions #5

Updated by Anonymous about 11 years ago

  • Target version set to 1.10.0
Actions #6

Updated by Anonymous about 11 years ago

  • Target version changed from 1.10.0 to 1.9.3
Actions #7

Updated by Lukas Zapletal almost 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Lukas Zapletal

Investigating options how to solve that.

12:08     Dominic | lzap: one trouble with copying from the proxy is that a proxy can be assigned to multiple orgs/locs, but the host can only be in one
12:08     Dominic | I'm also wary of using facts as inputs, but I suppose it'll work.  It all feels quite similar to knowing the default host group, would be
                  | nice if we had a generic mechanism for assigning hosts.
Actions #8

Updated by Anonymous almost 11 years ago

  • Target version changed from 1.9.3 to 1.9.2
Actions #9

Updated by Lukas Zapletal almost 11 years ago

First of all, from Foreman 1.4 (about to be released soon), it is only possible to change Location/Organization from Host list by selecting hosts and then via the Action button. This workflow is able to catch for mismatched records. So you shoudl be able to change it anytime.

I would consider this bug as SOLVED.

Possible resolutions to what Jim recommend:

A) Define org/loc as a global setting. That would mean that all registered hosts via puppet goes into single org/loc. Users could define permissions and filters that would allow permissions to some users that would set their destinations. EASY.

B) Select one of org/loc from the proxy. Since proxy can have multiple org/loc assigned, the "first" random one would be picked up. EASY.

C) Each proxy could define org/loc that would be used - just a variation of A. NORMAL.

X) (Optional) Use facts for setting default org/loc, possibilty to disable this via global settings tho.

Ohad, Dominic - what you think? I'd rather file new issue for the new solution and close this one.

Actions #10

Updated by Dominic Cleal almost 11 years ago

I prefer A or C. If you're doing A though, I think it might be better (clearer?) as an attribute of the taxonomies rather than settings. While I like getting the location/org from the proxy, the many to one issue bothers me - I would prefer something slightly more inflexible, but is more deterministic.

Please just use this issue number, it represents the problem well and already has votes etc.

Actions #11

Updated by Dominic Cleal almost 11 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Lukas Zapletal)
Actions #12

Updated by Daniel Lobato Garcia almost 11 years ago

I would go for A) and X), the user would choose a fact and a regex and depending on the regex it'd go to one taxonomy or another. I've personally wrote a few facts to identify the location of a host so this is something I'd definitely find useful.

Users would go to the properties of the taxonomy, and there they can click on a tab 'Hosts' where they can choose a fact name and a regex. Then every host that is auto placed into the taxonomies that match this regex. I'd add an informative message saying that if an incoming host has a fact that could place him in two organizations/locations, it'll choose the first ones alphabetically.

Actions #13

Updated by Marek Hulán almost 11 years ago

+1 for what Daniel described if that's feasible

Actions #14

Updated by Dominic Cleal almost 11 years ago

+1, though I'd drop the regexp bit (as discussed on IRC) and use a 1:1 mapping of fact value to the name (or rather, label for when we have inheritance) of the taxonomy.

Actions #15

Updated by Daniel Lobato Garcia almost 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Daniel Lobato Garcia

Sure thing, I'm using two facts

foreman_location
foreman_organization

and they represent the full label of each taxonomy as they can be nested now.

Actions #16

Updated by Dominic Cleal almost 11 years ago

It's probably best that the names of the facts are added as settings too, just in case people need/want to change them.

Actions #18

Updated by Daniel Lobato Garcia almost 11 years ago

  • Status changed from Assigned to Ready For Testing
Actions #19

Updated by Anonymous almost 11 years ago

  • Target version changed from 1.9.2 to 1.9.1
Actions #20

Updated by Anonymous almost 11 years ago

  • Target version changed from 1.9.1 to 1.9.0
Actions #21

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Bug #4668: (nightlies 3-14-14) a system not provisioned via foreman but registered appears as "any org" host and cannot be moved added
Actions #22

Updated by Dominic Cleal over 10 years ago

  • Translation missing: en.field_release set to 4
Actions #23

Updated by Daniel Lobato Garcia over 10 years ago

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

Updated by Dominic Cleal over 10 years ago

  • Related to Refactor #4992: Default Puppet run organization/location should be defined on model not setting added
Actions #25

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #5690: Taxonomy fact name not retrieved from settings added
Actions #26

Updated by Anonymous almost 10 years ago

Spam deleted by administrator.

Actions #27

Updated by Stephen Benjamin almost 10 years ago

  • Related to Bug #9654: If taxonomies are seeded, they should be the default orgs added
Actions

Also available in: Atom PDF