|
@ -2636,6 +2636,7 @@ get_all_relations () { |
|
|
## situation is stable |
|
|
## situation is stable |
|
|
|
|
|
|
|
|
if [ "${#summon[@]}" != 0 ]; then |
|
|
if [ "${#summon[@]}" != 0 ]; then |
|
|
|
|
|
declare -A summon_requeued=() |
|
|
while [ "${#summon[@]}" != 0 ]; do |
|
|
while [ "${#summon[@]}" != 0 ]; do |
|
|
service="${summon[0]}" |
|
|
service="${summon[0]}" |
|
|
relation_name="${summon[1]}" |
|
|
relation_name="${summon[1]}" |
|
@ -2650,10 +2651,19 @@ get_all_relations () { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ "${#providers[@]}" -gt 1 ]; then |
|
|
if [ "${#providers[@]}" -gt 1 ]; then |
|
|
|
|
|
if [ -z "${summon_requeued[$service/$relation_name]}" ]; then |
|
|
|
|
|
debug "Auto-summon ${DARKYELLOW}$service${NORMAL}" \ |
|
|
|
|
|
"--${DARKBLUE}$relation_name${NORMAL}--> ($DARKYELLOW""${providers[@]}""$NORMAL)"\ |
|
|
|
|
|
"(> 1 provider). Requeing." |
|
|
|
|
|
summon+=("$service" "$relation_name" "$relation_def") ## re-queue it |
|
|
|
|
|
summon_requeued["$service/$relation_name"]=1 |
|
|
|
|
|
continue |
|
|
|
|
|
else |
|
|
warn "Auto-summon ${DARKYELLOW}$service${NORMAL}" \ |
|
|
warn "Auto-summon ${DARKYELLOW}$service${NORMAL}" \ |
|
|
"--${DARKBLUE}$relation_name${NORMAL}--> ($DARKYELLOW""${providers[@]}""$NORMAL)"\ |
|
|
"--${DARKBLUE}$relation_name${NORMAL}--> ($DARKYELLOW""${providers[@]}""$NORMAL)"\ |
|
|
"(> 1 provider). Choosing first." |
|
|
"(> 1 provider). Choosing first." |
|
|
fi |
|
|
fi |
|
|
|
|
|
fi |
|
|
ts="${providers[0]}" |
|
|
ts="${providers[0]}" |
|
|
|
|
|
|
|
|
## YYYvlab: should be seen even in no debug mode no ? |
|
|
## YYYvlab: should be seen even in no debug mode no ? |
|
@ -2669,6 +2679,7 @@ get_all_relations () { |
|
|
array_read-0 services_uses < <(_get_services_uses "$ts") |
|
|
array_read-0 services_uses < <(_get_services_uses "$ts") |
|
|
services[$ts]=1 |
|
|
services[$ts]=1 |
|
|
changed=1 |
|
|
changed=1 |
|
|
|
|
|
continue 2 |
|
|
done |
|
|
done |
|
|
continue |
|
|
continue |
|
|
fi |
|
|
fi |
|
|