Browse Source

fix: [apache] avoid leaking stopped container when launching letsencrypt creation.

framadate
Valentin Lab 6 years ago
parent
commit
7892a25823
  1. 8
      apache/lib/common
  2. 2
      apache/test/vhost_cert_provider

8
apache/lib/common

@ -216,9 +216,11 @@ ssl_plugin_cert-provider_prepare() {
options=$(yaml_key_val_str "options" "$cfg") || return 1
service_config=$(yaml_key_val_str "$service" "$options")
compose --debug --add-compose-content "$service_config" run --service-ports "$service" \
crt create "$DOMAIN" $(echo "$SERVER_ALIAS" | shyaml -y get-values 2>/dev/null) || return 1
compose --debug --add-compose-content "$service_config" run --rm --service-ports "$service" \
crt create "$DOMAIN" $(echo "$SERVER_ALIAS" | shyaml -y get-values 2>/dev/null) || {
err "Failed to launch letsencrypt for certificate creation."
return 1
}
config-add "\
services:
$MASTER_TARGET_SERVICE_NAME:

2
apache/test/vhost_cert_provider

@ -137,7 +137,7 @@ ssl:
RELATIONS=(cert-provider foo a True)
apache_vhost_create" "known cert key"
noerror
is out reg 'Calling: compose .*foo: options: <merge_yaml_str\(.a., .12., )>.*run --service-ports foo.*'
is out reg 'Calling: compose .*foo: options: <merge_yaml_str\(.a., .12., )>.*run --rm --service-ports foo.*'
is out part 'config-add
| services:
| $MASTER_TARGET_SERVICE_NAME:

Loading…
Cancel
Save