Bug #24843
opencase sensitivity in salt minions name
Description
if you have salt minions with capital letters, the minion is registered with lower case Name.
the Job upload Fails with HttpNotFound. If I set the minion id to all lower case letters the error disappears.
2 examples:
2018-09-06 17:19:31,718 [salt.loaded.int.pillar.puppet:32 ][CRITICAL]7617 YAML data from /usr/bin/foreman-node failed to parse
2018-09-07 07:21:02,220 [salt.loaded.int.module.cmdmod:722 ][ERROR ]7617 Command '['/usr/bin/foreman-node', 'TRTWVBL000010.bsh.corp.bshg.com']' failed with return code: 1
2018-09-07 07:21:02,220 [salt.loaded.int.module.cmdmod:724 ][ERROR ]7617 stdout: Couldn't retrieve ENC data: Error retrieving node TRTWVBL000010.bsh.corp.bshg.com: Net::HTTPNotFound
minion is restired as trtwvbl000010.bsh.corp.bshg.com
I changed the minion id for another Server and it started to work:
/usr/bin/foreman-node blwwvbl000012.bsh.corp.bshg.com
---
classes: []
parameters:
foreman_subnets: []
foreman_interfaces:
- ip: 10.0.2.15
ip6:
mac: '08:00:27:e2:2c:6a'
name: blwwvbl000012.bsh.corp.bshg.com
attrs: {}
virtual: false
link: true
identifier: enp0s3
managed: true
primary: true
provision: true
subnet:
subnet6:
tag:
attached_to:
type: Interface
domainname: bsh.corp.bshg.com
root_pw:
foreman_config_groups: []
puppetmaster: ''
environment: base
another Problem:
salt-master hostname is attached with _master and therefore not found
2018-09-07 08:10:01,508 [salt.loaded.int.module.cmdmod:728 ][ERROR ]7609 retcode: 1
2018-09-07 08:10:01,509 [salt.loaded.int.pillar.puppet:32 ][CRITICAL]7609 YAML data from /usr/bin/foreman-node failed to parse
2018-09-07 08:10:15,470 [salt.loaded.int.module.cmdmod:722 ][ERROR ]7609 Command '['/usr/bin/foreman-node', 'si0vm4481.bsh.corp.bshg.com_master']' failed with return code: 1
2018-09-07 08:10:15,471 [salt.loaded.int.module.cmdmod:724 ][ERROR ]7609 stdout: /usr/share/gems/gems/smart_proxy_salt-2.1.9/bin/foreman-node:187:in `<top (required)>': Invalid hostname (RuntimeError)
on the working minion (host) no salt master and salt Environment is visible
Thanks
Matthias