|
@ -1907,7 +1907,7 @@ _run_service_relation () { |
|
|
|
|
|
|
|
|
base_script_name=$(charm.has_relation_hook "$charm" "$relation_name" relation-joined) || true |
|
|
base_script_name=$(charm.has_relation_hook "$charm" "$relation_name" relation-joined) || true |
|
|
target_script_name=$(charm.has_relation_hook "$target_charm" "$relation_name" relation-joined) || true |
|
|
target_script_name=$(charm.has_relation_hook "$target_charm" "$relation_name" relation-joined) || true |
|
|
[ "$base_script_name" -o "$target_script_name" ] || return 0 |
|
|
|
|
|
|
|
|
[ -n "$base_script_name" ] || [ -n "$target_script_name" ] || return 0 |
|
|
|
|
|
|
|
|
relation_dir=$(get_relation_data_dir "$service" "$target_service" "$relation_name") || return 1 |
|
|
relation_dir=$(get_relation_data_dir "$service" "$target_service" "$relation_name") || return 1 |
|
|
RELATION_DATA_FILE=$(get_relation_data_file "$service" "$target_service" "$relation_name" "$relation_config") || return 1 |
|
|
RELATION_DATA_FILE=$(get_relation_data_file "$service" "$target_service" "$relation_name" "$relation_config") || return 1 |
|
@ -3218,8 +3218,8 @@ _get_docker_compose_mixin_from_metadata_cached() { |
|
|
|
|
|
|
|
|
image=$(echo "$metadata" | shyaml get-value "docker-image" 2>/dev/null) |
|
|
image=$(echo "$metadata" | shyaml get-value "docker-image" 2>/dev/null) |
|
|
[ "$image" == "None" ] && image="" |
|
|
[ "$image" == "None" ] && image="" |
|
|
if [ "$image" ]; then |
|
|
|
|
|
if [ "$subordinate" ]; then |
|
|
|
|
|
|
|
|
if [ -n "$image" ]; then |
|
|
|
|
|
if [ -n "$subordinate" ]; then |
|
|
err "Subordinate charm can not have a ${WHITE}docker-image${NORMAL} value." |
|
|
err "Subordinate charm can not have a ${WHITE}docker-image${NORMAL} value." |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
@ -4541,8 +4541,7 @@ if [ "${PIPESTATUS[0]}" != 0 ]; then |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$action" == "run" -a "${#services_args}" != 0 ]; then |
|
|
|
|
|
|
|
|
if [ "$action" == "run" ] && [ "${#services_args}" != 0 ]; then |
|
|
charm=$(get_service_charm "${services_args[0]}") || exit 1 |
|
|
charm=$(get_service_charm "${services_args[0]}") || exit 1 |
|
|
metadata=$(charm.metadata "$charm") || exit 1 |
|
|
metadata=$(charm.metadata "$charm") || exit 1 |
|
|
SERVICE_TYPE="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true |
|
|
SERVICE_TYPE="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true |
|
|