How to call 'docker swarm unlock' non-interactively? -


how can call 'docker swarm unlock' non-interactively script?

normally when run unlock command interactive prompt following:

node $ docker swarm unlock please enter unlock key:  

i've tried running following:

node $ echo "swmkey-1-g8kpx6c7xiiaabdcefghmlb5yyaf5osll4sa1234567" | docker swarm unlock 

this unlock swarm command never returns. hangs there.

from documentation not appear there additional flags can pass unlock command.

i did more investigation , testing. did not understand problem seeing.

you can non-interactively unlock docker swarm node using command following:

node $ echo "swmkey-1-g8kpx6c7xiiaabdcefghmlb5yyaf5osll4sa1234567" | docker swarm unlock 

where swmkey-1-g8kpx6c7xiiaabdcefghmlb5yyaf5osll4sa1234567 unlock key.

however, need run on nodes in swarm cluster locked. had incorrectly assumed needed run unlock command on single node in cluster , unlock nodes.

my scenario follows:

i have 3 node cluster consisting of vms node-1, node-2 , node-2 running in swarm mode. rebooted 3 vms. ran non-interactive unlock command on node-1 , command did not return. instead need run unlock command on nodes.

also should point out behavior of 'docker swarm unlock' same regardless of whether using interactively or not. when had tested interactive 'docker swarm unlock' had been using single node swarm cluster.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -