Skip to content

Vanishing revisions even when they are still referred from route #4234

@nak3

Description

@nak3

In what area(s)?

/kind spec

What version of Knative?

HEAD

Steps to Reproduce the Problem

0. Make GC set very short to produce the issue easily (optional)

  stale-revision-create-delay: 5s
  stale-revision-lastpinned-debounce: 10s
  stale-revision-minimum-generations: "1"
  stale-revision-timeout: 10s

1. Create v1 service

cat <<EOF | kubectl apply -f -
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: echo
spec:
  template:
    metadata:
      name: echo-v1
    spec:
      containers:
        - image: duglin/echo
EOF
$ kubectl get config
NAME            LATESTCREATED         LATESTREADY           READY   REASON
echo            echo-v1               echo-v1               True    

2. Create v2 service

cat <<EOF | kubectl apply -f -
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: echo
spec:
  template:
    metadata:
      name: echo-v2
    spec:
      containers:
        - image: duglin/echo
  traffic:
  - tag: old
    revisionName: echo-v1
    percent: 50
  - tag: new
    revisionName: echo-v2
    percent: 50
EOF
$ kubectl get config
NAME            LATESTCREATED         LATESTREADY           READY   REASON
echo            echo-v2               echo-v2               True    

Actual Behavior

echo-v1 is vanished and service becomes RevisionMissing status.

$ kubectl get ksvc
NAME            URL                                        LATESTCREATED         LATESTREADY           READY   REASON
echo            http://echo.default.example.com            echo-v2               echo-v2               False   RevisionMissing

revision (echo-v1) was vanished.

$ kubectl get revisions.serving.knative.dev 
NAME                  SERVICE NAME          GENERATION   READY   REASON
echo-v2               echo-v2               2            True    

Expected Behavior

Do not GC when route still refers to the revisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.kind/specDiscussion of how a feature should be exposed to customers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions