Skip to content

install-ate.sh: a crashed golden actor makes --delete-all keep the old golden snapshot #794

Description

Expected Behavior

--delete-all removes every actor, including crashed ones, so --deploy-demo-counter installs a fresh ActorTemplate with a newly generated golden snapshot.

Actual Behavior

When the skipped actor is a golden actor, its ActorTemplate survives the
teardown. The redeploy is then rejected, because an ActorTemplate spec is
immutable:

The ActorTemplate "counter" is invalid: spec: Invalid value: Spec is immutable
Error: error executing 'kubectl apply': exit status 1

The script continues and exits with 0. The cluster looks ready but still serves the previous golden snapshot. In my case it had been built by an older gVisor release, so every resume of the counter template failed with
while running "runsc restore": exit status 128, with nothing in the install output pointing back at the cause.

As a workaround, you can run --delete-demo-counter right before redeploying.

Steps to Reproduce the Problem

  1. hack/install-ate-kind.sh --deploy-ate-system && hack/install-ate-kind.sh --deploy-demo-counter
  2. Get the template's golden actor into STATUS_CRASHED (deleting its worker pod does it; running the e2e suites does it incidentally)
  3. hack/install-ate-kind.sh --delete-all, and note it reports cannot delete actor ... STATUS_CRASHED but exits 0
  4. hack/install-ate-kind.sh --deploy-demo-counter, and note the Spec is immutable error, also exit 0
  5. kubectl get actortemplate -n ate-demo-counter counter -o jsonpath='{.status.goldenSnapshot}' still shows the pre-teardown snapshot ID

Proposal

Let teardown delete STATUS_CRASHED actors directly, since a crashed actor has nothing to suspend, and make the ActorTemplate apply failure fail the step.

Specifications

  • Version: main
  • Platform: kind, Kubernetes v1.36.1, gvisor sandbox class

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working / bugfixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions