Skip to content

[Studio] Friendlier message / recovery for left-over LOCK file #3865

@chefsalim

Description

@chefsalim

If the launcher process dies with a left-over LOCK file in the /hab/sup/default dir, common studio operations (eg building, and even removing the studio) fail with an error message.

➜  habitat git:(SA/update-poll) ✗ VERBOSE=1 hab studio rm
   hab-studio: Destroying Studio at /hab/studios/home--salim--Workspace--habitat (default)
kill: can't kill pid 41154: No such process

We should allow the user to recover from this scenario.

The offending code seems to be in studio/bin/hab-studio.sh:

kill_launcher() {
local pid_file
pid_file="$HAB_STUDIO_ROOT/hab/sup/default/LOCK"

if [ -f $pid_file ]; then
$bb kill $($bb cat $pid_file)
&& $bb rm -f $pid_file
fi
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Focus: StudioRelated to the Habitat Studio (core/hab-studio) componentType: BugIssues that describe broken functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions