Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Backport of Fixing panic in ECS runner uninstall when EFS is missing into release/0.11.x #4833

Conversation

hc-github-team-waypoint
Copy link
Collaborator

Backport

This PR is auto-generated from #4829 to be assessed for backporting due to the inclusion of the label backport/0.11.x.

The below text is copied from the body of the original PR.


This fixes a panic when uninstalling a runner if the EFS filesystem is not found or has been deleted out-of-band.

Panic stacktrace:

(venv) ➜  learn-hcp-waypoint-runners git:(main) ✗ waypoint runner uninstall -platform=ecs -id=ecs-runner
 ! Uninstalling runner...
 + Finding runner in ECS services...
 ! Deleting runner file system
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x106e94234]

goroutine 1 [running]:
github.com/hashicorp/waypoint/internal/runnerinstall.(*ECSRunnerInstaller).Uninstall(0x14000dd4090, {0x1083212c0, 0x140008bc840}, 0x14001282a10)
        /home/runner/work/waypoint/waypoint/internal/runnerinstall/ecs.go:400 +0xa34
github.com/hashicorp/waypoint/internal/cli.(*RunnerUninstallCommand).Run(0x1400010dc80, {0x140004bc530, 0x2, 0x5})
        /home/runner/work/waypoint/waypoint/internal/cli/runner_uninstall.go:134 +0x338
github.com/mitchellh/cli.(*CLI).Run(0x140002a2500)
        /home/runner/go/pkg/mod/github.com/mitchellh/cli@v1.1.2/cli.go:262 +0x4a8
github.com/hashicorp/waypoint/internal/cli.Main({0x1400006e0a0?, 0x1048a184c?, 0x107a7fd80?})
        /home/runner/work/waypoint/waypoint/internal/cli/main.go:127 +0x510
main.main()
        /home/runner/work/waypoint/waypoint/cmd/waypoint/main.go:14 +0xa8

How do I test this?

  • Install a runner to ECS
  • Find and manually delete the backing EFS filesystem
  • Uninstall the ECS runner
  • Observe no panic!

Overview of commits

@hc-github-team-waypoint hc-github-team-waypoint force-pushed the backport/missing-efs-panic/subtly-true-chipmunk branch from 4e7727e to dc1a335 Compare July 6, 2023 13:18
@hc-github-team-waypoint hc-github-team-waypoint merged commit 51fbee1 into release/0.11.x Jul 6, 2023
@hc-github-team-waypoint hc-github-team-waypoint force-pushed the backport/missing-efs-panic/subtly-true-chipmunk branch from 8cddc10 to d770db6 Compare July 6, 2023 13:18
@hc-github-team-waypoint hc-github-team-waypoint deleted the backport/missing-efs-panic/subtly-true-chipmunk branch July 6, 2023 13:18
@vercel vercel bot temporarily deployed to Preview – waypoint-ui July 6, 2023 13:20 Inactive
@vercel vercel bot temporarily deployed to Preview – waypoint July 6, 2023 13:23 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant