Project

General

Profile

Actions

Bug #11870

open

Multiple hosts created when saltstack minion_id differs from FQDN.

Added by Jim Dubinsky about 9 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman Integration
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We have minion_ids that are frequently just the uppercase version of the first part of the hostname. When a minion_id is the FQDN, it seems that all information comes through into the foreman host list. When using the partial hostname, or one that doesn't match the FQDN, we don't see the OS/OS release info or the Model info (such as VMWare). This does come through when we use the FQDN. The state.highstate report info seems to come through no matter whether the minion_id matches the FQDN or not. With the single part hostname, regardless of whether the minion_id is upper or lower case.

Can this be remedied to support full functionality even when the salt minion_id doesn't match the host's FQDN?

We use saltstack with foreman and the smart proxy.
Installed via rpm:
(on Foreman host)
foreman-1.9.1-1.el7.noarch
ruby193-rubygem-foreman_salt-3.0.2-1.fm1_9.el7.noarch

(On salt master, which is different from foreman host)
salt-2015.5.3-4.el7.noarch
salt-minion-2015.5.3-4.el7.noarch
salt-master-2015.5.3-4.el7.noarch
salt-api-2015.5.3-4.el7.noarch
foreman-proxy-1.9.1-1.el7.noarch


Related issues 1 (0 open1 closed)

Has duplicate Salt - Bug #16156: Foreman Salt - duplication issueDuplicate08/17/2016Actions
Actions #1

Updated by Jim Dubinsky about 9 years ago

Interestingly, the requisite facts/grainsa are all visible from the hammer cli, just not in the hosts list part of the webui.

Actions #2

Updated by Stephen Benjamin about 8 years ago

  • Subject changed from OS/release information not gathered when saltstack minion_id differs from FQDN. to Multiple hosts created when saltstack minion_id differs from FQDN.

Another user reported this as well, and there's lots of odd behavior when a minion id differs from the FQDN.

Not sure how easy it is to fix, because the SaltStack reports contain the minion ID in the report name:
https://github.com/theforeman/foreman_salt/blob/master/test/unit/highstate.json

There's no way to get the FQDN AFAIK from the saltstack report. Maybe we can add a minion id to the host
and match up reports/grains that way.

Actions #3

Updated by Stephen Benjamin about 8 years ago

  • Has duplicate Bug #16156: Foreman Salt - duplication issue added
Actions #4

Updated by Nicolas Rodriguez almost 8 years ago

Hi there! Got the same here. My hosts have prod.foo or dev.bar as minion_id.
I've made a patch on https://github.com/theforeman/foreman_salt that adds a salt_minion_id on the host and it works pretty well.

Actions #5

Updated by Ido Kaplan almost 8 years ago

Hi,

I have installed Foreman Salt Proxy plugin via the foreman-installer.

How can I apply the patch?

Thanks!
Ido

Actions #6

Updated by Anonymous almost 8 years ago

Nicolas, could you open a pull request with your changes?

Actions #7

Updated by Ido Kaplan almost 8 years ago

Hi Nicolas,

I will very appreciate if your can share your changes.
I really need it.

Thanks!
Ido

Actions #8

Updated by Mihai Cindea over 4 years ago

For anyone who is still having this issue:
While trying to craft a patch for report_importer.rb I realized that actually this is solvable just by setting "Append domain names to the host" to "No" in Settings in Foreman UI
Feel free to poke me if you have any issues.

Actions

Also available in: Atom PDF