A system administrator is managing a web application deployed as a replicated service on a Docker Swarm cluster. The service is configured to maintain three replicas for high availability. If a worker node hosting one of these replicas unexpectedly fails and goes offline, what is the primary responsibility of the Swarm manager in response?
It will schedule a new task on a healthy node to replace the one on the failed node, thereby restoring the replica count to three.
It will wait for the failed node to reconnect to the swarm before taking any corrective action.
It will move the existing task from the failed node to a healthy node.
It will permanently decrease the service's desired replica count to two to match the new number of healthy replicas.
The correct response is that the Swarm manager will schedule a new task to replace the lost one. Docker Swarm operates on a declarative model where it constantly attempts to reconcile the cluster's actual state with the service's desired state. In this scenario, the desired state is three replicas. When a node failure causes the actual state to drop to two replicas, the manager's reconciliation loop detects this discrepancy and schedules a new task on a healthy node to create a new container, thus restoring the service to its desired state of three replicas.
The manager does not change the desired state to match the actual state. Tasks are atomic scheduling units and cannot be 'moved' from a failed node; a new task must be created to replace the lost one. Waiting for the node to return would negate the high-availability benefits of using a container orchestrator.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Docker Swarm?
Open an interactive chat with Bash
What does 'desired state' mean in Docker Swarm?
Open an interactive chat with Bash
How does Docker Swarm ensure high availability?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .