-
Notifications
You must be signed in to change notification settings - Fork 112
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
Deploy VMs into existing OpenStack Neutron network #545
Conversation
/invite @dkistner |
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.
Had a brief look and seems to look good.
I need a little bit more time to play around with it.
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 guess we need to make sure that the port gets also deleted when the machine/server is already gone. Currently the port deletion logic is not executed when the machine is already deleted. We need to ensure that we check within each machine deletion flow for existing ports. See here:
machine-controller-manager/pkg/driver/driver_openstack.go
Lines 316 to 324 in ec67a43
func (d *OpenStackDriver) Delete(machineID string) error { | |
res, err := d.GetVMs(machineID) | |
if err != nil { | |
return err | |
} else if len(res) == 0 { | |
// No running instance exists with the given machine-ID | |
klog.V(2).Infof("No VM matching the machine-ID found on the provider %q", machineID) | |
return nil | |
} |
True, we just pushed a commit that puts the port delete logic into a separate function which will always get called - even if the VM no longer exists. On another note: I do not see a problem with this behaviour but what do you think about it? |
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.
looks good to me.
/invite @kon-angelo
@kon-angelo Could you please have a look as well?
@kayrus Could you also please have a brief look if you have time :)
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.
/lgtm
/needs second-opinion
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.
/lgtm
cc @zuzzas |
Hm, earlier the integration test of freeze failed.
And now the unit test related to the freeze failed:
Tests are flaky somehow. |
@MrBatschner Can you please squash the commits? |
3fa95e0
to
d0b43bf
Compare
@hardikdr Done, squashed all 11 commits into one. |
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.
/lgtm
Let's wait for a day, in case @kayrus is willing to take a look.
What this PR does / why we need it:
Adds the ability to specify an already existing OpenStack Neutron network in the subnetID of an OpenStackMachineClass. MCM will deploy new machines into the given subnet by pre-allocating Neutron ports and pass them to the Nova server object. Pre-allocated ports will be specifically removed upon server termination. This is required to specify an existing subnet in a shoot manifest.
With this PR it is only possible to specify an already existing network, not a list of otherwise pre-allocated ports.
Which issue(s) this PR fixes:
Partly fixes #535
Special notes for your reviewer:
This change is a necessary precondition for PR 169 in gardener-extension-provider-openstack.
Release note: