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

Reclaiming Static IP #27

Open
acraghav opened this issue Jan 7, 2022 · 6 comments · May be fixed by #28
Open

Reclaiming Static IP #27

acraghav opened this issue Jan 7, 2022 · 6 comments · May be fixed by #28

Comments

@acraghav
Copy link

acraghav commented Jan 7, 2022

How is Spectrocloud static IP controller project reclaiming IP addresses when CAPV deletes machines.

From the code it seems like the delete ipclaim isn't called.

// releases static ip back to the ip pool
DeallocateIP(name string, pool IPPool, ownerObj runtime.Object) error

func (m Metal3IPAM) DeallocateIP(name string, pool ipam.IPPool, ownerObj runtime.Object) error {
return nil
}

Can you please share your thoughts on this.

@nwoodmsft
Copy link

nwoodmsft commented Jan 10, 2022

I'm also interested by this topic. I was looking at this DeallocateIP function and wondering whether we should proceed to implement it + contribute back the change, but I am not sure if there is more context/history around why this was not implemented previously (e.g. a race condition, timing issue, or another concern that we should be aware of).

In our environment we sometimes have extremely small IP pools available (e.g. 3-5 IPs available) so reclaiming those addresses after cluster deletion is going to be important.

Tagging @abhinavnagaraj and @sadysnaat for their input

Thanks folks!

@acraghav
Copy link
Author

acraghav commented Jan 25, 2022

@abhinavnagaraj @sadysnaat : can you please allow me to push a PR to a private branch.

root@LAPTOP-5CC3SOCS:~/goroot/src/github.com/metal3-io/cluster-api-provider-vsphere-static-ip# git push -f --set-upstrea
m origin deleteipclaim_reclaimproj
remote: Permission to spectrocloud/cluster-api-provider-vsphere-static-ip.git denied to acraghav.
fatal: unable to access 'https://github.com/spectrocloud/cluster-api-provider-vsphere-static-ip.git/': The requested URL returned error: 403

@abhinavnagaraj
Copy link
Collaborator

@acraghav, is this the error you see when you try to push to your fork ?

@acraghav acraghav linked a pull request Jan 25, 2022 that will close this issue
@abhinavnagaraj
Copy link
Collaborator

@acraghav , @nwoodmsft , apologies for the late response ! Our team has been very busy.

The reason we don't face this issue currently is because we have a wrapper service which generates the m3 IPPool while creating the cluster. So when this cluster is deleted this wrapper service knows that those IPs can be reallocated for the next cluster.

@abhinavnagaraj
Copy link
Collaborator

There seems to be an issue while setting the IPClaim's ownerRef as VSphereCluster. But otherwise, on deletion of the parent objects - VSphereCluster/VSphereMachine, the corresponding IPClaims and IPAddresses should be garbage collected.

@acraghav
Copy link
Author

acraghav commented Feb 7, 2022

Thanks @abhinavnagaraj for your feedback. We are taking your latest build and testing our scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants