Skip to content

Commit 2b29648

Browse files
committed
Let neutron::server install *aas when needed
When enabling fwaas, packstack fails because the tags in the ensure_resource are different that the ones in puppet-neutron. Currently neutron::server can take care of packages installation using ensure_*aas_package. This patch leverages those parameters instead of doing it as part of the packstack::neutron::api manifest. Change-Id: I387d1412e45b73ba89b048f4fe2f7ce97ec4d41f
1 parent e192b6f commit 2b29648

1 file changed

Lines changed: 15 additions & 32 deletions

File tree

  • packstack/puppet/modules/packstack/manifests/neutron

packstack/puppet/modules/packstack/manifests/neutron/api.pp

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,23 @@
88
$neutron_db_password = hiera('CONFIG_NEUTRON_DB_PW')
99
$neutron_sql_connection = "mysql+pymysql://${neutron_db_user}:${neutron_db_password}@${neutron_db_host}/${neutron_db_name}"
1010
$neutron_user_password = hiera('CONFIG_NEUTRON_KS_PW')
11+
$neutron_fwaas_enabled = str2bool(hiera('CONFIG_NEUTRON_FWAAS'))
12+
$neutron_lbaas_enabled = str2bool(hiera('CONFIG_LBAAS_INSTALL'))
13+
$neutron_vpnaas_enabled = str2bool(hiera('CONFIG_NEUTRON_VPNAAS'))
1114

1215
class { '::neutron::server':
13-
database_connection => $neutron_sql_connection,
14-
auth_password => $neutron_user_password,
15-
auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
16-
identity_uri => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
17-
sync_db => true,
18-
enabled => true,
19-
api_workers => hiera('CONFIG_SERVICE_WORKERS'),
20-
rpc_workers => hiera('CONFIG_SERVICE_WORKERS'),
21-
service_providers => hiera_array('SERVICE_PROVIDERS'),
22-
}
23-
24-
# TODO: FIXME: remove this hack after upstream resolves https://bugs.launchpad.net/puppet-neutron/+bug/1474961
25-
if hiera('CONFIG_NEUTRON_VPNAAS') == 'y' {
26-
ensure_resource( 'package', 'neutron-vpnaas-agent', {
27-
name => 'openstack-neutron-vpnaas',
28-
tag => ['openstack', 'neutron-package'],
29-
})
30-
Package['neutron-vpnaas-agent'] ~> Service<| tag == 'neutron-service' |>
31-
}
32-
if hiera('CONFIG_NEUTRON_FWAAS') == 'y' {
33-
ensure_resource( 'package', 'neutron-fwaas', {
34-
'name' => 'openstack-neutron-fwaas',
35-
'tag' => 'openstack'
36-
})
37-
Package['neutron-fwaas'] ~> Service<| tag == 'neutron-service' |>
38-
}
39-
if hiera('CONFIG_LBAAS_INSTALL') == 'y' {
40-
ensure_resource( 'package', 'neutron-lbaas-agent', {
41-
name => 'openstack-neutron-lbaas',
42-
tag => ['openstack', 'neutron-package'],
43-
})
44-
Package['neutron-lbaas-agent'] ~> Service<| tag == 'neutron-service' |>
16+
database_connection => $neutron_sql_connection,
17+
auth_password => $neutron_user_password,
18+
auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
19+
identity_uri => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
20+
sync_db => true,
21+
enabled => true,
22+
api_workers => hiera('CONFIG_SERVICE_WORKERS'),
23+
rpc_workers => hiera('CONFIG_SERVICE_WORKERS'),
24+
service_providers => hiera_array('SERVICE_PROVIDERS'),
25+
ensure_fwaas_package => $neutron_fwaas_enabled,
26+
ensure_vpnaas_package => $neutron_vpnaas_enabled,
27+
ensure_lbaas_package => $neutron_lbaas_enabled,
4528
}
4629

4730
file { '/etc/neutron/api-paste.ini':

0 commit comments

Comments
 (0)