Skip to content

The old revision pod is still in running state with 100% traffic routing to new revision #755

Closed

Description

@jessiezcc

Expected Behavior

After routing 100% to new revision and removing all references to the old revision, I expect the old revision pod to be torn down and disappear

Actual Behavior

old revision pod is still in running state

Steps to Reproduce the Problem

  1. bazel run sample/helloworld/everything.create
  2. bazel run sample/helloworld:updated_everything.apply

jessiezhu@gobaby:~/go/src/github.com/elafros/elafros$ kubectl -n ela-system get pods
NAME READY STATUS RESTARTS AGE
configuration-example-00001-autoscaler-77696d95c6-84wml 1/1 Running 0 8m
configuration-example-00002-autoscaler-6b4dbf566b-7rknq 1/1 Running 0 7m
ela-activator-6f9d78ff7c-rstwc 1/1 Running 0 2d
ela-controller-54dcdfb6-4qdkw 1/1 Running 0 18m
ela-webhook-7c4d5c5547-mvb2p 1/1 Running 0 2d

Additional Info

status:
conditions:
- state: Ready
status: "True"
domain: route-example.default.demo-domain.com
traffic:
- percent: 100
revisionName: configuration-example-00002

Activity

  1. google-prow-robot commented on Apr 26, 2018

    @google-prow-robot

    @jessiezcc: GitHub didn't allow me to assign the following users: user.

    Note that only elafros members and repo collaborators can be assigned.

    Details

    In response to this:

    Expected Behavior

    After routing 100% to new revision, I expect the old revision pod to be torn down and disappear

    Actual Behavior

    old revision pod is still in running state

    Steps to Reproduce the Problem

    1. bazel run sample/helloworld/everything.create
    2. bazel run sample/helloworld:updated_everything.apply

    jessiezhu@gobaby:~/go/src/github.com/elafros/elafros$ kubectl -n ela-system get pods
    NAME READY STATUS RESTARTS AGE
    configuration-example-00001-autoscaler-77696d95c6-84wml 1/1 Running 0 8m
    configuration-example-00002-autoscaler-6b4dbf566b-7rknq 1/1 Running 0 7m
    ela-activator-6f9d78ff7c-rstwc 1/1 Running 0 2d
    ela-controller-54dcdfb6-4qdkw 1/1 Running 0 18m
    ela-webhook-7c4d5c5547-mvb2p 1/1 Running 0 2d

    Additional Info

    status:
    conditions:

    • state: Ready
      status: "True"
      domain: route-example.default.demo-domain.com
      traffic:
    • percent: 100
      revisionName: configuration-example-00002

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

  2. added
    area/API
    area/build
    area/test-and-release
    kind/bug
    kind/feature
    kind/doc
    on Apr 26, 2018
  3. removed
    area/API
    area/build
    area/test-and-release
    on Apr 27, 2018
  4. 11 remaining items

  5. added
    area/test-and-release
    kind/bug
    kind/doc
    on May 29, 2018
  6. glyn commented on Jun 12, 2018

    @glyn
    Contributor

    @josephburnett Unless @markusthoemmes is actively working on this, I'd like to investigate the issue.

  7. glyn commented on Jun 13, 2018

    @glyn
    Contributor

    I've reproduced the issue (with enable-scale-to-zero turned off), but I'm wondering about the UX. You see, after the fact, the user can split the traffic between the old and new revisions and they will both continue to work. So automatically deleting a revision with 0% traffic routed to it presumes that the user will not want to switch traffic back to that revision later. For instance, they might deploy a new version of an application and after 100% of traffic is routed to the new revision, they could discover a problem and want to route the majority of traffic to the previous revision.

    Another way of looking at the UX is in terms of ease of reversing actions. If the user splits traffic 99% to the new revision and 1% to the old revision, they can back out of this very easily. But if they end up with 100% of traffic going to the new revision and we automatically prune the old revision, it’s harder for them to reverse what they just did (suppose they made a mistake).

    I wonder if we should make scaling to zero more intelligent and have it apply to revisions which are no longer routable, even if enable-scale-to-zero is turned off. That way, old revision pods could be resurrected if needed. Admittedly that adds complexity and might confuse some users.

    Another option would be to leave the behaviour the way it is, especially now that enable-scale-to-zero is turned on by default. It may be reasonable for expect users who choose to turn off enable-scale-to-zero to manage their revisions more carefully and to cope with pruning unroutable revisions. I don't like this option as we are effectively leaking revision pods.

    Thoughts?

  8. josephburnett commented on Jun 13, 2018

    @josephburnett
    Contributor

    I don't plan to support turning off scale-to-zero. That flag is there just as a way to roll out the change. all revisions should scale to zero.

    But there has been some more discussion and design around serving states which outlines a better architecture: #645 (comment) So please disregard my comment about transitioning to Retired.

  9. glyn commented on Jun 13, 2018

    @glyn
    Contributor

    I see, thanks. So the simplest fix for this issue is to wait until scaling to zero by default has "bedded in" and then delete the enable-scale-to-zero flag.

  10. mattmoor commented on Jul 8, 2018

    @mattmoor
    Contributor

    Scale to zero is enabled by default

  11. josephburnett commented on Jul 9, 2018

    @josephburnett
    Contributor

    Created #1531 to track clean up Reserve Revisions no longer routable.

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

Metadata

Metadata

Assignees

Labels

area/APIarea/autoscalearea/buildarea/monitoringarea/test-and-releasekind/bugkind/dockind/feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions