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

Fix oncefrom with MachineConfig #483

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

runcom
Copy link
Member

@runcom runcom commented Feb 23, 2019

- What I did

Builds on top of #464 so we can be sure the node calls are at a minimum required. Looks like onceFrom with a MachineConfig still requires a cluster to be around (not the case for raw ignition).
The patch makes sure a kube and mc clients are around when running in onceFrom with a machineconfig avoiding any panic.

This also incorporates #476 and it's now correctly passing.

/cc @ashcrow ptal

- How to verify it

- Description for the changelog

@openshift-ci-robot
Copy link
Contributor

@runcom: GitHub didn't allow me to request PR reviews from the following users: ptal.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

- What I did

Builds on top of #464 so we can be sure the node calls are at a minimum required. Looks like onceFrom with a MachineConfig still requires a cluster to be around (not the case for raw ignition).
The patch makes sure a kube and mc clients are around when running in onceFrom with a machineconfig avoiding any panic.

This also incorporates #476 and it's now correctly passing.

/cc @ashcrow ptal

- How to verify it

- Description for the changelog

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.

@runcom
Copy link
Member Author

runcom commented Feb 23, 2019

/hold

holding cause it requires #464

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 2019
@runcom runcom force-pushed the fix-oncefrom branch 2 times, most recently from a7b1490 to 0a9d1cb Compare February 23, 2019 18:15
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 2019
@runcom runcom force-pushed the fix-oncefrom branch 3 times, most recently from 5f511a5 to aed3d11 Compare February 23, 2019 19:50
@runcom
Copy link
Member Author

runcom commented Feb 23, 2019

🤔

/retest

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 18, 2019
@runcom
Copy link
Member Author

runcom commented Mar 18, 2019

/hold cancel

rebased and ready to be reviewed

@vrutkovs is testing this out wrt rhel scaleup tests

@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 Mar 18, 2019
@runcom
Copy link
Member Author

runcom commented Mar 18, 2019

origin flakes

/retest

@runcom
Copy link
Member Author

runcom commented Mar 18, 2019

/retest

@runcom
Copy link
Member Author

runcom commented Mar 18, 2019

openshift-sdn error (https://paste.fedoraproject.org/paste/U~ffhpHPrpSZvvZUzf3t7g) - reported

/retest

Copy link
Member

@ashcrow ashcrow left a comment

Choose a reason for hiding this comment

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

LGTM. I am going to request a second set of eyes though as well to be thorough.

@ashcrow ashcrow requested a review from sdodson March 18, 2019 13:56
@runcom runcom force-pushed the fix-oncefrom branch 3 times, most recently from ea2b4aa to 66c332c Compare March 18, 2019 14:18
@runcom
Copy link
Member Author

runcom commented Mar 18, 2019

/retest

cb, err := common.NewClientBuilder(startOpts.kubeconfig)
if err != nil {
if startOpts.onceFrom != "" {
glog.Info("Cannot initialize ClientBuilder, likely in onceFrom mode with Ignition")
Copy link
Member

Choose a reason for hiding this comment

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

"likely"? We just checked it 😉

Why not just

if startopts.onceFrom == "" {
   glog.Fatalf(...)
}

Copy link
Member Author

Choose a reason for hiding this comment

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

we haven't checked that we're in onceFrom with ignition, that's why, the log is confusing though, need to reword it

if cb != nil {
kubeClient, err = cb.KubeClient(componentName)
if err != nil {
glog.Info("Cannot initialize kubeClient, likely in onceFrom mode with Ignition")
Copy link
Member

Choose a reason for hiding this comment

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

Confused by this, won't cb == nil if we're in oncefrom?

pkg/daemon/daemon.go Show resolved Hide resolved
Signed-off-by: Antonio Murdaca <runcom@linux.com>
@cgwalters
Copy link
Member

I rebased this 🏄‍♂️

@cgwalters
Copy link
Member

@vrutkovs One thing that would help us...are there use cases for both oncefrom with raw Ignition and from a MachineConfig object pulled from the cluster? Why do we need both?

@vrutkovs
Copy link
Member

are there use cases for both oncefrom with raw Ignition and from a MachineConfig object pulled from the cluster? Why do we need both?

In scaleup we only use Ignition, can't think of a case where MachineConfig + --once-from would be used

@vrutkovs
Copy link
Member

/retest

@sdodson
Copy link
Member

sdodson commented Mar 19, 2019

/retest
VPC limits

@cgwalters
Copy link
Member

We can address the nits above in followup.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, cgwalters, runcom

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:
  • OWNERS [ashcrow,cgwalters,runcom]

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

@vrutkovs
Copy link
Member

/retest

@openshift-merge-robot openshift-merge-robot merged commit 1e8779d into openshift:master Mar 19, 2019
@runcom runcom deleted the fix-oncefrom branch March 20, 2019 07:32
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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants