Skip to content

Commit

Permalink
neutron: add floating_dns_domain setting
Browse files Browse the repository at this point in the history
XXX neutron net-update
  • Loading branch information
dirkmueller committed Feb 21, 2019
1 parent e02ee3d commit 7ca9b93
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions chef/cookbooks/neutron/recipes/common_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
sql_max_pool_overflow: neutron[:neutron][:sql][:max_pool_overflow],
sql_pool_timeout: neutron[:neutron][:sql][:pool_timeout],
debug: neutron[:neutron][:debug],
# TODO
designate_enabled: false,
bind_host: bind_host,
bind_port: bind_port,
use_syslog: neutron[:neutron][:use_syslog],
Expand Down
15 changes: 15 additions & 0 deletions chef/cookbooks/neutron/templates/default/neutron.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ wsgi_keep_alive = false
default_log_levels = <%= @default_log_levels.join(", ") %>
<% end -%>
<%if @designate_enabled -%>
external_dns_driver = designate

[designate]
url = <%= @designate_public_uri %>
admin_auth_url = <%= @keystone_settings['internal_auth_url'] %>
admin_tenant_name = <%= @keystone_settings['service_tenant'] %>
admin_username = <%= @keystone_settings['service_user'] %>
admin_password = <%= @keystone_settings['service_password'] %>
region_name = <%= @keystone_settings['endpoint_region'] %>
admin_user_domain = <%= @keystone_settings['admin_domain'] %>
admin_project_domain = <%= @keystone_settings['admin_domain'] %>
<% end -%>


[agent]
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
Expand Down
11 changes: 11 additions & 0 deletions chef/data_bags/crowbar/migrate/neutron/305_add_designate_domain.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def upgrade(template_attributes, template_deployment, attributes, deployment)
key = "floating_dns_domain"
attributes[key] = template_attributes[key] unless attributes.key? key
return attributes, deployment
end

def downgrade(template_attributes, template_deployment, attributes, deployment)
key = "floating_dns_domain"
attributes.delete(key) unless template_attributes.key? key
return attributes, deployment
end
3 changes: 2 additions & 1 deletion chef/data_bags/crowbar/template-neutron.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"debug": false,
"create_default_networks": true,
"dns_domain": "openstack.local",
"floating_dns_domain": "floating.openstack.local",
"rpc_workers": 1,
"use_lbaas": false,
"lbaasv2_driver": "haproxy",
Expand Down Expand Up @@ -191,7 +192,7 @@
"neutron": {
"crowbar-revision": 0,
"crowbar-applied": false,
"schema-revision": 304,
"schema-revision": 305,
"element_states": {
"neutron-server": [ "readying", "ready", "applying" ],
"neutron-network": [ "readying", "ready", "applying" ],
Expand Down
1 change: 1 addition & 0 deletions chef/data_bags/crowbar/template-neutron.schema
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"keystone_instance": { "type": "str", "required": true },
"create_default_networks": { "type": "bool", "required": true },
"dns_domain": { "type": "str", "required": true },
"floating_dns_domain": { "type": "str", "required": true },
"rpc_workers": { "type": "int", "required": true },
"use_lbaas": { "type": "bool", "required": true },
"lbaasv2_driver": { "type": "str", "required": true },
Expand Down

0 comments on commit 7ca9b93

Please sign in to comment.