EDGAR cleans up when a cluster is undeployed
Currently the undeploy function only changes the deployment status in CARL, but does not destroy the actual network (#287 ) that was setup during deployment. When a cluster is undeployed the network connections shall be disconnected.
Actions for cluster undeployment:
-
[ ] ~~inform EDGAR about undeployment~~ Set
PeerConfigurationparameters asAbsent.- [x] Migrate remaining parameters from
OldPeerConfigurationtoPeerConfiguration.
- [x] Migrate remaining parameters from
-
[ ] EDGAR removes executor container if exists
- [ ] Extend EDGAR Task concept to offer an
unapply(). - [ ] Use EDGAR Tasks in EDGAR Service.
- [ ] Extend EDGAR Task concept to offer an
-
[ ] EDGAR keeps configured network bridges on the peer (as is right now), when a cluster is deployed, the bridge is removed and newly created
-
[ ] EDGAR terminates cannelloni
-
[ ] EDGAR terminates the ping thread
-
[ ] EDGAR service and netbird client keeps running after undeployment
depends on #199
Without this, it is not possible to define an executor and then deploy a cluster twice.
Error printed out by Docker after being started by EDGAR:
Error: error creating container storage: the container name "asdas" is already in use by "8eaf0a20abbdcf6fc389f364fe07d767d0fbb7ec09b9fdd79514fab90940c375". You have to remove that container to be able to reuse that name.: that name is already in use
This is currently not made transparent to the user. We'd need to implement #207 for that.
-
EDGAR should handle all
Absentrules before handling thePresentrules, to ensure no conflicts in configurations occur. -
EDGAR needs to detect when a
Parameteris stillPresent, but the actual OS configuration needs updating, when the value of theParameterchanged.
This means, any time EDGAR receives a newPeerConfiguration, it needs to go through allTasks and runcheck_fulfilled()(orcheck_present()andcheck_absent(), as they will probably be renamed). ThePeerConfigurationonly represents the target state, so it's up to EDGAR to detect changes. In particular, we don't want EDGAR to remember its previous state, because this can be wrong.
Nor do we want to give eachParameteran incarnation and thenAbsentthe previous incarnation +Presentthe new incarnation, since this would mean EDGAR could only be told to e.g. remove a network interface and then recreate it with the new configuration, rather than simply updating the configuration of the existing interface.
(Noticed these points while fixing #319.)