Re-connected Ankaios agent not receiving deleted workload when no added workloads are sent #358
Labels
bug
Something isn't working. Issue will appear in the change log "Bug Fixes"
Milestone
When an Ankaios agent has assigned one workload and the workload will be deleted during the Ankaios agent is disconnected, then the Agent does not delete this workload once it reconnects to the Ankaios server.
Current Behavior
A reconnected agent with only one workload that will be deleted during the agent is disconnected will lead to a running workload that is not anymore in the desired state and the deleted workload will not be deleted. The agent is blind and does nothing with this workload on startup because the Ankaios server does only sent the added workloads and the workload states when an agent connects.
If the agent has assigned more then one workload and other workloads are not deleted during the agent is disconnected then the Agent receives added workloads from the server and the initial resume/replace logic of the agent runs which correctly deletes the deleted workload. The agent enforces correctly the desired state in this situation.
Expected Behavior
An Ankaios agent shall always enforce the desired state of the Ankaios server and shall not be out of sync.
Steps to Reproduce
server/resources/startConfig.yaml
agent_A
to make sure that only the nginx workloads runs (the rest of the workloads inside the startConfig can be ignored for this situation)ank -k set state desiredState emptyState.yaml
containing an empty state to delete all workloads or useank -k delete workload nginx
agent_A
again in the other terminal window.The agent connects to the server awaiting new commands of it, but since there are no new workloads of that agent inside the desired state, the server sends nothing to this agent.
Context (Environment)
Logs
Additional Information
Final result
To be filled by the one closing the issue.
The text was updated successfully, but these errors were encountered: