Fix the Neutron OVN metadata service setup

* Set the Nova metadata server address properly so that
  neutron-ovn-metadata-agents running on compute nodes forward the
  requests to the right place instead of trying to use 127.0.0.1;
* generate a random secret instead of hard-coding one.

Change-Id: I6525a4150808ef257bb7a8f49589c1151ca279b0
This commit is contained in:
Dmitrii Shcherbakov 2020-10-08 18:20:38 +00:00
parent 32ad5af7f4
commit 81cbaa4433
4 changed files with 7 additions and 2 deletions

View File

@ -79,6 +79,7 @@ def _setup_secrets():
'config.credentials.neutron-password', 'config.credentials.neutron-password',
'config.credentials.placement-password', 'config.credentials.placement-password',
'config.credentials.glance-password', 'config.credentials.glance-password',
'config.credentials.ovn-metadata-proxy-shared-secret',
] if k not in existing_cred_keys ] if k not in existing_cred_keys
}) })

View File

@ -108,6 +108,7 @@ setup:
alerting_tag: 'config.alerting.tag' alerting_tag: 'config.alerting.tag'
ovn_nb_connection: 'config.network.ovn-nb-connection' ovn_nb_connection: 'config.network.ovn-nb-connection'
ovn_sb_connection: 'config.network.ovn-sb-connection' ovn_sb_connection: 'config.network.ovn-sb-connection'
ovn_metadata_proxy_shared_secret: 'config.credentials.ovn-metadata-proxy-shared-secret'
setup_loop_based_cinder_lvm_backend: 'config.cinder.setup-loop-based-cinder-lvm-backend' setup_loop_based_cinder_lvm_backend: 'config.cinder.setup-loop-based-cinder-lvm-backend'
lvm_backend_volume_group: 'config.cinder.lvm-backend-volume-group' lvm_backend_volume_group: 'config.cinder.lvm-backend-volume-group'
entry_points: entry_points:

View File

@ -1,5 +1,8 @@
[DEFAULT] [DEFAULT]
metadata_proxy_shared_secret = supersecret
nova_metadata_host = {{ control_ip }}
metadata_proxy_shared_secret = {{ ovn_metadata_proxy_shared_secret }}
[ovs] [ovs]
ovsdb_connection = unix:{{ snap_common }}/run/openvswitch/db.sock ovsdb_connection = unix:{{ snap_common }}/run/openvswitch/db.sock

View File

@ -10,4 +10,4 @@ project_name = service
username = neutron username = neutron
password = {{ neutron_password }} password = {{ neutron_password }}
service_metadata_proxy = True service_metadata_proxy = True
metadata_proxy_shared_secret = supersecret metadata_proxy_shared_secret = {{ ovn_metadata_proxy_shared_secret }}