-
Notifications
You must be signed in to change notification settings - Fork 12
Bug 2054701: Convert Machines directly to InstanceSpec #33
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
Conversation
|
Still WiP, it uses my local rebase as we'd need openshift/cluster-api-provider-openstack#230 first. |
|
/retest Okay, the problem isn't new, we got to investigate it, but it's there with or without this patch. |
|
@dulek: This pull request references Bugzilla bug 2054701, 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
Requesting review from QA contact: DetailsIn response to this:
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. |
|
One fact, I haven't yet proved that this actually solves events issue. |
|
/test e2e-openstack |
|
/hold Okay, this doesn't record CAPO events and I think I know why. |
|
/hold cancel @mdbooth, this is ready for reviews and I believe the e2e-openstack failures are unrelated. The events should work now. |
|
I reorganized imports back to the initial state after my IDE tried to be smarter than us. |
| capov1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" | ||
| "sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/compute" | ||
| clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
|
|
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.
Nice 😀
pkg/machine/utils.go
Outdated
| networkService, err := networking.NewService(&scope.Scope{ | ||
| ProviderClient: osc.provider, | ||
| ProviderClientOpts: clientOptsForCloud(osc.cloud), | ||
| Logger: ctrl.Log.WithName("capo-network")}) |
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 we make the scope generation common between getCompute and getNetwork?
func (osc *openStackContext) scope() *scope.Scope {
&scope.Scope{...}
}I also think the log name should be the same from both, as it's really describing the controller which is the source of the log message. Might call it cluster-api-provider-openstack rather than machine-api-provider-openstack to differentiate, though. What do you think?
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.
Makes sense, I felt current names are weird, but kept them.
CreateInstance, DeleteInstance and some other methods in CAPO got converted to use InstanceSpec instead of Machine objects as arguments. This commit adapts MAPO for that, effectively replacing mapov1.Machine->capov1.Machine conversion with mapov1.Machine->capov1.InstanceSpec. A bit of other changes related to the CAPO bump were needed too.
By default CAPO will use FakeRecorder for its events. We got to initialize it with the MAPO recorder and this commit does so.
|
/retest-required |
|
/test e2e-openstack |
1 similar comment
|
/test e2e-openstack |
|
/test e2e-openstack |
1 similar comment
|
/test e2e-openstack |
|
/retest |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dulek, EmilienM The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/lgtm |
|
I'm debugging the deprovision issue here: #37 |
|
Deprovision fails because some resources fail to be destroyed by the installer: https://paste.opendev.org/show/bgXseRNEjdrdaoGdq09K/ |
|
The staled ports with this PR: https://paste.opendev.org/show/bSKOgUtbphAicEXZ1uln/ |
|
Yeah I found the issue, somehow the worker ports aren't tagged with |
|
destroy logs: https://paste.opendev.org/show/b3tWyyOqL9YpgNPQkPn3/ |
|
From Neutron server logs, the port was created like this: Something removed the tag later and it was re-updated: |
|
I created a cluster with that PR and I could reproduce the issue, see the worker port: We're missing |
|
@dulek: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
|
@dulek: All pull requests linked via external trackers have merged: Bugzilla bug 2054701 has been moved to the MODIFIED state. DetailsIn response to this:
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. |
This addresses latest refactoring in CAPO based on kubernetes-sigs/cluster-api-provider-openstack#1153.