fix(neutron): sync paste config
* fix(chart): Import paste.deploy patch and bump chart versions to latest
* Remove paste.deploy config override
* Remove paste.deploy config override for nova and neutron
* Add ovn_metadata image
* Remove orig file and update gitignore
* fix typo in gitignore
---------
Co-authored-by: okozachenko1203 <okozachenko1203@users.noreply.github.com>
diff --git a/charts/senlin/Chart.yaml b/charts/senlin/Chart.yaml
index 2331440..4085ec4 100644
--- a/charts/senlin/Chart.yaml
+++ b/charts/senlin/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/senlin
- https://opendev.org/openstack/openstack-helm
-version: 0.2.8
+version: 0.2.9
diff --git a/charts/senlin/charts/helm-toolkit/Chart.yaml b/charts/senlin/charts/helm-toolkit/Chart.yaml
index c1296b9..7d3703e 100644
--- a/charts/senlin/charts/helm-toolkit/Chart.yaml
+++ b/charts/senlin/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.51
+version: 0.2.53
diff --git a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 4294d40..6027b95 100644
--- a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -133,8 +133,10 @@
# Create DB User
try:
root_engine.execute(
- "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\' IDENTIFIED BY \'{2}\' {3}".format(
- database, user, password, mysql_x509))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
+ root_engine.execute(
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
logger.info("Created user {0} for {1}".format(user, database))
except:
logger.critical("Could not create user {0} for {1}".format(user, database))
diff --git a/charts/senlin/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl b/charts/senlin/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
index 9597d34..3963bd4 100644
--- a/charts/senlin/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
@@ -214,7 +214,7 @@
fi
# load balance delay
- DELAY=$((1 + ${RANDOM} % 300))
+ DELAY=$((1 + ${RANDOM} % 30))
echo "Sleeping for ${DELAY} seconds to spread the load in time..."
sleep ${DELAY}
@@ -231,31 +231,17 @@
return 2
fi
- # load balance delay
- DELAY=$((1 + ${RANDOM} % 300))
- echo "Sleeping for ${DELAY} seconds to spread the load in time..."
- sleep ${DELAY}
-
- # Calculation remote file SHA256 hash
- REMOTE_FILE=$(mktemp -p /tmp)
- openstack object save --file ${REMOTE_FILE} $CONTAINER_NAME $FILE
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to save container object $FILE for SHA256 hash verification."
- rm -rf ${REMOTE_FILE}
- return 1
- fi
-
# Remote backup verification
- SHA256_REMOTE=$(cat ${REMOTE_FILE} | sha256sum | awk '{print $1}')
- SHA256_LOCAL=$(cat ${FILEPATH}/${FILE} | sha256sum | awk '{print $1}')
- log INFO "${DB_NAME}_backup" "Calculated SHA256 hashes for the file $FILE in container $CONTAINER_NAME."
- log INFO "${DB_NAME}_backup" "Local SHA256 hash is ${SHA256_LOCAL}."
- log INFO "${DB_NAME}_backup" "Remote SHA256 hash is ${SHA256_REMOTE}."
- if [[ "${SHA256_LOCAL}" == "${SHA256_REMOTE}" ]]; then
- log INFO "${DB_NAME}_backup" "The local backup & remote backup SHA256 hash values are matching for file $FILE in container $CONTAINER_NAME."
+ MD5_REMOTE=$(openstack object show $CONTAINER_NAME $FILE -f json | jq -r ".etag")
+ MD5_LOCAL=$(cat ${FILEPATH}/${FILE} | md5sum | awk '{print $1}')
+ log INFO "${DB_NAME}_backup" "Obtained MD5 hash for the file $FILE in container $CONTAINER_NAME."
+ log INFO "${DB_NAME}_backup" "Local MD5 hash is ${MD5_LOCAL}."
+ log INFO "${DB_NAME}_backup" "Remote MD5 hash is ${MD5_REMOTE}."
+ if [[ "${MD5_LOCAL}" == "${MD5_REMOTE}" ]]; then
+ log INFO "${DB_NAME}_backup" "The local backup & remote backup MD5 hash values are matching for file $FILE in container $CONTAINER_NAME."
else
- log ERROR "${DB_NAME}_backup" "Mismatch between the local backup & remote backup sha256 hash values"
- return 1
+ log ERROR "${DB_NAME}_backup" "Mismatch between the local backup & remote backup MD5 hash values"
+ return 2
fi
rm -rf ${REMOTE_FILE}
diff --git a/charts/senlin/requirements.lock b/charts/senlin/requirements.lock
index 223e708..ba7a859 100644
--- a/charts/senlin/requirements.lock
+++ b/charts/senlin/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: file://../../openstack-helm-infra/helm-toolkit
- version: 0.2.51
-digest: sha256:9fe05ff9103d825422e13cdd8ce9852c3dacfadc12751b7883affdbe483b1b3b
-generated: "2023-01-30T23:09:56.274500208Z"
+ version: 0.2.53
+digest: sha256:f8f4fbba6f638b79447f7e458933b07deb792ae30a14df5900bde542cf0e64a6
+generated: "2023-05-16T04:42:16.171873003Z"
diff --git a/charts/senlin/templates/configmap-etc.yaml b/charts/senlin/templates/configmap-etc.yaml
index a47a3a4..2f2a4a8 100644
--- a/charts/senlin/templates/configmap-etc.yaml
+++ b/charts/senlin/templates/configmap-etc.yaml
@@ -93,6 +93,11 @@
{{- $formatter_fluent := dict "class" "oslo_log.formatters.FluentFormatter" -}}
{{- $_ := set .Values.conf.logging "formatter_fluent" $formatter_fluent -}}
{{- end -}}
+
+{{- if not .Values.conf.paste }}
+{{- $_ := set $envAll.Values.conf.senlin.senlin_api "api_paste_config" "/var/lib/openstack/etc/senlin/api-paste.ini" -}}
+{{- end }}
+
---
apiVersion: v1
kind: Secret
@@ -103,6 +108,8 @@
rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }}
senlin.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.senlin | b64enc }}
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
+ {{- if .Values.conf.paste }}
api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
+ {{- end }}
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
{{- end }}
diff --git a/charts/senlin/templates/deployment-api.yaml b/charts/senlin/templates/deployment-api.yaml
index d6577ff..689c045 100644
--- a/charts/senlin/templates/deployment-api.yaml
+++ b/charts/senlin/templates/deployment-api.yaml
@@ -98,10 +98,12 @@
subPath: {{ base .Values.conf.senlin.DEFAULT.log_config_append }}
readOnly: true
{{- end }}
+ {{- if .Values.conf.paste }}
- name: senlin-etc
mountPath: /etc/senlin/api-paste.ini
subPath: api-paste.ini
readOnly: true
+ {{- end }}
- name: senlin-etc
mountPath: /etc/senlin/policy.yaml
subPath: policy.yaml
diff --git a/charts/senlin/values.yaml b/charts/senlin/values.yaml
index 5bd7f45..ba4ecad 100644
--- a/charts/senlin/values.yaml
+++ b/charts/senlin/values.yaml
@@ -96,33 +96,7 @@
image: df0c1a14-0940-4ae5-be5c-bb06aa407da2
networks:
- network: public
- paste:
- pipeline:senlin-api:
- pipeline: request_id faultwrap ssl versionnegotiation webhook authtoken context trust apiv1app
- app:apiv1app:
- paste.app_factory: senlin.api.common.wsgi:app_factory
- senlin.app_factory: senlin.api.openstack.v1.router:API
- filter:request_id:
- paste.filter_factory: oslo_middleware.request_id:RequestId.factory
- filter:faultwrap:
- paste.filter_factory: senlin.api.common.wsgi:filter_factory
- senlin.filter_factory: senlin.api.middleware:fault_filter
- filter:context:
- paste.filter_factory: senlin.api.common.wsgi:filter_factory
- senlin.filter_factory: senlin.api.middleware:context_filter
- filter:ssl:
- paste.filter_factory: oslo_middleware.ssl:SSLMiddleware.factory
- filter:versionnegotiation:
- paste.filter_factory: senlin.api.common.wsgi:filter_factory
- senlin.filter_factory: senlin.api.middleware:version_filter
- filter:trust:
- paste.filter_factory: senlin.api.common.wsgi:filter_factory
- senlin.filter_factory: senlin.api.middleware:trust_filter
- filter:webhook:
- paste.filter_factory: senlin.api.common.wsgi:filter_factory
- senlin.filter_factory: senlin.api.middleware:webhook_filter
- filter:authtoken:
- paste.filter_factory: keystonemiddleware.auth_token:filter_factory
+ paste: {}
policy: {}
senlin:
DEFAULT:
@@ -137,6 +111,7 @@
auth_type: password
auth_version: v3
memcache_security_strategy: ENCRYPT
+ service_type: clustering
senlin_api:
# NOTE(portdirect): the bind port should not be defined, and is manipulated
# via the endpoints section.