Browse Source

fix: try to pair before summoning

Relations declared as auto summon was not trying to pair with an
existing service before.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
test1
Valentin Lab 5 years ago
parent
commit
162b84567f
  1. 9
      bin/compose-core

9
bin/compose-core

@ -2409,7 +2409,7 @@ get_all_relations () {
auto=$(echo "$relation_def" | shyaml get-value auto pair 2>/dev/null)
case "$auto" in
"pair")
"pair"|"summon")
service_list=()
array_read-0 service_list < <(array_keys_to_stdin services)
providers=()
@ -2436,12 +2436,11 @@ get_all_relations () {
"(> 1 provider)."
continue
else
: ## Do nothing
if [ "$auto" == "summon" ]; then
summon+=("$service" "$relation_name" "$relation_def")
fi
fi
;;
"summon")
summon+=("$service" "$relation_name" "$relation_def")
;;
""|null|disable|disabled)
:
;;

Loading…
Cancel
Save