Skip to content

egress-proxy delete leaves both SGs behind #1651

Closed

Description

@scttfrdmn

Part of the Leave-no-trace epic spore-host/spore-host#752. Design: every spore.host tool removes what it created once nothing it manages is active, after a 24 h grace. The rollout is report mode first, then reap. The boundary spore-host/spawn-instance-boundary is the only permanent piece. Account trust boundary: nothing in a spore.host account may reach 942542972736, so cleanup there is in-account only.

Seen in a real account: spawn-egress-proxy-<vpc> and spawn-egress-clients-<vpc> were left with no ENIs (deleted by hand in #749).

Causes in pkg/egressproxy/deploy/teardown.go and groups.go:

  • it deletes the proxy group first and stops on failure;
  • GroupInUseError becomes Kept with a nil error;
  • groupUsers checks instances only, never ENIs;
  • the DependencyViolation retry gives up after 2 minutes.

Fix:

  1. terminate and wait;
  2. wait until no ENI references either group;
  3. revoke the rules where each group references the other;
  4. delete both groups with up to 10 minutes of backoff, collecting the errors;
  5. exit non-zero if anything is left.

Also in the reaper's net sweep: log DependencyViolation, and paginate DescribeSecurityGroups (netresources.go:419,474). LIVE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponent:spawn

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions