Closed sanderegg closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.8%. Comparing base (
cafbf96
) to head (da76a7a
). Report is 214 commits behind head on master.
Thank you very much. Great job.
I would consider having a longer timeout only because I remember 30 sec
* 1/2/3 times of idle state in docker engine that we observed while fixing slow starting time. So, at least 30 sec
to feel more secure.
But this all is more like a guessing. I don't have solid proofs or good number for that
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
What do these changes do?
After the changes that stopped using docker node drain a new issue arose: container IPs are not properly returned to the docker swarm https://github.com/ITISFoundation/osparc-ops-environments/issues/665.
So it is preferable to first drain a node before terminating it.
With this PR, the termination process was complexified. Once a node is deemed as terminateable (after empty time exceeds
EC2_INSTANCES_TIME_BEFORE_TERMINATION
) the autoscaling service will begin the "termination" process.BEFORE:
AFTER:
EC2_INSTANCES_TIME_BEFORE_FINAL_TERMINATION=15seconds
it will proceed with termination as in BEFORE.NOTE: Once the termination process is started, there is no way back. The termination process will label the node for termination by docker labelling the node with io.simcore.osparc-node-termination-started which contains the timepoint when this happens. That means that if for some reason the docker engine is not responding, there might be an accumulation of EC2 instances. If this becomes a problem then the tagging might work by using the EC2 API instead. NOTE2:
EC2_INSTANCES_TIME_BEFORE_FINAL_TERMINATION
is not defined as an ENV variable and is currently hard-coded as there is no foreseeable motivation to have it changeable at the moment.Related issue/s
resolves https://github.com/ITISFoundation/osparc-simcore/issues/5827
Dev-ops checklist