Przeglądaj źródła

Merge pull request #5518 from ingvagabund/set-quota-backend-bytes-explicitly

Automatic merge from submit-queue

set the etcd backend quota to 4GB by default

Bug: 1492891
OpenShift Merge Robot 7 lat temu
rodzic
commit
ead22bb1c3

+ 6 - 0
playbooks/common/openshift-cluster/upgrades/etcd/main.yml

@@ -21,3 +21,9 @@
 - name: Perform etcd upgrade
   include: ./upgrade.yml
   when: openshift_etcd_upgrade | default(true) | bool
+
+- name: Backup etcd
+  include: backup.yml
+  vars:
+    etcd_backup_tag: "post-3.0-"
+  when: openshift_etcd_backup | default(true) | bool

+ 0 - 6
playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml

@@ -106,9 +106,3 @@
     when:
     - ansible_distribution == 'Fedora'
     - not openshift.common.is_containerized | bool
-
-- name: Backup etcd
-  include: backup.yml
-  vars:
-    etcd_backup_tag: "post-3.0-"
-  when: openshift_etcd_backup | default(true) | bool

+ 3 - 0
roles/etcd/defaults/main.yaml

@@ -87,3 +87,6 @@ r_etcd_os_firewall_allow:
   port: "{{etcd_client_port}}/tcp"
 - service: etcd peering
   port: "{{ etcd_peer_port }}/tcp"
+
+# set the backend quota to 4GB by default
+etcd_quota_backend_bytes: 4294967296

+ 5 - 0
roles/etcd/tasks/upgrade/upgrade_image.yml

@@ -20,6 +20,11 @@
     regexp: "{{ current_image.stdout }}$"
     replace: "{{ new_etcd_image }}"
 
+- lineinfile:
+    destfile: "{{ etcd_conf_file }}"
+    regexp: '^ETCD_QUOTA_BACKEND_BYTES='
+    line: "ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}"
+
 - name: Restart etcd_container
   systemd:
     name: "{{ etcd_service }}"

+ 5 - 0
roles/etcd/tasks/upgrade/upgrade_rpm.yml

@@ -19,6 +19,11 @@
     name: "{{ l_etcd_target_package }}"
     state: latest
 
+- lineinfile:
+    destfile: "{{ etcd_conf_file }}"
+    regexp: '^ETCD_QUOTA_BACKEND_BYTES='
+    line: "ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}"
+
 - name: Restart etcd
   service:
     name: "{{ etcd_service }}"

+ 1 - 0
roles/etcd/templates/etcd.conf.j2

@@ -45,6 +45,7 @@ ETCD_ADVERTISE_CLIENT_URLS={{ etcd_advertise_client_urls }}
 #ETCD_STRICT_RECONFIG_CHECK="false"
 #ETCD_AUTO_COMPACTION_RETENTION="0"
 #ETCD_ENABLE_V2="true"
+ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}
 
 #[proxy]
 #ETCD_PROXY=off