summaryrefslogtreecommitdiffstats
path: root/anslib/patches/registry-ds-glusterfs-fixes.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-11 19:56:38 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-11 19:56:38 +0100
commitf3c41dd13a0a86382b80d564e9de0d6b06fb1dbf (patch)
tree3522ce77203da92bb2b6f7cfa2b0999bf6cc132c /anslib/patches/registry-ds-glusterfs-fixes.patch
parent6bc3a3ac71e11fb6459df715536fec373c123a97 (diff)
downloadands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.gz
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.bz2
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.tar.xz
ands-f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf.zip
Various fixes before moving to hardware installation
Diffstat (limited to 'anslib/patches/registry-ds-glusterfs-fixes.patch')
-rw-r--r--anslib/patches/registry-ds-glusterfs-fixes.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/anslib/patches/registry-ds-glusterfs-fixes.patch b/anslib/patches/registry-ds-glusterfs-fixes.patch
new file mode 100644
index 0000000..65f30e5
--- /dev/null
+++ b/anslib/patches/registry-ds-glusterfs-fixes.patch
@@ -0,0 +1,61 @@
+diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml
+index bc4d81e..4720095 100644
+diff --git a/roles/openshift_hosted/tasks/registry_storage.yml b/roles/openshift_hosted/tasks/registry_storage.yml
+index aa66a78..e1b8c4e 100644
+diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml
+index 7223a5a..3465b6c 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/tasks/main.yml b/roles/openshift_persistent_volumes/tasks/main.yml
+index b1d9c8c..1c32a67 100644
+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 ca8b747..ce15533 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 %}
+diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml
+index e91e130..f3562b6 100644