debug-hooks doesn't properly handle actions in 2.8

Bug #1870029 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel

Bug Description

In 2.8 we assumed that JUJU_HOOK_NAME is set outside of the debug session, but it is only set for hooks, and not for actions. In 2.7 JUJU_HOOK_NAME was set to the name of the action.

The issue is this line:
tmux new-window -t $JUJU_UNIT_NAME -n $JUJU_HOOK_NAME "$JUJU_DEBUG/hook.sh"

If JUJU_HOOK_NAME is not set, this ends up as
tmux new-window -t $JUJU_UNIT_NAME -n "$JUJU_DEBUG/hook.sh"

which means we set the window name to the name of the debug script, but don't exec the debug script.

It means you end up in just a shell, without the nice debug message, etc.

Tags: debug-hooks
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.8-beta1 → 2.8-rc1
John A Meinel (jameinel)
Changed in juju:
status: Triaged → Fix Committed
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.8-rc1 → 2.8-beta1
assignee: nobody → John A Meinel (jameinel)
Harry Pidcock (hpidcock)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.