diff --git a/config.yaml b/config.yaml index 5c648c92..2aa20fd9 100644 --- a/config.yaml +++ b/config.yaml @@ -311,6 +311,14 @@ options: wait for you to execute the openstack-upgrade action for this charm on each unit. If False it will revert to existing behavior of upgrading all units on config change. + os-internal-network: + type: string + default: + description: | + The IP address and netmask of the OpenStack Internal network (e.g. + 192.168.0.0/24) + + This network will be used to bind vncproxy client. harden: default: type: string diff --git a/hooks/nova_compute_context.py b/hooks/nova_compute_context.py index 2f6d02f7..b5a21167 100644 --- a/hooks/nova_compute_context.py +++ b/hooks/nova_compute_context.py @@ -40,7 +40,10 @@ from charmhelpers.contrib.openstack.utils import ( get_os_version_package, get_os_version_codename, ) - +from charmhelpers.contrib.openstack.ip import ( + INTERNAL, + resolve_address, +) from charmhelpers.contrib.network.ip import ( get_ipv6_addr, ) @@ -533,7 +536,7 @@ class InstanceConsoleContext(context.OSContextGenerator): else: ctxt = dict(ctxt, **self.get_console_info(proto, **rel)) break - ctxt['console_listen_addr'] = get_host_ip(unit_get('private-address')) + ctxt['console_listen_addr'] = resolve_address(endpoint_type=INTERNAL) return ctxt diff --git a/metadata.yaml b/metadata.yaml index 0b8e9c9c..5ceb839b 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -21,6 +21,8 @@ provides: nrpe-external-master: interface: nrpe-external-master scope: container +extra-bindings: + internal: requires: shared-db: interface: mysql-shared