diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-03-11 19:22:19 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-03-11 19:22:19 +0100 |
commit | 9c475cff32d20ec969205ea6eb1c1e6053dcdd6f (patch) | |
tree | 122dc3952270b3a988941307bef4d211d5f07f83 | |
parent | a5e4db35a4a13612202758f893ab30360d98b9d4 (diff) | |
download | openshift-9c475cff32d20ec969205ea6eb1c1e6053dcdd6f.tar.gz openshift-9c475cff32d20ec969205ea6eb1c1e6053dcdd6f.tar.bz2 openshift-9c475cff32d20ec969205ea6eb1c1e6053dcdd6f.tar.xz openshift-9c475cff32d20ec969205ea6eb1c1e6053dcdd6f.zip |
Fixes typos in hosted registry code used to provide GlusterFS supoort
-rw-r--r-- | roles/openshift_hosted/tasks/storage/glusterfs.yml | 8 | ||||
-rw-r--r-- | roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml index 7223a5afe..3465b6c86 100644 --- a/roles/openshift_hosted/tasks/storage/glusterfs.yml +++ b/roles/openshift_hosted/tasks/storage/glusterfs.yml @@ -35,7 +35,7 @@ mount: state: mounted fstype: glusterfs - src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift.hosted.registry.storage.glusterfs.path }}" + src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift_hosted_registry_storage_glusterfs_path }}" name: "{{ mktemp.stdout }}" - name: Set registry volume permissions @@ -49,10 +49,11 @@ - block: - name: Activate registry maintenance mode oc_env: + kind: dc namespace: "{{ openshift_hosted_registry_namespace }}" name: "{{ openshift_hosted_registry_name }}" env_vars: - - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' + REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' - name: Get first registry pod name set_fact: @@ -72,11 +73,12 @@ - name: Deactivate registry maintenance mode oc_env: + kind: dc namespace: "{{ openshift_hosted_registry_namespace }}" name: "{{ openshift_hosted_registry_name }}" state: absent env_vars: - - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' + REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' when: openshift_hosted_registry_storage_glusterfs_swap - name: Unmount registry volume and clean up mount point/fstab diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 index ca8b747ee..ce155333a 100644 --- a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 +++ b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 @@ -12,7 +12,7 @@ items: resources: requests: storage: "{{ claim.capacity }}" -{% if claim.storageclass is not None %} +{% if claim.storageclass is defined and claim.storageclass is not none %} storageClassName: "{{ claim.storageclass }}" {% endif %} {% endfor %} |