|
@ -1634,7 +1634,7 @@ setup_host_resources () { |
|
|
## requirements. |
|
|
## requirements. |
|
|
continue |
|
|
continue |
|
|
fi |
|
|
fi |
|
|
setup_host_resource "$service" |
|
|
|
|
|
|
|
|
setup_host_resource "$subservice" || return 1 |
|
|
loaded[$subservice]=1 |
|
|
loaded[$subservice]=1 |
|
|
done |
|
|
done |
|
|
done |
|
|
done |
|
@ -1716,6 +1716,13 @@ yaml_get_interpret() { |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|
;; |
|
|
;; |
|
|
|
|
|
"!file-content") |
|
|
|
|
|
source=$(echo "$content" | expand_vars) || { |
|
|
|
|
|
err "shell expansion failed" |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
cat "$source" || return 1 |
|
|
|
|
|
;; |
|
|
*) |
|
|
*) |
|
|
err "Invalid object tag ${WHITE}$tag${NORMAL}" |
|
|
err "Invalid object tag ${WHITE}$tag${NORMAL}" |
|
|
return 1 |
|
|
return 1 |
|
@ -2851,7 +2858,7 @@ _get_master_service_for_service_cached () { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
## Action provided by relation ? |
|
|
## Action provided by relation ? |
|
|
container_relation=$(_get_container_relation "$metadata") |
|
|
|
|
|
|
|
|
container_relation=$(_get_container_relation "$metadata") || exit 1 |
|
|
read-0 target_service _ _ < <(get_service_relation "$service" "$container_relation") |
|
|
read-0 target_service _ _ < <(get_service_relation "$service" "$container_relation") |
|
|
if [ -z "$target_service" ]; then |
|
|
if [ -z "$target_service" ]; then |
|
|
err "Couldn't find ${WHITE}relations.${container_relation}${NORMAL} in" \ |
|
|
err "Couldn't find ${WHITE}relations.${container_relation}${NORMAL} in" \ |
|
@ -4032,12 +4039,15 @@ get_all_relations "${services_args[@]}" >/dev/null || exit 1 |
|
|
if [ "$is_docker_compose_action" -a "${#services_args[@]}" -gt 0 ]; then |
|
|
if [ "$is_docker_compose_action" -a "${#services_args[@]}" -gt 0 ]; then |
|
|
services=($(get_master_services "${services_args[@]}")) || exit 1 |
|
|
services=($(get_master_services "${services_args[@]}")) || exit 1 |
|
|
if [ "$action" == "up" ]; then |
|
|
if [ "$action" == "up" ]; then |
|
|
## remove run-once |
|
|
|
|
|
|
|
|
declare -A seen |
|
|
for service in $(get_ordered_service_dependencies "${services_args[@]}"); do |
|
|
for service in $(get_ordered_service_dependencies "${services_args[@]}"); do |
|
|
type="$(get_service_type "$service")" || exit 1 |
|
|
|
|
|
if [ "$type" != "run-once" ]; then |
|
|
|
|
|
action_posargs+=("$service") |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
mservice=$(get_master_service_for_service "$service") |
|
|
|
|
|
[ "${seen[$mservice]}" ] && continue |
|
|
|
|
|
type="$(get_service_type "$mservice")" || exit 1 |
|
|
|
|
|
## remove run-once |
|
|
|
|
|
[ "$type" == "run-once" ] && continue |
|
|
|
|
|
seen[$mservice]=1 |
|
|
|
|
|
action_posargs+=("$mservice") |
|
|
done |
|
|
done |
|
|
else |
|
|
else |
|
|
action_posargs+=("${services[@]}") |
|
|
action_posargs+=("${services[@]}") |
|
|