New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker_swarm: fix force when state==present #53003
docker_swarm: fix force when state==present #53003
Conversation
2db4129
to
6163b76
Compare
ready_for_review |
@@ -416,15 +415,15 @@ def inspect_swarm(self): | |||
return | |||
|
|||
def init_swarm(self): | |||
if self.__isSwarmManager(): | |||
if not self.force and self.__isSwarmManager(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will overwrite #52886 changes, you need to rebase it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to rebase it anyway since there are now conflicts ;)
6163b76
to
51ce515
Compare
51ce515
to
77de924
Compare
ready_for_review |
shipit |
@WojciechowskiPiotr thanks for reviewing! |
(cherry picked from commit 76e0e00)
(cherry picked from commit 76e0e00)
SUMMARY
The documentation claims about the
force
option:Use with state C(present) to force creating a new Swarm, even if already part of one.
Unfortunately, that doesn't work:
init_swarm()
will never be called;force_new_cluster
argument ofinit_swarm()
is set toself.parameters.force_new_cluster
, which is only ever set toNone
.ISSUE TYPE
COMPONENT NAME
docker_swarm