|
|
@ -3057,7 +3057,7 @@ _get_master_service_for_service_cached () { |
|
|
|
fi |
|
|
|
|
|
|
|
## Action provided by relation ? |
|
|
|
container_relation=$(_get_container_relation "$metadata") || exit 1 |
|
|
|
container_relation=$(_get_container_relation "$metadata") || return 1 |
|
|
|
read-0 target_service _ _ < <(get_service_relation "$service" "$container_relation") |
|
|
|
if [ -z "$target_service" ]; then |
|
|
|
err "Couldn't find ${WHITE}relations.${container_relation}${NORMAL} in" \ |
|
|
@ -3298,7 +3298,7 @@ switch_to_relation_service() { |
|
|
|
## XXXvlab: can't get real config here |
|
|
|
if ! read-0 ts _ _ < <(get_service_relation "$SERVICE_NAME" "$relation"); then |
|
|
|
err "Couldn't find relation ${DARKCYAN}$relation${NORMAL}." |
|
|
|
exit 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
|
|
|
|
export SERVICE_NAME="$ts" |
|
|
@ -3306,8 +3306,8 @@ switch_to_relation_service() { |
|
|
|
DOCKER_BASE_IMAGE=$(service_base_docker_image "$SERVICE_NAME") |
|
|
|
export DOCKER_BASE_IMAGE |
|
|
|
|
|
|
|
target_charm=$(get_service_charm "$ts") || exit 1 |
|
|
|
target_charm_path=$(charm.get_dir "$target_charm") || exit 1 |
|
|
|
target_charm=$(get_service_charm "$ts") || return 1 |
|
|
|
target_charm_path=$(charm.get_dir "$target_charm") || return 1 |
|
|
|
|
|
|
|
cd "$target_charm_path" |
|
|
|
|
|
|
@ -3531,7 +3531,7 @@ get_compose_yml_content() { |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -z "$COMPOSE_YML_FILE" ]; then |
|
|
|
COMPOSE_YML_FILE=$(get_compose_yml_location) || exit 1 |
|
|
|
COMPOSE_YML_FILE=$(get_compose_yml_location) || return 1 |
|
|
|
fi |
|
|
|
if [ -e "$COMPOSE_YML_FILE" ]; then |
|
|
|
debug "Found $WHITE$exname$NORMAL YAML file in '$COMPOSE_YML_FILE'." |
|
|
@ -4322,7 +4322,7 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then |
|
|
|
esac |
|
|
|
} < <(has_service_action "$action_service" "$action") |
|
|
|
services_args=("$action_service") |
|
|
|
get_all_relations "${services_args[@]}" >/dev/null 2>&1 || return 1 |
|
|
|
get_all_relations "${services_args[@]}" >/dev/null 2>&1 || exit 1 |
|
|
|
|
|
|
|
## Divert logging to stdout to stderr |
|
|
|
log () { cat >&2; } |
|
|
|