Refix --registry-enabled

This fixes an issue with --registry-enabled that was previously fixed [1] but
somehow dropped after a refactoring [2]

[1] Change Ib93a7c0f761d047da3408703a5cf4208821acb33
[2] Change Ibbed59bc135969174a20e5243ff8464908801a23

Task: 41306
Story: 2008383
Change-Id: I76fedd34edec55f5a906a96672529ed15775f5da
(cherry picked from commit 679a174a0a)
This commit is contained in:
Jake Yip 2021-01-13 21:40:15 +11:00 committed by Florian Haas
parent 1052eefd6c
commit 6d3361872f
5 changed files with 13 additions and 9 deletions

View File

@ -2,7 +2,7 @@
. /etc/sysconfig/heat-params . /etc/sysconfig/heat-params
if [ "$REGISTRY_ENABLED" = "True" ]; then if [ "$(echo $REGISTRY_ENABLED | tr '[:upper:]' '[:lower:]')" = "true" ]; then
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost" ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost"
$ssh_cmd cat > /etc/sysconfig/registry-config.yml << EOF $ssh_cmd cat > /etc/sysconfig/registry-config.yml << EOF
version: 0.1 version: 0.1

View File

@ -2,13 +2,11 @@
. /etc/sysconfig/heat-params . /etc/sysconfig/heat-params
if [ "$REGISTRY_ENABLED" = "False" ]; then
exit 0
fi
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost" ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost"
echo "starting docker registry ..." if [ "$(echo $REGISTRY_ENABLED | tr '[:upper:]' '[:lower:]')" = "true" ]; then
$ssh_cmd systemctl daemon-reload echo "starting docker registry ..."
$ssh_cmd systemctl enable registry $ssh_cmd systemctl daemon-reload
$ssh_cmd systemctl --no-block start registry $ssh_cmd systemctl enable registry
$ssh_cmd systemctl --no-block start registry
fi

View File

@ -63,7 +63,9 @@ FLANNEL_NETWORK_CIDR="$FLANNEL_NETWORK_CIDR"
PODS_NETWORK_CIDR="$PODS_NETWORK_CIDR" PODS_NETWORK_CIDR="$PODS_NETWORK_CIDR"
KUBE_VERSION="$KUBE_VERSION" KUBE_VERSION="$KUBE_VERSION"
TRUSTEE_USER_ID="$TRUSTEE_USER_ID" TRUSTEE_USER_ID="$TRUSTEE_USER_ID"
TRUSTEE_USERNAME="$TRUSTEE_USERNAME"
TRUSTEE_PASSWORD="$TRUSTEE_PASSWORD" TRUSTEE_PASSWORD="$TRUSTEE_PASSWORD"
TRUSTEE_DOMAIN_ID="$TRUSTEE_DOMAIN_ID"
TRUST_ID="$TRUST_ID" TRUST_ID="$TRUST_ID"
CLOUD_PROVIDER_ENABLED="$CLOUD_PROVIDER_ENABLED" CLOUD_PROVIDER_ENABLED="$CLOUD_PROVIDER_ENABLED"
INSECURE_REGISTRY_URL="$INSECURE_REGISTRY_URL" INSECURE_REGISTRY_URL="$INSECURE_REGISTRY_URL"

View File

@ -430,7 +430,9 @@ resources:
$PODS_NETWORK_CIDR: {get_param: pods_network_cidr} $PODS_NETWORK_CIDR: {get_param: pods_network_cidr}
$KUBE_VERSION: {get_param: kube_version} $KUBE_VERSION: {get_param: kube_version}
$TRUSTEE_USER_ID: {get_param: trustee_user_id} $TRUSTEE_USER_ID: {get_param: trustee_user_id}
$TRUSTEE_USERNAME: {get_param: trustee_username}
$TRUSTEE_PASSWORD: {get_param: trustee_password} $TRUSTEE_PASSWORD: {get_param: trustee_password}
$TRUSTEE_DOMAIN_ID: {get_param: trustee_domain_id}
$TRUST_ID: {get_param: trust_id} $TRUST_ID: {get_param: trust_id}
$AUTH_URL: {get_param: auth_url} $AUTH_URL: {get_param: auth_url}
$CLOUD_PROVIDER_ENABLED: {get_param: cloud_provider_enabled} $CLOUD_PROVIDER_ENABLED: {get_param: cloud_provider_enabled}

View File

@ -434,7 +434,9 @@ resources:
$PODS_NETWORK_CIDR: {get_param: pods_network_cidr} $PODS_NETWORK_CIDR: {get_param: pods_network_cidr}
$KUBE_VERSION: {get_param: kube_version} $KUBE_VERSION: {get_param: kube_version}
$TRUSTEE_USER_ID: {get_param: trustee_user_id} $TRUSTEE_USER_ID: {get_param: trustee_user_id}
$TRUSTEE_USERNAME: {get_param: trustee_username}
$TRUSTEE_PASSWORD: {get_param: trustee_password} $TRUSTEE_PASSWORD: {get_param: trustee_password}
$TRUSTEE_DOMAIN_ID: {get_param: trustee_domain_id}
$TRUST_ID: {get_param: trust_id} $TRUST_ID: {get_param: trust_id}
$AUTH_URL: {get_param: auth_url} $AUTH_URL: {get_param: auth_url}
$CLOUD_PROVIDER_ENABLED: {get_param: cloud_provider_enabled} $CLOUD_PROVIDER_ENABLED: {get_param: cloud_provider_enabled}