From de44771f97d506f0dbbbcff90938fc566e8a9ac1 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 4 Jan 2018 16:12:11 +0100 Subject: Specify the Cinder version in the inventory As described in[1], OpenShift currently only works with Block Storage API v2 and the version autodetection is failing to figure that out. [1]: https://github.com/openshift/openshift-docs/issues/5730 --- playbooks/openstack/sample-inventory/group_vars/OSEv3.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'playbooks/openstack/sample-inventory') diff --git a/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml b/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml index 481807dc9..a8663f946 100644 --- a/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml +++ b/playbooks/openstack/sample-inventory/group_vars/OSEv3.yml @@ -20,6 +20,7 @@ openshift_hosted_registry_wait: True #openshift_cloudprovider_openstack_password: "{{ lookup('env','OS_PASSWORD') }}" #openshift_cloudprovider_openstack_tenant_name: "{{ lookup('env','OS_TENANT_NAME') }}" #openshift_cloudprovider_openstack_region: "{{ lookup('env', 'OS_REGION_NAME') }}" +#openshift_cloudprovider_openstack_blockstorage_version: v2 ## Use Cinder volume for Openshift registry: -- cgit v1.2.3 From c35c8f3e8369eb3d2ab7675c30e8d258eccd6a18 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 4 Jan 2018 16:15:44 +0100 Subject: Allow using server names in openstack dynamic inv When deploying on OpenStack with internal DNS configured, this will set `openshift_hostname` to the Nova server name instead of its IP address. Without those two matching, the OpenStack cloud provider configuration will fail and the OpenShift nodes will not start. --- playbooks/openstack/sample-inventory/inventory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'playbooks/openstack/sample-inventory') diff --git a/playbooks/openstack/sample-inventory/inventory.py b/playbooks/openstack/sample-inventory/inventory.py index 45cc4e15a..76e658eb7 100755 --- a/playbooks/openstack/sample-inventory/inventory.py +++ b/playbooks/openstack/sample-inventory/inventory.py @@ -89,13 +89,15 @@ def build_inventory(): # TODO(shadower): what about multiple networks? if server.private_v4: hostvars['private_v4'] = server.private_v4 + hostvars['openshift_ip'] = server.private_v4 + # NOTE(shadower): Yes, we set both hostname and IP to the private # IP address for each node. OpenStack doesn't resolve nodes by # name at all, so using a hostname here would require an internal # DNS which would complicate the setup and potentially introduce # performance issues. - hostvars['openshift_ip'] = server.private_v4 - hostvars['openshift_hostname'] = server.private_v4 + hostvars['openshift_hostname'] = server.metadata.get( + 'openshift_hostname', server.private_v4) hostvars['openshift_public_hostname'] = server.name if server.metadata['host-type'] == 'cns': -- cgit v1.2.3