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/heat/Chart.yaml b/charts/heat/Chart.yaml
index bb2b5af..37ef8ff 100644
--- a/charts/heat/Chart.yaml
+++ b/charts/heat/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/heat
- https://opendev.org/openstack/openstack-helm
-version: 0.3.1
+version: 0.3.3
diff --git a/charts/heat/charts/helm-toolkit/Chart.yaml b/charts/heat/charts/helm-toolkit/Chart.yaml
index c1296b9..7d3703e 100644
--- a/charts/heat/charts/helm-toolkit/Chart.yaml
+++ b/charts/heat/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/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 4294d40..6027b95 100644
--- a/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/heat/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/heat/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
index 9597d34..3963bd4 100644
--- a/charts/heat/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
+++ b/charts/heat/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/heat/requirements.lock b/charts/heat/requirements.lock
index a3625ba..cec557e 100644
--- a/charts/heat/requirements.lock
+++ b/charts/heat/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:59.086381152Z"
+ version: 0.2.53
+digest: sha256:f8f4fbba6f638b79447f7e458933b07deb792ae30a14df5900bde542cf0e64a6
+generated: "2023-05-16T04:42:17.91826239Z"
diff --git a/charts/heat/templates/configmap-etc.yaml b/charts/heat/templates/configmap-etc.yaml
index b49edcd..b6630e4 100644
--- a/charts/heat/templates/configmap-etc.yaml
+++ b/charts/heat/templates/configmap-etc.yaml
@@ -135,6 +135,10 @@
{{- $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.heat.paste_deploy "api_paste_config" "/var/lib/openstack/etc/heat/api-paste.ini" -}}
+{{- end }}
---
apiVersion: v1
kind: Secret
@@ -145,7 +149,9 @@
rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }}
heat.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.heat | 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 }}
{{- if .Values.manifests.certificates }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }}
diff --git a/charts/heat/templates/deployment-api.yaml b/charts/heat/templates/deployment-api.yaml
index 0bed310..09407c0 100644
--- a/charts/heat/templates/deployment-api.yaml
+++ b/charts/heat/templates/deployment-api.yaml
@@ -111,10 +111,12 @@
subPath: {{ base .Values.conf.heat.DEFAULT.log_config_append }}
readOnly: true
{{ end }}
+ {{- if .Values.conf.paste }}
- name: heat-etc
mountPath: /etc/heat/api-paste.ini
subPath: api-paste.ini
readOnly: true
+ {{- end }}
- name: heat-etc
mountPath: /etc/heat/policy.yaml
subPath: policy.yaml
diff --git a/charts/heat/templates/deployment-cfn.yaml b/charts/heat/templates/deployment-cfn.yaml
index 94ddd06..ae9917d 100644
--- a/charts/heat/templates/deployment-cfn.yaml
+++ b/charts/heat/templates/deployment-cfn.yaml
@@ -111,10 +111,12 @@
subPath: {{ base .Values.conf.heat.DEFAULT.log_config_append }}
readOnly: true
{{ end }}
+ {{- if .Values.conf.paste }}
- name: heat-etc
mountPath: /etc/heat/api-paste.ini
subPath: api-paste.ini
readOnly: true
+ {{- end }}
- name: heat-etc
mountPath: /etc/heat/policy.yaml
subPath: policy.yaml
diff --git a/charts/heat/templates/deployment-cloudwatch.yaml b/charts/heat/templates/deployment-cloudwatch.yaml
index f1f7353..2acff93 100644
--- a/charts/heat/templates/deployment-cloudwatch.yaml
+++ b/charts/heat/templates/deployment-cloudwatch.yaml
@@ -97,10 +97,12 @@
subPath: {{ base .Values.conf.heat.DEFAULT.log_config_append }}
readOnly: true
{{ end }}
+ {{- if .Values.conf.paste }}
- name: heat-etc
mountPath: /etc/heat/api-paste.ini
subPath: api-paste.ini
readOnly: true
+ {{- end }}
- name: heat-etc
mountPath: /etc/heat/policy.yaml
subPath: policy.yaml
diff --git a/charts/heat/values.yaml b/charts/heat/values.yaml
index 555af53..7cd5197 100644
--- a/charts/heat/values.yaml
+++ b/charts/heat/values.yaml
@@ -280,66 +280,7 @@
type: OS::Heat::RandomString
properties:
length: 40
- paste:
- pipeline:heat-api:
- pipeline: cors request_id faultwrap http_proxy_to_wsgi versionnegotiation osprofiler authurl authtoken audit context apiv1app
- pipeline:heat-api-standalone:
- pipeline: cors request_id faultwrap http_proxy_to_wsgi versionnegotiation authurl authpassword context apiv1app
- pipeline:heat-api-custombackend:
- pipeline: cors request_id faultwrap versionnegotiation context custombackendauth apiv1app
- pipeline:heat-api-cfn:
- pipeline: cors http_proxy_to_wsgi cfnversionnegotiation osprofiler ec2authtoken authtoken audit context apicfnv1app
- pipeline:heat-api-cfn-standalone:
- pipeline: cors http_proxy_to_wsgi cfnversionnegotiation ec2authtoken context apicfnv1app
- pipeline:heat-api-cloudwatch:
- pipeline: cors versionnegotiation osprofiler ec2authtoken authtoken audit context apicwapp
- pipeline:heat-api-cloudwatch-standalone:
- pipeline: cors versionnegotiation ec2authtoken context apicwapp
- app:apiv1app:
- paste.app_factory: heat.common.wsgi:app_factory
- heat.app_factory: heat.api.openstack.v1:API
- app:apicfnv1app:
- paste.app_factory: heat.common.wsgi:app_factory
- heat.app_factory: heat.api.cfn.v1:API
- app:apicwapp:
- paste.app_factory: heat.common.wsgi:app_factory
- heat.app_factory: heat.api.cloudwatch:API
- filter:versionnegotiation:
- paste.filter_factory: heat.common.wsgi:filter_factory
- heat.filter_factory: heat.api.openstack:version_negotiation_filter
- filter:cors:
- paste.filter_factory: oslo_middleware.cors:filter_factory
- oslo_config_project: heat
- filter:faultwrap:
- paste.filter_factory: heat.common.wsgi:filter_factory
- heat.filter_factory: heat.api.openstack:faultwrap_filter
- filter:cfnversionnegotiation:
- paste.filter_factory: heat.common.wsgi:filter_factory
- heat.filter_factory: heat.api.cfn:version_negotiation_filter
- filter:cwversionnegotiation:
- paste.filter_factory: heat.common.wsgi:filter_factory
- heat.filter_factory: heat.api.cloudwatch:version_negotiation_filter
- filter:context:
- paste.filter_factory: heat.common.context:ContextMiddleware_filter_factory
- filter:ec2authtoken:
- paste.filter_factory: heat.api.aws.ec2token:EC2Token_filter_factory
- filter:http_proxy_to_wsgi:
- paste.filter_factory: oslo_middleware:HTTPProxyToWSGI.factory
- filter:authurl:
- paste.filter_factory: heat.common.auth_url:filter_factory
- filter:authtoken:
- paste.filter_factory: keystonemiddleware.auth_token:filter_factory
- filter:authpassword:
- paste.filter_factory: heat.common.auth_password:filter_factory
- filter:custombackendauth:
- paste.filter_factory: heat.common.custom_backend_auth:filter_factory
- filter:audit:
- paste.filter_factory: keystonemiddleware.audit:filter_factory
- audit_map_file: /etc/heat/api_audit_map.conf
- filter:request_id:
- paste.filter_factory: oslo_middleware.request_id:RequestId.factory
- filter:osprofiler:
- paste.filter_factory: osprofiler.web:WsgiMiddleware.factory
+ paste: {}
policy: {}
heat:
DEFAULT:
@@ -351,6 +292,7 @@
auth_type: password
auth_version: v3
memcache_security_strategy: ENCRYPT
+ service_type: orchestration
database:
max_retries: -1
trustee:
@@ -1025,6 +967,9 @@
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
+ - key: node-role.kubernetes.io/control-plane
+ operator: Exists
+ effect: NoSchedule
mounts:
heat_api:
init_container: null