-
Notifications
You must be signed in to change notification settings - Fork 113
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
ensure network daemon checks if machineConfigPool resource registered before attempting to pause the MachineConfigPool #350
ensure network daemon checks if machineConfigPool resource registered before attempting to pause the MachineConfigPool #350
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
6c1af36
to
d1f07b6
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 3079947985
💛 - Coveralls |
Are you supposing that you run sriov network operator in the managment cluster or on the guest cluster? |
It will run in guest cluster and be installed in same fashion as it is today with operator hub: I do not think it is safe to have operator hub content be dynamically added to the management cluster as it can have different control domains in cloud providers (and in managed SRE offerings) |
I do not believe the go fmt issues are releated to my pr |
pkg/daemon/daemon.go
Outdated
// In hypershift: there are no machineConfigPool resources | ||
// if the MachineConfigPool resource is not registered in API there is no need to pause it | ||
if err != nil || !isRegistered { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some logging when err is nil ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
d1f07b6
to
19b1812
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@adrianchiris can this be merged? Note the go build issue is unrelated to my pr |
@relyt0925 After internal discussion, it seems that the main way SRIOV network operator will run in Hypershift will be on the management cluster. /hold |
pkg/daemon/daemon.go
Outdated
// In hypershift: there are no machineConfigPool resources | ||
// if the MachineConfigPool resource is not registered in API there is no need to pause it | ||
if !isRegistered { | ||
glog.Info("pauseMCP(): MCP resource not registered") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that there is no need to pause it, but this isn't the only dependency on MCP that you need to properly handle to support sriov network operator in Hypershift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right I do think there are potentially a couple others that would need a similar check on "machineConfig" but was going to break those up into smaller prs
@bn222 can you point me to any internal discussion? to be clear, a user action in the guest cluster MUST NOT result in a new pod running on the mgmt cluster, OLM itself does not have coordinates to any cluster beyond the guest. are you discussing a different scenario? |
19b1812
to
f0ca3a7
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
adjusting to look at controlPlaneTopology == "External" to see if it is a hypershift based cluster. |
f0ca3a7
to
0b40400
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
0b40400
to
6e7ca37
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
6e7ca37
to
22abaa2
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
22abaa2
to
6c3f6a1
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
6c3f6a1
to
0c0a221
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
/lgtm |
09bf328
to
4e31a6e
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
4e31a6e
to
5a92e90
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
5a92e90
to
a3590b0
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
There is still a spot that MCO is called from config daemon.
|
/remove hold |
Tested this on my hypershift setup, and does what it promises. /lgtm |
LGTM |
Thanks for your PR,
To skip the vendors CIs use one of:
|
c5de82b
to
ef7e4a3
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
ef7e4a3
to
3a2ee55
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@@ -0,0 +1,25 @@ | |||
package utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we put this file under pkg/daemon ? as its only used there.
|
||
snclient := snclientset.NewForConfigOrDie(config) | ||
kubeclient := kubernetes.NewForConfigOrDie(config) | ||
mcclient := mcclientset.NewForConfigOrDie(config) | ||
openshiftFlavor := utils.OpenshiftFlavorDefault |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats used to construct Openshift context to my understanding. can we move this logic to a "NewOpenshfitContext(config)" or similar method part of openshift_context.go ?
@@ -178,7 +199,10 @@ func runStartCmd(cmd *cobra.Command, args []string) { | |||
startOpts.nodeName, | |||
snclient, | |||
kubeclient, | |||
mcclient, | |||
utils.OpenshiftContext{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be better if daemon will store a pointer to OpenshiftContext, that way its nil when cluster is not openshift. WDYT ?
will be going to PTO, and dont want to block on it. I have no major concerns with this PR. @relyt0925 @bn222 PTAL on latest comments. none should be a blocker IMO. |
@adrianchiris Just for the record, you are ok if we don't have pointer and instead embed the struct for now? |
tested with image and everything looks great
|
LGTM |
In hypershift: there are no machineConfigPool resources registered and therefore no need to pause the MachineConfigPool resource when sriov-network-operator is orchestrating sr-iov configuration. This adds a check to see if that api resource is registered with the cluster before attempting to pause the machineConfigPool resource