Closed manuelbuil closed 4 months ago
I just noticed that this context is wrong as well: https://github.com/flannel-io/flannel/blob/f5b88d962d963cafac1ef91293608645597643cd/pkg/subnet/kube/kube.go#L612
Context.TODO
is only for dev
I just noticed that this context is wrong as well:
Context.TODO
is only for dev
Should it be Context.Background? I wonder if we could do something to pipe the main context
I think we can get the main context because GetStoredMacAddress
is called in RegisterNetwork
where it is available.
I think we can get the main context because
GetStoredMacAddress
is called inRegisterNetwork
where it is available.
done!
Description
For some unknown reason, subnetManager was using a different context than the main one, thus the
cancel()
method to clean up flannel resources will never work in this case.This PR fixes that and subnetManager will use the main context
Todos
Release Note