diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-01-11 11:39:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 11:39:02 -0800 |
commit | fdc5829d6ca252e1574278cd1dc50e932378d98d (patch) | |
tree | 0f80b64e32b59e7c4a2735066aed5f4e363e5a8a /playbooks/openstack/sample-inventory | |
parent | e347c3ed3cc23cdf3af1077dd4becc572a7dfad9 (diff) | |
parent | 3d943161cedc2fc0d1690e03ece1e2504d4d6d74 (diff) | |
download | openshift-fdc5829d6ca252e1574278cd1dc50e932378d98d.tar.gz openshift-fdc5829d6ca252e1574278cd1dc50e932378d98d.tar.bz2 openshift-fdc5829d6ca252e1574278cd1dc50e932378d98d.tar.xz openshift-fdc5829d6ca252e1574278cd1dc50e932378d98d.zip |
Merge pull request #6607 from tomassedovic/fix-cinder-pv
Automatic merge from submit-queue.
Fix Cinder Persistent Volume support
This documents how to use Cinder-backed persistent volumes with OpenStack.
It needed a change to the dynamic inventory because the "openstack" cloudprovider plugin does actually require internal name resolution -- and the `openshift_hostname` value must match the name of the Nova server.
In addition, we need to be able to specify the V2 of the Cinder API for now as described in: https://github.com/openshift/openshift-docs/issues/5730
Diffstat (limited to 'playbooks/openstack/sample-inventory')
-rw-r--r-- | playbooks/openstack/sample-inventory/group_vars/OSEv3.yml | 1 | ||||
-rwxr-xr-x | playbooks/openstack/sample-inventory/inventory.py | 6 |
2 files changed, 5 insertions, 2 deletions
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: 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': |