Browse Source

Fix Hiera keys with a dot

The new Puppet version does not recognize dots in hiera key names,
so we need to replace them with underscores.

Change-Id: I6642d5963a598151dedbbbd957449bb317ceaa59

Replace deprecated 'auth_uri' with 'www_authenticate_uri'

Deprecated 'auth_uri' parameter is being removed from
puppet modules in [1].
In Swift 'auth_uri' is still not deprecated, it's being
deprecated in [2], so that can be taken care later.
For Sahara use ::sahara::keystone::authtoken class to configure
keystone parameters as the one specified in '::sahara' are deprecated
for removal.

[1] https://review.openstack.org/#/q/topic:remove-auth-uri
[2] https://review.openstack.org/#/c/621138/

Co-Authored-By: Javier Pena <jpena@redhat.com>
Change-Id: I68edd9225b44938dc6c275bf464d0e328e814848
Javier Pena 4 months ago
parent
commit
a3fe814be8

+ 4
- 2
packstack/plugins/neutron_350.py View File

@@ -828,12 +828,14 @@ def create_manifests(config, messages):
828 828
                     str.strip,
829 829
                     config['CONFIG_NEUTRON_OVS_TUNNEL_SUBNETS'].split(',')
830 830
                 )
831
-                cf_fw_nt_key = ("FIREWALL_NEUTRON_TUNNEL_RULES_%s" % host)
831
+                cf_fw_nt_key = ("FIREWALL_NEUTRON_TUNNEL_RULES_%s" %
832
+                                host.replace('.', '_'))
832 833
                 for subnet in tunnel_subnets:
833 834
                     tunnel_fw_details(config, host, subnet, fw_details)
834 835
                 config[cf_fw_nt_key] = fw_details
835 836
             else:
836
-                cf_fw_nt_key = ("FIREWALL_NEUTRON_TUNNEL_RULES_%s" % host)
837
+                cf_fw_nt_key = ("FIREWALL_NEUTRON_TUNNEL_RULES_%s" %
838
+                                host.replace('.', '_'))
837 839
                 for n_host in network_hosts | compute_hosts:
838 840
                     if config['CONFIG_NEUTRON_OVS_TUNNEL_IF']:
839 841
                         if config['CONFIG_USE_SUBNETS'] == 'y':

+ 2
- 1
packstack/plugins/nova_300.py View File

@@ -374,7 +374,8 @@ def create_compute_manifest(config, messages):
374 374
 
375 375
     for host in compute_hosts:
376 376
         fw_details = dict()
377
-        cf_fw_qemu_mig_key = "FIREWALL_NOVA_QEMU_MIG_RULES_%s" % host
377
+        cf_fw_qemu_mig_key = ("FIREWALL_NOVA_QEMU_MIG_RULES_%s" %
378
+                              host.replace('.', '_'))
378 379
         for c_host in compute_hosts:
379 380
             key = "nova_qemu_migration_%s_%s" % (host, c_host)
380 381
             fw_details.setdefault(key, {})

+ 3
- 3
packstack/puppet/modules/packstack/manifests/ceilometer.pp View File

@@ -54,8 +54,8 @@ class packstack::ceilometer ()
54 54
     }
55 55
 
56 56
     class { '::ceilometer::keystone::authtoken':
57
-      auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
58
-      auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
59
-      password => hiera('CONFIG_CEILOMETER_KS_PW'),
57
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
58
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
59
+      password             => hiera('CONFIG_CEILOMETER_KS_PW'),
60 60
     }
61 61
 }

+ 3
- 3
packstack/puppet/modules/packstack/manifests/cinder.pp View File

@@ -26,9 +26,9 @@ class packstack::cinder ()
26 26
     }
27 27
 
28 28
     class { '::cinder::keystone::authtoken':
29
-      auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
30
-      auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
31
-      password => hiera('CONFIG_CINDER_KS_PW'),
29
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
30
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
31
+      password             => hiera('CONFIG_CINDER_KS_PW'),
32 32
     }
33 33
 
34 34
     class { '::cinder::api':

+ 6
- 6
packstack/puppet/modules/packstack/manifests/glance.pp View File

@@ -24,9 +24,9 @@ class packstack::glance ()
24 24
     }
25 25
 
26 26
     class { '::glance::api::authtoken':
27
-      auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
28
-      auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
29
-      password => hiera('CONFIG_GLANCE_KS_PW'),
27
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
28
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
29
+      password             => hiera('CONFIG_GLANCE_KS_PW'),
30 30
     }
31 31
 
32 32
     class { '::glance::api::logging':
@@ -45,9 +45,9 @@ class packstack::glance ()
45 45
     }
46 46
 
47 47
     class { '::glance::registry::authtoken':
48
-      auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
49
-      auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
50
-      password => hiera('CONFIG_GLANCE_KS_PW'),
48
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
49
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
50
+      password             => hiera('CONFIG_GLANCE_KS_PW'),
51 51
     }
52 52
 
53 53
     class { '::glance::registry':

+ 4
- 4
packstack/puppet/modules/packstack/manifests/gnocchi.pp View File

@@ -15,10 +15,10 @@ class packstack::gnocchi ()
15 15
     }
16 16
 
17 17
     class { '::gnocchi::keystone::authtoken':
18
-      auth_uri     => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
19
-      auth_url     => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
20
-      auth_version => hiera('CONFIG_KEYSTONE_API_VERSION'),
21
-      password     => hiera('CONFIG_GNOCCHI_KS_PW')
18
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
19
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
20
+      auth_version         => hiera('CONFIG_KEYSTONE_API_VERSION'),
21
+      password             => hiera('CONFIG_GNOCCHI_KS_PW')
22 22
     }
23 23
 
24 24
     class { '::gnocchi::api':

+ 3
- 3
packstack/puppet/modules/packstack/manifests/heat/rabbitmq.pp View File

@@ -29,9 +29,9 @@ class packstack::heat::rabbitmq ()
29 29
     }
30 30
 
31 31
     class { '::heat::keystone::authtoken':
32
-      password   => hiera('CONFIG_HEAT_KS_PW'),
33
-      auth_uri   => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
34
-      auth_url   => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
32
+      password             => hiera('CONFIG_HEAT_KS_PW'),
33
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
34
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
35 35
     }
36 36
 
37 37
     class { '::heat::logging':

+ 2
- 2
packstack/puppet/modules/packstack/manifests/ironic.pp View File

@@ -7,8 +7,8 @@ class packstack::ironic ()
7 7
     }
8 8
 
9 9
     class { '::ironic::api::authtoken':
10
-      auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
11
-      password => hiera('CONFIG_IRONIC_KS_PW'),
10
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
11
+      password             => hiera('CONFIG_IRONIC_KS_PW'),
12 12
     }
13 13
 
14 14
     class { '::ironic::api': }

+ 2
- 2
packstack/puppet/modules/packstack/manifests/manila.pp View File

@@ -13,8 +13,8 @@ class packstack::manila ()
13 13
     }
14 14
 
15 15
     class { '::manila::keystone::authtoken':
16
-      password     => hiera('CONFIG_MANILA_KS_PW'),
17
-      auth_uri     => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
16
+      password             => hiera('CONFIG_MANILA_KS_PW'),
17
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
18 18
     }
19 19
 
20 20
     class { '::manila::api':

+ 5
- 5
packstack/puppet/modules/packstack/manifests/neutron/api.pp View File

@@ -13,11 +13,11 @@ class packstack::neutron::api ()
13 13
     $neutron_lbaas_enabled   = str2bool(hiera('CONFIG_LBAAS_INSTALL'))
14 14
 
15 15
     class { '::neutron::keystone::authtoken':
16
-      username     => 'neutron',
17
-      password     => $neutron_user_password,
18
-      auth_uri     => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
19
-      auth_url     => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
20
-      project_name => 'services',
16
+      username             => 'neutron',
17
+      password             => $neutron_user_password,
18
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
19
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
20
+      project_name         => 'services',
21 21
     }
22 22
 
23 23
     class { '::neutron::server':

+ 2
- 1
packstack/puppet/modules/packstack/manifests/neutron/ovn_agent.pp View File

@@ -1,7 +1,8 @@
1 1
 class packstack::neutron::ovn_agent ()
2 2
 {
3 3
     $my_ip = choose_my_ip(hiera('HOST_LIST'))
4
-    $neutron_tunnel_rule_name = "FIREWALL_NEUTRON_TUNNEL_RULES_${my_ip}"
4
+    $my_ip_without_dot = regsubst($my_ip, '\.', '_', 'G')
5
+    $neutron_tunnel_rule_name = "FIREWALL_NEUTRON_TUNNEL_RULES_${my_ip_without_dot}"
5 6
     create_resources(packstack::firewall, hiera($neutron_tunnel_rule_name, {}))
6 7
 
7 8
     $neutron_ovn_tunnel_if = hiera('CONFIG_NEUTRON_OVN_TUNNEL_IF', undef)

+ 2
- 1
packstack/puppet/modules/packstack/manifests/neutron/ovs_agent.pp View File

@@ -1,7 +1,8 @@
1 1
 class packstack::neutron::ovs_agent ()
2 2
 {
3 3
     $my_ip = choose_my_ip(hiera('HOST_LIST'))
4
-    $neutron_tunnel_rule_name = "FIREWALL_NEUTRON_TUNNEL_RULES_${my_ip}"
4
+    $my_ip_without_dot = regsubst($my_ip, '\.', '_', 'G')
5
+    $neutron_tunnel_rule_name = "FIREWALL_NEUTRON_TUNNEL_RULES_${my_ip_without_dot}"
5 6
     create_resources(packstack::firewall, hiera($neutron_tunnel_rule_name, {}))
6 7
 
7 8
     $neutron_ovs_tunnel_if = hiera('CONFIG_NEUTRON_OVS_TUNNEL_IF', undef)

+ 5
- 5
packstack/puppet/modules/packstack/manifests/nova/api.pp View File

@@ -8,13 +8,13 @@ class packstack::nova::api ()
8 8
       # TO-DO(mmagr): Add IPv6 support when hostnames are used
9 9
     }
10 10
 
11
-    $auth_uri = hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS')
11
+    $www_authenticate_uri = hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS')
12 12
     $admin_password = hiera('CONFIG_NOVA_KS_PW')
13 13
 
14 14
     class {'::nova::keystone::authtoken':
15
-      password => $admin_password,
16
-      auth_uri => $auth_uri,
17
-      auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
15
+      password             => $admin_password,
16
+      www_authenticate_uri => $www_authenticate_uri,
17
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
18 18
     }
19 19
 
20 20
     if hiera('CONFIG_NOVA_PCI_ALIAS') == '' {
@@ -55,7 +55,7 @@ class packstack::nova::api ()
55 55
     }
56 56
 
57 57
     class { '::nova::placement':
58
-      auth_url    => $auth_uri,
58
+      auth_url    => $www_authenticate_uri,
59 59
       password    => $admin_password,
60 60
       region_name => hiera('CONFIG_KEYSTONE_REGION'),
61 61
     }

+ 2
- 1
packstack/puppet/modules/packstack/manifests/nova/compute.pp View File

@@ -1,7 +1,8 @@
1 1
 class packstack::nova::compute ()
2 2
 {
3 3
     $my_ip = choose_my_ip(hiera('HOST_LIST'))
4
-    $qemu_rule_name = "FIREWALL_NOVA_QEMU_MIG_RULES_${my_ip}"
4
+    $my_ip_without_dot = regsubst($my_ip, '\.', '_', 'G')
5
+    $qemu_rule_name = "FIREWALL_NOVA_QEMU_MIG_RULES_${my_ip_without_dot}"
5 6
     create_resources(packstack::firewall, hiera($qemu_rule_name, {}))
6 7
     create_resources(packstack::firewall, hiera('FIREWALL_NOVA_COMPUTE_RULES', {}))
7 8
 

+ 4
- 4
packstack/puppet/modules/packstack/manifests/panko.pp View File

@@ -23,10 +23,10 @@ class packstack::panko ()
23 23
     }
24 24
 
25 25
     class { '::panko::keystone::authtoken':
26
-      auth_uri     => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
27
-      auth_url     => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
28
-      auth_version => hiera('CONFIG_KEYSTONE_API_VERSION'),
29
-      password     => hiera('CONFIG_PANKO_KS_PW')
26
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
27
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
28
+      auth_version         => hiera('CONFIG_KEYSTONE_API_VERSION'),
29
+      password             => hiera('CONFIG_PANKO_KS_PW')
30 30
     }
31 31
 
32 32
     class { '::panko::api':

+ 5
- 5
packstack/puppet/modules/packstack/manifests/provision/bridge.pp View File

@@ -15,11 +15,11 @@ class packstack::provision::bridge ()
15 15
     }
16 16
 
17 17
     class { '::neutron::keystone::authtoken':
18
-      username     => 'neutron',
19
-      password     => $neutron_user_password,
20
-      auth_uri     => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
21
-      auth_url     => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
22
-      project_name => 'services',
18
+      username             => 'neutron',
19
+      password             => $neutron_user_password,
20
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL_VERSIONLESS'),
21
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
22
+      project_name         => 'services',
23 23
     }
24 24
 
25 25
     if $provision_neutron_br and $setup_ovs_bridge {

+ 8
- 5
packstack/puppet/modules/packstack/manifests/sahara/rabbitmq.pp View File

@@ -23,6 +23,14 @@ class packstack::sahara::rabbitmq ()
23 23
       File[$files_to_set_owner] ~> Service<| tag == 'sahara-service' |>
24 24
     }
25 25
 
26
+    class { '::sahara::keystone::authtoken':
27
+      username             => 'sahara',
28
+      password             => hiera('CONFIG_SAHARA_KS_PW'),
29
+      project_name         => 'services',
30
+      www_authenticate_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
31
+      auth_url             => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
32
+    }
33
+
26 34
     class { '::sahara::logging':
27 35
       debug => hiera('CONFIG_DEBUG_MODE'),
28 36
     }
@@ -30,11 +38,6 @@ class packstack::sahara::rabbitmq ()
30 38
     class { '::sahara':
31 39
       database_connection   =>
32 40
         "mysql+pymysql://sahara:${sahara_cfg_sahara_db_pw}@${sahara_cfg_sahara_mariadb_host}/sahara",
33
-      admin_user            => 'sahara',
34
-      admin_password        => hiera('CONFIG_SAHARA_KS_PW'),
35
-      admin_tenant_name     => 'services',
36
-      auth_uri              => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
37
-      identity_uri          => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
38 41
       use_neutron           => ($sahara_cfg_config_neutron_install == 'y'),
39 42
       host                  => hiera('CONFIG_SAHARA_HOST'),
40 43
       rabbit_use_ssl        => hiera('CONFIG_AMQP_SSL_ENABLED'),

Loading…
Cancel
Save