Fix retry logic for out of sequence errors

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 157561e95ccaef883fe106a38741acb3d493879f
Component: engine
This commit is contained in:
Tonis Tiigi
2016-08-16 18:57:01 -07:00
parent 5c4fc1cbb0
commit 449509c833

View File

@ -359,7 +359,7 @@ func (d *SwarmDaemon) cmdRetryOutOfSequence(args ...string) (string, error) {
for i := 0; ; i++ {
out, err := d.Cmd(args...)
if err != nil {
if strings.Contains(err.Error(), "update out of sequence") {
if strings.Contains(out, "update out of sequence") {
if i < 10 {
continue
}