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 1832923: Forget bootstrap etcd member IP after bootstrap #367

Conversation

ironcladlou
Copy link
Contributor

After bootstrap completes, forget the bootstrap etcd member IP by clearing
the annotation from the endpoint configmap. Otherwise the etcd client will
continue failing to connect to the dead bootstrap node forever.

@ironcladlou
Copy link
Contributor Author

/test e2e-aws-upgrade

@openshift-ci-robot
Copy link

@ironcladlou: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test e2e-aws
  • /test e2e-aws-disruptive
  • /test e2e-azure
  • /test e2e-gcp
  • /test e2e-gcp-upgrade
  • /test e2e-metal-ipi
  • /test images
  • /test unit
  • /test verify
  • /test verify-deps

Use /test all to run all jobs.

In response to this:

/test e2e-aws-upgrade

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.

@ironcladlou
Copy link
Contributor Author

Latest failures are I think unrelated, and I have a successful 4.4 to 4.5 upgrade job. I want to do a little refactoring and add test coverage for this controller.

@ironcladlou ironcladlou changed the title Forget bootstrap etcd member IP after bootstrap Bug 1832923: Forget bootstrap etcd member IP after bootstrap Jun 1, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium 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 Jun 1, 2020
@openshift-ci-robot
Copy link

@ironcladlou: This pull request references Bugzilla bug 1832923, which is valid. The bug has been moved to the POST state. 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.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1832923: Forget bootstrap etcd member IP after bootstrap

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.

@ironcladlou ironcladlou force-pushed the cleanup-bootstrap-endpoint branch 2 times, most recently from 23cbbc0 to 1a23919 Compare June 2, 2020 00:15
@ironcladlou
Copy link
Contributor Author

@hexfusion @retroflexer @deads2k refactored, added a bunch of tests, re-running the Y upgrade test. Tomorrow I might go ahead and continue expanding the unit test while I'm in here to cover node=>configmap translation scenarios.

@ironcladlou
Copy link
Contributor Author

/retest

@ironcladlou
Copy link
Contributor Author

There's a problem here. In a real cluster the annotation is never cleaned up because the revision checks falsely detect a rollout because nodestates.targetrevision is empty. So, the unit tests are inaccurate. I need clarification on the semantics around these fields:

https://github.com/openshift/api/blob/master/operator/v1/types.go#L208

  1. What does an empty TargetRevision mean?
  2. What does an empty LatestAvailableRevision mean?

@ironcladlou
Copy link
Contributor Author

Now I'm relying on latestAvailableRevision instead of nodestatus.targetRevision.

@ironcladlou
Copy link
Contributor Author

@ironcladlou
Copy link
Contributor Author

AWS failures look unrelated:

[sig-network-edge][Conformance][Area:Networking][Feature:Router] The HAProxy router should pass the gRPC interoperability tests [Suite:openshift/conformance/parallel/minimal]
[sig-network][Feature:Router] The HAProxy router should expose prometheus metrics for a route [Suite:openshift/conformance/parallel]

Failing tests:

[sig-network] Services should be rejected when no endpoints exist [Skipped:ibmcloud] [Suite:openshift/conformance/parallel] [Suite:k8s]

https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_cluster-etcd-operator/367/pull-ci-openshift-cluster-etcd-operator-master-e2e-azure/1604

Dug into the artifacts and nothing seems amiss with etcd or the apiserver.

/retest

@ironcladlou
Copy link
Contributor Author

@hexfusion @retroflexer this is ready for review

@ironcladlou
Copy link
Contributor Author

@ironcladlou
Copy link
Contributor Author

/retest

1 similar comment
@ironcladlou
Copy link
Contributor Author

/retest

Copy link
Contributor

@hexfusion hexfusion left a comment

Choose a reason for hiding this comment

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

Looks good overall, a few questions.

configmapClient: kubeClient.CoreV1(),
}
return factory.New().ResyncEvery(time.Minute).WithInformers(
operatorClient.Informer(),
configmapsInformer.Informer(),
kubeInformers.InformersFor(operatorclient.TargetNamespace).Core().V1().ConfigMaps().Informer(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious what is the difference between the former and the latter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

functionally equivalent, both cause sync to trigger on configmap change in the openshift-etcd namespace

Copy link
Contributor

Choose a reason for hiding this comment

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

OK so why change :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because configmapsInformer was only used in one place (so what's the point of a local to begin with), and also had a misleading name (it isn't an informer for all configmaps, it's only for the openshift-etcd namespace).

After bootstrap completes, forget the bootstrap etcd member IP by clearing
the annotation from the endpoint configmap. Otherwise the etcd client will
continue failing to connect to the dead bootstrap node forever.
@hexfusion
Copy link
Contributor

/test images

@hexfusion
Copy link
Contributor

/retest

@hexfusion
Copy link
Contributor

/test all

@hexfusion
Copy link
Contributor

/refresh
/retest

@hexfusion
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion, ironcladlou

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 Jun 5, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

// check to see if bootstrapping is complete
bootstrapFinishedConfigMap, err := configMapClient.ConfigMaps("kube-system").Get("bootstrap")
if err != nil {
if errors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: prefer

if errors.IsNotFound(){
   return
}
if err != nil{
   different return
}

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 5, 2020

@ironcladlou: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-disruptive c314c0b link /test e2e-aws-disruptive

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit abe09ec into openshift:master Jun 5, 2020
@openshift-ci-robot
Copy link

@ironcladlou: All pull requests linked via external trackers have merged: openshift/cluster-etcd-operator#367. Bugzilla bug 1832923 has been moved to the MODIFIED state.

In response to this:

Bug 1832923: Forget bootstrap etcd member IP after bootstrap

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-medium Referenced Bugzilla bug's severity is medium 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

6 participants