0
0
Dockerdevops~20 mins

Rolling updates in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Rolling Update Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Output of a rolling update command in Docker Swarm
What is the output of the following command when updating a service with rolling update strategy in Docker Swarm?
Docker
docker service update --image nginx:1.19 my_web_service
A
my_web_service
rolling update started
3/3 tasks updated
BError: service not found
C
my_web_service
service updated successfully
D
my_web_service
overall progress: 1 out of 3 tasks
1/3 updated, 0 tasks running
Attempts:
2 left
💡 Hint
Think about how Docker Swarm reports progress during rolling updates.
🧠 Conceptual
intermediate
2:00remaining
Understanding rolling update behavior in Docker Swarm
Which statement correctly describes the rolling update behavior in Docker Swarm?
ADocker Swarm updates all service tasks simultaneously, causing downtime.
BDocker Swarm updates tasks one by one, ensuring some tasks remain running during update.
CDocker Swarm stops all tasks before starting new ones to avoid conflicts.
DDocker Swarm requires manual restart of each task during update.
Attempts:
2 left
💡 Hint
Think about how rolling updates minimize downtime.
Configuration
advanced
2:00remaining
Configuring rolling update parameters in Docker service
Which Docker service update command correctly sets the rolling update to update 2 tasks at a time with a 10-second delay between updates?
Adocker service update --update-parallelism 2 --update-delay 10s my_service
Bdocker service update --parallelism 2 --delay 10 my_service
Cdocker service update --update-parallel 2 --update-delay 10 my_service
Ddocker service update --update-parallelism=2 --update-delay=10 my_service
Attempts:
2 left
💡 Hint
Check the exact option names and units for delay.
Troubleshoot
advanced
2:00remaining
Troubleshooting a failed rolling update in Docker Swarm
After running a rolling update, some tasks fail to start and the service is stuck updating. What is the most likely cause?
AThe service has no published ports.
BThe update delay is set too high.
CThe new image tag does not exist or is invalid.
DThe Docker daemon is running an outdated version.
Attempts:
2 left
💡 Hint
Think about what would prevent new tasks from starting.
🔀 Workflow
expert
3:00remaining
Order the steps for performing a safe rolling update in Docker Swarm
Arrange the following steps in the correct order to perform a safe rolling update of a Docker Swarm service.
A1,2,3,4
B2,1,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Think about preparation, execution, monitoring, and finalizing steps.