Skip to content

integration/swarm: Preserve rotated unlock key#3410

Merged
thaJeztah merged 1 commit into
docker:mainfrom
vvoland:fix-flaky
Jun 12, 2026
Merged

integration/swarm: Preserve rotated unlock key#3410
thaJeztah merged 1 commit into
docker:mainfrom
vvoland:fix-flaky

Conversation

@vvoland

@vvoland vvoland commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes flaky SwarmTest.test_update_node erroring out with "Swarm is encrypted and needs to be unlocked before it can be used. Please use "docker swarm unlock" to unlock it."

test_rotate_manager_unlock_key enables autolock and then rotates the manager unlock key, but teardown still holds the original key.

If the swarm needs to be unlocked during cleanup, the stale key cannot unlock it and the daemon can remain in locked swarm state for the next test.

Store the rotated unlock key so teardown can unlock and leave the swarm cleanly.

Fixes flaky SwarmTest.test_update_node erroring out with "Swarm is encrypted and
needs to be unlocked before it can be used. Please use "docker swarm unlock" to
unlock it."

`test_rotate_manager_unlock_key` enables autolock and then rotates the
manager unlock key, but teardown still holds the original key.

If the swarm needs to be unlocked during cleanup, the stale key cannot unlock it
and the daemon can remain in locked swarm state for the next test.

Store the rotated unlock key so teardown can unlock and leave the swarm cleanly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland self-assigned this Jun 12, 2026
@vvoland vvoland requested a review from thaJeztah June 12, 2026 13:35

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@thaJeztah thaJeztah merged commit ae5dfe9 into docker:main Jun 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants