Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1900989: unidling: switch away from endpoints to the service #165

Conversation

frobware
Copy link

@frobware frobware commented Jan 28, 2021

Previously idle annotations were added to endpoints. In 4.6 the router
switched to watching endpointslices which don't have the idle
annotation. There was some upstream PRs/discussion to automatically
propagate existing annotations from endpoints to endpointslices:

kubernetes/kubernetes#98116

As that was a non-starter we changed oc/idle to annotate the service
(and the endpoints for backwards compatibility). In the router we are
already watching service and and when we get endpoint changes we now
check for the idle annotation on the service. If it is present we
write the cluster-ip address into the haproxy.config as we previously
did prior to switching to endpointslices. We watch endpointslices for
dual-stack and IPv6 support.

This change means that undiling needs to watch for services with idle
annotations as opposed to endpoints. Switch the unidling controller to
look for idle annotations on the service.

Requires:

TODO: amend origin test (openshift/origin#25847) to exercise idle/unidle via a route and not just the service.

The router (in 4.7) has moved to using endpointslices. Rather than
annotating both endpoints and endpointslices oc/idle will now annotate
the service associated with the endpoints. Similarly unidling now
needs to remove those idle annotations from the service.

- openshift/oc#720
- openshift/router#225
@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jan 28, 2021
@frobware
Copy link
Author

/cc @aojea

@frobware frobware force-pushed the unidle-switch-from-endpoints-to-service branch from d44e796 to ce9b4b9 Compare January 28, 2021 13:59
As oc/idle currently annotates endpoints for backwards compatibilty we
remove any idle annotations after they have been removed from the
service and the scaled resources have been scaled back.

If we don't continue with annotating endpoints this commit can be
dropped.

openshift/oc#720
@frobware frobware force-pushed the unidle-switch-from-endpoints-to-service branch from ce9b4b9 to 5083147 Compare January 28, 2021 14:02
@frobware
Copy link
Author

cc @openshift/openshift-team-network-edge

@frobware
Copy link
Author

Also needs openshift/openshift-apiserver#180

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@frobware
Copy link
Author

/refresh

@frobware
Copy link
Author

/retest

frobware added a commit to frobware/origin that referenced this pull request Jan 29, 2021
oc/idle will now additionally annotate the service. The test
explicitly deletes it so removing that call so that we can verify the
following PRs, all related to annotating the service when idling.

- openshift/oc#720
- openshift/router#225
- openshift/sdn#252
- openshift/openshift-apiserver#180
- openshift/openshift-controller-manager#165
@sttts
Copy link
Contributor

sttts commented Feb 1, 2021

Why didn't we notice that idling got broken? Is there no e2e test? Does one of the PRs add a test?

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@frobware
Copy link
Author

frobware commented Feb 2, 2021

Why didn't we notice that idling got broken? Is there no e2e test? Does one of the PRs add a test?

We have an idling test that is currently excluded; PR to re-enable openshift/origin#25847.
However, it turns out that that idling test didn't exercise idling through a router.

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

3 similar comments
@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 2, 2021
@soltysh
Copy link
Member

soltysh commented Feb 2, 2021

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 2, 2021
@danwinship
Copy link
Contributor

This change means that unidling needs to watch for services with idle
annotations as opposed to endpoints.

Why does it mean that? oc idle was changed to annotate both, therefore existing components should be able to continue watching endpoints for now, shouldn't they?

@danwinship
Copy link
Contributor

This change would also mean that if you tried to use a 4.6 oc to idle services in a 4.7 cluster, it would claim to be doing something, but wouldn't actually have any effect.

@soltysh
Copy link
Member

soltysh commented Feb 2, 2021

This change would also mean that if you tried to use a 4.6 oc to idle services in a 4.7 cluster, it would claim to be doing something, but wouldn't actually have any effect.

Correct, that's why we should ensure the oc bits gets backported asap to 4.6

@openshift-ci-robot
Copy link
Contributor

@frobware: This pull request references Bugzilla bug 1900989, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

@frobware
Copy link
Author

frobware commented Feb 2, 2021

Why does it mean that? oc idle was changed to annotate both, therefore existing components should be able to continue watching endpoints for now, shouldn't they?

Yes, this is true. Uniding should remove idle annotations from services as well.

@frobware
Copy link
Author

frobware commented Feb 2, 2021

I think we can simplify this. The additions here should remove idle annotations on services. It would come to the same thing. all I would really do is change the order of removing annotations.

@frobware
Copy link
Author

frobware commented Feb 3, 2021

openshift/oc#720 has merged.

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 3, 2021
@openshift-merge-robot openshift-merge-robot merged commit 2f923e3 into openshift:master Feb 3, 2021
@openshift-ci-robot
Copy link
Contributor

@frobware: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 1900989 has not been moved to the MODIFIED state.

In response to this:

Bug 1900989: unidling: switch away from endpoints to the service

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.

openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/openshift-apiserver that referenced this pull request Feb 3, 2021
oc/idle is now updating the service in addition to the endpoints when
idling.

Related PRs:

- openshift/openshift-controller-manager#165
- openshift/oc#720
- openshift/router#225
- openshift/sdn#252
@frobware
Copy link
Author

frobware commented Feb 3, 2021

/cherry-pick release-4.6

@openshift-cherrypick-robot

@frobware: new pull request created: #167

In response to this:

/cherry-pick release-4.6

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants