Browse Source

Fix container and user name when restarting memcached

Change-Id: I4e7c200865ef86a1abd9238e85ea117ee33ca19b
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
changes/24/771824/2
Moisés Guimarães de Medeiros 6 months ago
parent
commit
203d8aee07
  1. 6
      files/certmonger-memcached-refresh.sh

6
files/certmonger-memcached-refresh.sh

@ -1,7 +1,7 @@
#!/bin/bash
container_cli=$(hiera -c /etc/puppet/hiera.yaml container_cli podman)
container_name=$($container_cli ps --format="{{.Names}}" | grep metrics_qdr)
container_name=$($container_cli ps --format="{{.Names}}" | grep memcached)
service_certificate="$(hiera -c /etc/puppet/hiera.yaml tripleo::profile::base::memcached::certificate_specs.service_certificate)"
service_key="$(hiera -c /etc/puppet/hiera.yaml tripleo::profile::base::memcached::certificate_specs.service_key)"
@ -11,8 +11,8 @@ $container_cli exec "$container_name" cp "/var/lib/kolla/config_files/src-tls$se
$container_cli exec "$container_name" cp "/var/lib/kolla/config_files/src-tls$service_key" "$service_key"
# Set appropriate permissions
$container_cli exec "$container_name" chown qdrouterd:qdrouterd "$service_certificate"
$container_cli exec "$container_name" chown qdrouterd:qdrouterd "$service_key"
$container_cli exec "$container_name" chown memcached:memcached "$service_certificate"
$container_cli exec "$container_name" chown memcached:memcached "$service_key"
# Trigger a container restart to read the new certificates
$container_cli restart $container_name
Loading…
Cancel
Save