Browse Source

Merge "Fix for MOS 9.0 deployment with changed host names"

Jenkins 2 years ago
parent
commit
295ffedf82
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      deployment_scripts/puppet/manifests/agent.pp

+ 4
- 2
deployment_scripts/puppet/manifests/agent.pp View File

@@ -19,7 +19,9 @@ $primary_controller_nodes      = get_nodes_hash_by_roles($network_metadata, ['pr
19 19
 $controllers                   = get_nodes_hash_by_roles($network_metadata, ['primary-controller', 'controller'])
20 20
 $controller_internal_addresses = get_node_to_ipaddr_map_by_network_role($controllers, 'management')
21 21
 $controller_nodes              = ipsort(values($controller_internal_addresses))
22
-$hostinfo                      = $network_metadata['nodes'][$::hostname]
22
+$uid                           = hiera('uid')
23
+$node_hostname                 = "node-${uid}"
24
+$hostinfo                      = $network_metadata['nodes'][$node_hostname]
23 25
 $netinfo                       = $hostinfo['network_roles']
24 26
 $internal_address              = $netinfo['management']
25 27
 $public_address                = $netinfo['ex']
@@ -36,7 +38,7 @@ if $fuel_version < 8.0 {
36 38
   $is_base_os    = roles_include(['base-os'])
37 39
   $is_virt       = roles_include(['virt'])
38 40
   $is_controller = roles_include(['controller', 'primary-controller'])
39
-  $roles_nb      = size($network_metadata['nodes'][$::hostname]['node_roles'])
41
+  $roles_nb      = size($network_metadata['nodes'][$node_hostname]['node_roles'])
40 42
 }
41 43
 
42 44
 class { 'plugin_zabbix::monitoring':

Loading…
Cancel
Save