From 2950667f07563ab325dbd4a92cd46f8ce19e5a71 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Wed, 19 Jul 2017 11:55:34 +0300 Subject: [PATCH] Support the "order" key in "update_config" for compose Signed-off-by: Antonis Kalipetis --- cli/compose/convert/service.go | 1 + cli/compose/convert/service_test.go | 18 ++++++++++++++++++ cli/compose/loader/full-example.yml | 1 + cli/compose/loader/loader_test.go | 1 + cli/compose/schema/bindata.go | 2 +- .../schema/data/config_schema_v3.4.json | 5 ++++- cli/compose/types/types.go | 1 + 7 files changed, 27 insertions(+), 2 deletions(-) diff --git a/cli/compose/convert/service.go b/cli/compose/convert/service.go index 730f5e1ee5..a8e2ccb393 100644 --- a/cli/compose/convert/service.go +++ b/cli/compose/convert/service.go @@ -454,6 +454,7 @@ func convertUpdateConfig(source *composetypes.UpdateConfig) *swarm.UpdateConfig FailureAction: source.FailureAction, Monitor: source.Monitor, MaxFailureRatio: source.MaxFailureRatio, + Order: source.Order, } } diff --git a/cli/compose/convert/service_test.go b/cli/compose/convert/service_test.go index dd7f6ba253..3a0bf0e75e 100644 --- a/cli/compose/convert/service_test.go +++ b/cli/compose/convert/service_test.go @@ -343,3 +343,21 @@ func TestConvertCredentialSpec(t *testing.T) { assert.Error(t, err) assert.Nil(t, swarmSpec) } + +func TestConvertUpdateConfigOrder(t *testing.T) { + // test default behavior + updateConfig := convertUpdateConfig(&composetypes.UpdateConfig{}) + assert.Equal(t, "", updateConfig.Order) + + // test start-first + updateConfig = convertUpdateConfig(&composetypes.UpdateConfig{ + Order: "start-first", + }) + assert.Equal(t, updateConfig.Order, "start-first") + + // test stop-first + updateConfig = convertUpdateConfig(&composetypes.UpdateConfig{ + Order: "stop-first", + }) + assert.Equal(t, updateConfig.Order, "stop-first") +} diff --git a/cli/compose/loader/full-example.yml b/cli/compose/loader/full-example.yml index 347dbf5136..d193dccd31 100644 --- a/cli/compose/loader/full-example.yml +++ b/cli/compose/loader/full-example.yml @@ -31,6 +31,7 @@ services: failure_action: continue monitor: 60s max_failure_ratio: 0.3 + order: start-first resources: limits: cpus: '0.001' diff --git a/cli/compose/loader/loader_test.go b/cli/compose/loader/loader_test.go index 231109a1e8..4ffc333f31 100644 --- a/cli/compose/loader/loader_test.go +++ b/cli/compose/loader/loader_test.go @@ -687,6 +687,7 @@ func TestFullExample(t *testing.T) { FailureAction: "continue", Monitor: time.Duration(60 * time.Second), MaxFailureRatio: 0.3, + Order: "start-first", }, Resources: types.Resources{ Limits: &types.Resource{ diff --git a/cli/compose/schema/bindata.go b/cli/compose/schema/bindata.go index f5301bc5c9..4f34a8b6e9 100644 --- a/cli/compose/schema/bindata.go +++ b/cli/compose/schema/bindata.go @@ -152,7 +152,7 @@ func dataConfig_schema_v33Json() (*asset, error) { return a, nil } -var _dataConfig_schema_v34Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4b\x93\xdb\x2a\x16\xde\xfb\x57\xa8\x74\xef\x2e\xfd\x48\xd5\xa4\xa6\x6a\xb2\x9b\xe5\xac\x66\xd6\xd3\xe5\xa8\x30\x3a\xb6\x49\x23\x20\x80\xdc\xed\xa4\xfa\xbf\x4f\xe9\x69\x40\x20\xb0\xad\x4e\x77\xe6\x66\xd5\x6d\xe9\x3b\xc0\x79\x9f\x03\xe8\xc7\x2a\xcb\xf2\x3f\x15\xde\x43\x85\xf2\xcf\x59\xbe\xd7\x5a\x7c\xbe\xbf\xff\xaa\x38\xbb\xed\x9e\xde\x71\xb9\xbb\x2f\x25\xda\xea\xdb\x8f\x9f\xee\xbb\x67\x7f\xe4\x37\x0d\x1d\x29\x1b\x12\xcc\xd9\x96\xec\x8a\xee\x4d\x71\xf8\xdb\xdd\xa7\xbb\x86\xbc\x83\xe8\xa3\x80\x06\xc4\x37\x5f\x01\xeb\xee\x99\x84\x6f\x35\x91\xd0\x10\x3f\xe4\x07\x90\x8a\x70\x96\xaf\x6f\x56\xcd\x3b\x21\xb9\x00\xa9\x09\xa8\xfc\x73\xd6\x2c\x2e\xcb\x46\xc8\xf0\xc0\x18\x56\x69\x49\xd8\x2e\x6f\x1f\xbf\xb4\x23\x64\x59\xae\x40\x1e\x08\x36\x46\x18\x97\xfa\xc7\xfd\x69\xfc\xfb\x11\x76\xe3\x8e\x6a\x2c\xb6\x7d\x2e\x90\xd6\x20\xd9\x7f\xa6\x6b\x6b\x5f\x7f\x79\x40\xb7\xdf\xff\x79\xfb\xdf\x8f\xb7\xff\xb8\x2b\x6e\xd7\x1f\xfe\xb4\x5e\x37\xf2\x95\xb0\xed\xa6\x2f\x61\x4b\x18\xd1\x84\xb3\x71\xfe\x7c\x44\xbe\xf4\xff\xbd\x8c\x13\xa3\xb2\x6c\xc1\x88\x5a\x73\x6f\x11\x55\x60\xf3\xcc\x40\x3f\x71\xf9\x18\xe3\x79\x84\xbd\x11\xcf\xfd\xfc\x1e\x9e\x6d\x76\x0e\x9c\xd6\x55\x54\x83\x03\xea\x8d\x98\xe9\xa6\x5f\x46\x7f\x0a\xb0\x04\x1d\x37\xd9\x0e\xf5\x66\x16\xdb\x4c\xbf\x0c\xc3\x5d\xd4\x88\x31\x3c\xa0\xde\x88\xe1\x6e\xfa\xeb\x18\x5e\x0d\x4c\xcf\x62\x3b\x84\x31\x77\xbb\x40\x2b\x9e\xf9\x44\xe5\x8b\x27\x61\x59\x8d\xc2\x0a\x48\xa9\x04\x41\xf9\xb1\x79\x16\x90\x47\x07\xa8\x80\xe9\x7c\x14\x41\x96\xe5\x9b\x9a\xd0\xd2\x95\x28\x67\xf0\xef\x66\x88\x07\xe3\x61\x96\xfd\x70\x43\xb7\x31\x4e\xfb\xde\xfa\x15\x56\xf8\xf8\x3e\xc0\xcb\xf8\x1e\x73\xa6\xe1\x59\xb7\x4c\xcd\x4f\xdd\x89\x80\xe3\x47\x90\x5b\x42\x21\x95\x02\xc9\xce\x8a\x03\x22\xa3\x44\xe9\x82\xcb\xa2\x24\x58\x7b\xe9\x29\xda\x00\xbd\x6a\x04\x8c\xf0\x1e\x8a\xad\xe4\x55\x74\x94\x6d\xd1\x71\xa2\xf2\x17\x67\x9c\xc9\xc0\x71\xd3\x1e\x49\x8d\x5f\xeb\x95\x67\xc0\x1c\x23\x51\xa0\xb2\xb4\x44\x8a\xa4\x44\xc7\xfc\x26\xcb\x89\x86\x4a\xf9\xa5\x9d\xe5\x35\x23\xdf\x6a\xf8\x57\x0f\xd1\xb2\x06\x77\xdc\x52\x72\xb1\xfc\xc0\x3b\xc9\x6b\x51\x08\x24\x1b\x5b\x9f\xb7\x84\x1c\xf3\xaa\x42\x6c\x29\x07\x38\x87\x8f\x04\xc9\x4f\xc2\x6c\x66\x7a\x55\x3f\x87\xf9\x6a\x9c\xcd\x5a\x56\x80\x9b\x38\x3f\x53\x97\x8e\x3b\x75\xdc\xad\x9b\xa8\xc8\x6b\x89\x53\xbd\xb4\x99\x13\xc9\x1d\xa4\xc6\x81\x2c\xcb\x6b\x52\xa6\x83\x77\xe7\x80\x2b\x5e\xda\xeb\x66\x75\xb5\x01\x39\x71\x49\xdb\xb3\xa6\xbf\xd7\x2b\xdf\x1b\x47\xfb\x1a\x11\x06\xb2\x60\xa8\x8a\xc9\x2a\xc7\x12\x4a\x60\x9a\x20\x5a\x28\x01\xd8\x82\x0f\x9a\x9a\xd1\x4c\x9e\x14\x35\x73\x09\x3b\xa2\xb4\x3c\x7a\x91\x27\x2e\xcc\x85\x95\x20\x80\x95\xaa\xe8\x7a\x80\xd4\x00\x67\x0d\x30\x36\x04\x8b\x86\x89\x92\xcd\x05\xee\x6e\x98\x26\x74\x37\x6b\xcb\x1d\xc2\x42\x01\x92\x78\x7f\x21\x3d\xaf\x10\x61\x29\x4a\x05\xa6\xe5\x51\x70\xd2\x85\xb1\x77\x17\x9f\x80\x1d\x8a\xd1\x6e\xce\x16\x03\xb0\x03\x91\x9c\x55\x43\x90\x4e\x4b\xa0\x06\xfd\xb3\xe0\x0a\xae\x0f\x8e\x3d\xc5\xc3\xc0\xf8\xcd\xe8\xd3\x6b\x5b\x7a\xf9\x96\xcb\x0a\x35\x8b\x1d\xe6\x36\x7d\xd8\x9a\x6a\x6a\x79\xa6\x00\x4d\x1e\x9a\xc2\x17\xd1\x82\x12\xf6\xb8\xbc\x89\xc3\xb3\x96\xa8\xd8\x73\xa5\x2f\xa9\x51\xf2\x3d\x20\xaa\xf7\x78\x0f\xf8\x71\x86\xdc\x44\x59\xd4\x5c\xe9\x14\x23\x27\x15\xda\xc5\x41\x02\xc7\x20\x17\xd7\x62\xf9\xa2\xc2\x37\x86\xe5\xbb\x5d\x03\x0d\x59\xdc\xa4\xb6\xef\x5f\xc7\xaa\xe2\x52\x92\x03\xc8\xd4\x12\x97\x8b\x53\x4b\xe2\xbe\x4c\xc9\xe6\xd1\xfe\xcc\x82\x7e\xb9\xeb\xda\xb3\x19\xaf\x6a\xff\xa3\x34\x5f\x4f\x53\xe6\x34\x69\xba\x4f\x1c\x0e\xd3\xea\x5c\x4b\x2b\x15\xc2\x4d\x39\x2b\x41\x05\xf4\x7a\x82\xf6\x1b\x1e\xc5\x24\xe7\x9f\xb0\x13\xf0\x24\xb1\x86\x22\xf5\xd9\x89\x30\xbb\xa8\xc3\x4a\x52\x5d\xb4\xc5\x8e\x70\x13\x5a\x5e\xea\x32\x4f\xcb\x8d\x9b\x58\x8b\x43\x94\x20\x05\x71\x67\x0f\x0a\xd2\x1a\x8d\x88\xc3\xa7\x44\x9b\xf0\xd1\xfe\x7d\x96\x36\x40\x1a\x1c\x33\xbd\x75\x8b\x0c\x65\x96\xa8\x94\x7a\x17\xb2\x8e\x17\xad\xaf\xd9\x59\x0a\xbb\xf0\xb6\x63\x45\x1b\x21\x4c\x07\x13\x5c\xea\x9f\xd2\x0b\x9d\xe2\xd4\x29\xe1\x77\x93\x4f\xdb\x23\x57\xdd\x49\x44\xaf\xd3\x53\xcd\x44\x29\x0f\xda\xd3\x51\x11\xa6\x61\xd7\xb4\x32\xfe\x24\x50\x6f\x28\x51\x7b\x28\xcf\xa1\x91\x5c\x73\xcc\x69\x9a\x63\x78\x37\x68\xd2\x9d\x61\xa6\xbf\xba\xa8\x36\x13\x92\x1c\x08\x85\x9d\xc3\xf1\x86\x73\x0a\x88\x59\x89\x42\x02\x2a\x0b\xce\xe8\x31\x01\xa9\x34\x92\xd1\x5d\x09\x05\xb8\x96\x44\x1f\x0b\x2e\xf4\xe2\x55\xa1\xda\x57\x85\x22\xdf\xc1\xf6\xbd\x93\xd5\xf7\x03\xad\x9d\x05\x39\x5b\xdc\xd9\xef\xad\x88\xbf\xcc\x56\x84\x3a\x2a\xac\x2f\xab\xad\x95\x2e\x09\x2b\xb8\x00\x16\xf5\x0d\xa5\xb9\x28\x76\x12\x61\x28\x04\x48\xc2\xbd\xa2\xb0\x02\x6c\x59\x4b\xd4\xcc\x3f\x1d\x46\x91\x1d\x43\xfe\xb8\x63\x40\x75\x25\xb6\x17\x6e\x02\x68\x1d\x77\xf6\x9a\x92\x8a\x84\x9d\xc6\x63\xb5\x09\xf5\x5a\x57\xab\xf9\x4b\xb4\x99\xf2\x2c\x29\x64\xcf\x74\x08\xf3\x0d\x42\x42\x67\xb0\x47\xf2\x8c\xd4\xd1\x3a\xe6\x36\x90\x9f\x7c\x7d\x83\x77\x5d\xd6\x61\x75\x3b\xde\x4d\xbf\x90\xb5\x17\x7f\x56\xe9\xe5\x2e\x63\x1d\xac\x7e\xfc\x4e\x55\xab\x68\x13\xd7\x62\x98\x9a\x6b\x40\x46\xe8\xf4\xd4\x35\xfb\x25\x22\xb4\xa5\xa3\x16\xee\xd1\x4d\x42\x1c\xef\x67\x4a\x8c\x9d\xaf\x1d\xf5\x93\x2b\x02\x83\x06\x73\xa6\x88\xd2\xc0\xb0\x7f\x7f\xd5\x4b\xb4\x21\x93\xc3\x8b\xa9\x50\xe6\xfb\xae\xb4\xae\xab\x45\xa1\x5d\x17\x6f\x93\x1b\x9d\x74\x5f\xed\x0f\xe4\x7f\x0a\x2b\x8c\x63\x2e\x02\xaa\x49\x67\xe3\xdc\x34\xeb\x6c\x5d\xcc\xd4\xa1\xa1\x90\xf1\xc4\xe5\x63\x93\x90\x4a\xe2\x8f\x1c\x2b\x87\xe4\x8c\x23\x7d\x67\xaf\x6f\x18\xc0\x77\x56\x6d\x42\xa3\x67\xfb\xf3\xe7\xe6\x3d\x28\x78\xa6\x4d\x14\xda\x38\xe7\x12\xbe\x44\xdb\x64\x06\x79\x88\xe7\x7b\x09\x5a\x12\xe7\x28\x61\x28\x9a\xcc\xdc\x0e\xea\x7d\x6e\xb8\x6b\x52\x01\xaf\xfd\x61\x68\x65\x1a\x4e\x4f\x94\x1b\x67\xfe\x11\xa5\x1a\x48\x57\xa7\x0f\xc6\x01\x52\xd7\x97\x47\x15\x97\x92\xb0\x80\x95\xed\xd1\x46\x52\x76\x93\x20\x28\xc1\x48\xc5\x2a\x88\x2b\x76\x81\x6b\x51\x22\x0d\x45\x7f\x6d\xe4\x9c\x9a\x6d\xa6\x58\x13\x48\x22\x4a\x81\x12\x55\xa5\x14\x3f\x79\x09\x14\x79\xa3\x7f\xb4\xee\x6d\xc9\xb7\x88\xd0\x5a\x42\x81\x70\x30\x4c\x3b\x14\x15\x67\x44\x73\x6f\x38\x49\x9b\xb2\x42\xcf\xc5\x30\x6d\x0b\x89\xb5\x24\x76\x37\x9e\xba\x81\x6b\x58\x42\x97\xbb\xcf\x2b\xab\x67\x54\x74\x2a\xd2\x03\x16\x33\xcc\x38\x61\x5d\x82\x6a\xc2\xce\xb8\xbf\x1e\xa5\x8f\x06\xf8\x7e\x7b\xa0\x10\x9c\x92\xae\x0a\x58\x82\x43\xcc\x59\x27\xe4\x14\x83\xb8\xd2\x02\x1b\x73\x68\x7a\x98\x4a\xe8\xa8\xb3\xb6\x04\x4f\x84\x95\xfc\xe9\x8c\x09\x97\x33\x25\x41\x11\x06\x27\x38\x5e\x2b\x68\xa5\x25\x22\x4c\x9f\x7d\x9c\xe4\x8a\x45\x48\xd8\x82\x04\x36\x35\xf4\x6c\xbe\xac\xcf\xc2\xa5\x7d\x8c\xb7\x38\x87\x3d\x42\x89\xa6\xbe\x7d\x83\x5d\xbd\x6b\x95\x7f\x45\x81\x34\x7a\x71\x24\x91\x8e\xb8\x68\x69\x14\x4a\x9e\x58\xd4\xd1\xa3\xa9\x0a\x2a\x3e\x7f\x0d\xe3\x8a\x8b\xc8\x31\x16\x07\xd8\x02\x85\x42\xd2\x59\x66\x8f\x2a\xb8\x58\x7e\x33\x25\x7e\x5e\xb9\x8e\x87\x6d\x22\x50\xb5\x54\x0c\x49\x3e\xdd\xcd\xbd\x95\x4a\xf6\x0e\xa2\x43\xbd\x61\x81\x5e\xf9\x7d\x47\x07\xfb\xe6\x44\x7b\x31\x23\xa0\xd5\x87\xb1\x0d\xb9\x19\x65\xb5\x4e\x56\x71\xf0\x56\xc4\x72\xeb\x6f\x3b\x22\x77\x07\xd4\xd7\x3a\x21\xad\x11\xde\x27\x75\x59\x67\x96\xd6\x57\xc4\xa1\xc9\x5e\x80\x37\x0c\xf5\xa8\x05\xa2\x50\xca\x35\x95\xff\x8f\x48\xf5\xab\xdb\xf5\xcf\xb3\xc1\xfe\x7b\x89\xe8\xbd\xfd\x16\x75\x71\xae\x4f\xb8\x76\xf9\x0e\x74\xf6\xc6\xaa\x98\x24\x3a\xaf\x2a\x7a\xd4\x6f\x55\xbc\xaa\x57\xd8\x27\x62\x86\x4a\xa6\x1b\x64\x73\x92\x3c\xf7\x4b\x87\xb5\xbd\x0c\x17\xe6\xf9\xba\xd0\xae\x7d\xe6\xce\xcb\x07\x48\x60\x43\xd6\x99\xb4\x17\xe2\x3c\xe7\x0b\xc6\xfd\xbb\x0f\x33\x15\xde\xdc\xf5\xba\x57\x2a\x8d\x16\xb8\x8b\xe0\xd7\xa9\xd3\x3c\x0f\xd2\x9d\x7e\x40\x15\xf6\xff\x81\x7e\xf2\x39\x55\xc3\x27\x3b\x4e\x36\x70\x7f\xd8\xa7\x4f\xdd\xa7\x50\x6b\x4b\x3e\x0e\xa4\xbb\xac\x6a\x24\xda\xb5\xb9\x9f\x10\xbc\x5d\xef\xfb\xc8\xca\x3d\xfb\x1a\x3e\x76\x0a\x1c\xc7\xaf\xcc\xbf\xed\x87\x69\xab\x97\xd5\xff\x02\x00\x00\xff\xff\xa6\x9f\xe0\x94\x02\x3c\x00\x00") +var _dataConfig_schema_v34Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4f\x73\xe3\x28\x16\xbf\xfb\x53\xa8\x98\xb9\x8d\x93\x4c\xd5\x76\x6d\xd5\xf6\x6d\x8f\x7b\xda\x3d\x6f\xca\xa3\xc2\xe8\xd9\x66\x82\x80\x06\xe4\xc4\xdd\x95\xef\xbe\xa5\xbf\x06\x09\x04\xb6\x95\x4e\x7a\xa7\x4f\x89\xa5\xdf\x03\xde\xff\xf7\x00\x7d\x5b\x65\x19\xfa\x55\x93\x03\x94\x18\x7d\xce\xd0\xc1\x18\xf9\xf9\xe1\xe1\x4f\x2d\xf8\x5d\xfb\xf4\x5e\xa8\xfd\x43\xa1\xf0\xce\xdc\xfd\xfe\xe9\xa1\x7d\xf6\x0b\x5a\xd7\x74\xb4\xa8\x49\x88\xe0\x3b\xba\xcf\xdb\x37\xf9\xf1\x6f\xf7\x9f\xee\x6b\xf2\x16\x62\x4e\x12\x6a\x90\xd8\xfe\x09\xc4\xb4\xcf\x14\x7c\xa9\xa8\x82\x9a\xf8\x11\x1d\x41\x69\x2a\x38\xda\xac\x57\xf5\x3b\xa9\x84\x04\x65\x28\x68\xf4\x39\xab\x17\x97\x65\x03\xa4\x7f\x60\x0d\xab\x8d\xa2\x7c\x8f\x9a\xc7\xaf\xcd\x08\x59\x86\x34\xa8\x23\x25\xd6\x08\xc3\x52\x7f\x79\x38\x8f\xff\x30\xc0\xd6\xe3\x51\xad\xc5\x36\xcf\x25\x36\x06\x14\xff\xcf\x74\x6d\xcd\xeb\x3f\x1e\xf1\xdd\xd7\x7f\xde\xfd\xf7\xf7\xbb\x7f\xdc\xe7\x77\x9b\xdf\x7e\x75\x5e\xd7\xf2\x55\xb0\x6b\xa7\x2f\x60\x47\x39\x35\x54\xf0\x61\x7e\x34\x20\x5f\xbb\xff\x5e\x87\x89\x71\x51\x34\x60\xcc\x9c\xb9\x77\x98\x69\x70\x79\xe6\x60\x9e\x85\x7a\x8a\xf1\x3c\xc0\xde\x89\xe7\x6e\x7e\x0f\xcf\x2e\x3b\x47\xc1\xaa\x32\xaa\xc1\x1e\xf5\x4e\xcc\xb4\xd3\x2f\xa3\x3f\x0d\x44\x81\x89\x9b\x6c\x8b\x7a\x37\x8b\xad\xa7\x5f\x86\xe1\x36\x6a\xc4\x18\xee\x51\xef\xc4\x70\x3b\xfd\x6d\x0c\xaf\x7a\xa6\x67\xb1\x2d\xc2\x9a\xbb\x59\xa0\x13\xcf\x7c\xa2\xf2\xc5\x93\xb0\xac\x06\x61\x05\xa4\x54\x80\x64\xe2\x54\x3f\x0b\xc8\xa3\x05\x94\xc0\x0d\x1a\x44\x90\x65\x68\x5b\x51\x56\x8c\x25\x2a\x38\xfc\xbb\x1e\xe2\xd1\x7a\x98\x65\xdf\xc6\xa1\xdb\x1a\xa7\x79\xef\xfc\x0a\x2b\x7c\x78\x1f\xe0\x65\x78\x4f\x04\x37\xf0\x62\x1a\xa6\xe6\xa7\x6e\x45\x20\xc8\x13\xa8\x1d\x65\x90\x4a\x81\x55\x6b\xc5\x01\x91\x31\xaa\x4d\x2e\x54\x5e\x50\x62\xbc\xf4\x0c\x6f\x81\xdd\x34\x02\xc1\xe4\x00\xf9\x4e\x89\x32\x3a\xca\x2e\x6f\x39\xd1\xe8\x75\x34\xce\x64\xe0\xb8\x69\x0f\xa4\xd6\xaf\xcd\xca\x33\x20\x22\x58\xe6\xb8\x28\x1c\x91\x62\xa5\xf0\x09\xad\x33\x44\x0d\x94\xda\x2f\xed\x0c\x55\x9c\x7e\xa9\xe0\x5f\x1d\xc4\xa8\x0a\xc6\xe3\x16\x4a\xc8\xe5\x07\xde\x2b\x51\xc9\x5c\x62\x55\xdb\xfa\xbc\x25\x20\x22\xca\x12\xf3\xa5\x1c\xe0\x12\x3e\x12\x24\x3f\x09\xb3\x99\xed\x55\xdd\x1c\xf6\xab\x61\x36\x67\x59\x01\x6e\xe2\xfc\x4c\x5d\x3a\xee\xd4\x71\xb7\xae\xa3\xa2\xa8\x14\x49\xf5\xd2\x7a\x4e\xac\xf6\x90\x1a\x07\xb2\x0c\x55\xb4\x48\x07\xef\x2f\x01\x97\xa2\x70\xd7\xcd\xab\x72\x0b\x6a\xe2\x92\xae\x67\x4d\x7f\x6f\x56\xbe\x37\x23\xed\x1b\x4c\x39\xa8\x9c\xe3\x32\x26\x2b\x44\x14\x14\xc0\x0d\xc5\x2c\xd7\x12\x88\x03\xef\x35\x35\xa3\x19\x94\x14\x35\x91\x82\x3d\xd5\x46\x9d\xbc\xc8\x33\x17\xf6\xc2\x0a\x90\xc0\x0b\x9d\xb7\x3d\x40\x6a\x80\x73\x06\x18\x1a\x82\x45\xc3\x44\xc1\xe7\x02\x77\x3b\x4c\x1d\xba\xeb\xb5\xa1\x11\x61\xae\x01\x2b\x72\xb8\x92\x5e\x94\x98\xf2\x14\xa5\x02\x37\xea\x24\x05\x6d\xc3\xd8\x87\x8b\x4f\xc0\x8f\xf9\x60\x37\x17\x8b\x01\xf8\x91\x2a\xc1\xcb\x3e\x48\xa7\x25\x50\x8b\xfe\x45\x0a\x0d\xb7\x07\xc7\x8e\xe2\xb1\x67\x7c\x3d\xf8\xf4\xc6\x95\x1e\xda\x09\x55\xe2\x7a\xb1\xfd\xdc\xb6\x0f\x3b\x53\x4d\x2d\xcf\x16\xa0\xcd\x43\x5d\xf8\x62\x96\x33\xca\x9f\x96\x37\x71\x78\x31\x0a\xe7\x07\xa1\xcd\x35\x35\x0a\x3a\x00\x66\xe6\x40\x0e\x40\x9e\x66\xc8\x6d\x94\x43\x2d\xb4\x49\x31\x72\x5a\xe2\x7d\x1c\x24\x49\x0c\x72\x75\x2d\x86\x16\x15\xbe\x35\xac\xd8\xef\x6b\x68\xc8\xe2\x26\xb5\x7d\xf7\x3a\x56\x15\x17\x8a\x1e\x41\xa5\x96\xb8\x42\x9e\x5b\x92\xf1\xcb\x94\x6c\x1e\xed\xcf\x1c\xe8\x1f\xf7\x6d\x7b\x36\xe3\x55\xcd\x7f\x8c\xa1\xcd\x34\x65\x4e\x93\xe6\xf8\xc9\x88\xc3\xb4\x3a\xd7\xd1\x4a\x89\x49\x5d\xce\x2a\xd0\x01\xbd\x9e\xa1\xdd\x86\x47\x3e\xc9\xf9\x67\xec\x04\x3c\x49\xac\xa1\x48\x7d\x71\x22\xcc\xae\xea\xb0\x92\x54\x17\x6d\xb1\x23\xdc\x84\x96\x97\xba\xcc\xf3\x72\xe3\x26\xd6\xe0\x30\xa3\x58\x43\xdc\xd9\x83\x82\x74\x46\xa3\xf2\xf8\x29\xd1\x26\x7c\xb4\x7f\x9f\xa5\x0d\x90\x06\xc7\x4c\x6f\xdd\x22\x43\xd9\x25\x2a\x63\xde\x85\x6c\xe2\x45\xeb\x5b\x76\x96\xd2\x2d\xbc\xdd\x58\xd1\x44\x08\xdb\xc1\xa4\x50\xe6\xbb\xf4\x42\xe7\x38\x75\x4e\xf8\xed\xe4\xd3\xf6\x68\xac\xee\x24\xa2\xb7\xe9\xa9\x66\xa2\x94\x07\xed\xe9\xa8\x28\x37\xb0\xaf\x5b\x19\x7f\x12\xa8\xb6\x8c\xea\x03\x14\x97\xd0\x28\x61\x04\x11\x2c\xcd\x31\xbc\x1b\x34\xe9\xce\x30\xd3\x5f\x5d\x55\x9b\x49\x45\x8f\x94\xc1\x7e\xc4\xf1\x56\x08\x06\x98\x3b\x89\x42\x01\x2e\x72\xc1\xd9\x29\x01\xa9\x0d\x56\xd1\x5d\x09\x0d\xa4\x52\xd4\x9c\x72\x21\xcd\xe2\x55\xa1\x3e\x94\xb9\xa6\x5f\xc1\xf5\xbd\xb3\xd5\x77\x03\x6d\x46\x0b\x1a\x6d\x71\x67\x3f\xb7\x22\xfe\x32\x5b\x11\xfa\xa4\x89\xb9\xae\xb6\xd6\xa6\xa0\x3c\x17\x12\x78\xd4\x37\xb4\x11\x32\xdf\x2b\x4c\x20\x97\xa0\xa8\xf0\x8a\xc2\x09\xb0\x45\xa5\x70\x3d\xff\x74\x18\x4d\xf7\x1c\xfb\xe3\x8e\x05\x35\xa5\xdc\x5d\xb9\x09\x60\x4c\xdc\xd9\x2b\x46\x4b\x1a\x76\x1a\x8f\xd5\x26\xd4\x6b\x6d\xad\xe6\x2f\xd1\x66\xca\xb3\xa4\x90\x3d\xd3\x21\xcc\x37\x08\x09\x9d\xc1\x01\xab\x0b\x52\x47\xe3\x98\xbb\x40\x7e\xf2\xf5\x0d\xde\x75\x39\x87\xd5\xcd\x78\xeb\x6e\x21\x1b\x2f\xfe\xa2\xd2\x6b\xbc\x8c\x4d\xb0\xfa\xf1\x3b\x55\xa5\xa3\x4d\x5c\x83\xe1\x7a\xae\x01\x19\xa0\xd3\x53\xd7\xec\x87\x88\xd0\x8e\x8e\x1a\xb8\x47\x37\x09\x71\xbc\x9b\x29\x31\x76\xbe\x75\xd4\x4f\xae\x08\x2c\x1a\x22\xb8\xa6\xda\x00\x27\xfe\xfd\x55\x2f\xd1\x96\x4e\x0e\x2f\xa6\x42\x99\xef\xbb\xd2\xba\xae\x06\x85\xf7\x6d\xbc\x4d\x6e\x74\xd2\x7d\xb5\x3b\x90\xff\x2e\xac\x70\x41\x84\x0c\xa8\x26\x9d\x8d\x4b\xd3\xec\x68\xeb\x62\xa6\x0e\x0d\x85\x8c\x67\xa1\x9e\xea\x84\x54\x50\x7f\xe4\x58\x8d\x48\x2e\x38\xd2\x1f\xed\xf5\xf5\x03\xf8\xce\xaa\x6d\x68\xf4\x6c\x7f\xfe\xdc\xbc\x03\x05\xcf\xb4\xa9\xc6\xdb\xd1\xb9\x84\x2f\xd1\xd6\x99\x41\x1d\xe3\xf9\x5e\x81\x51\x74\x74\x94\xd0\x17\x4d\x76\x6e\x07\xfd\x31\x37\xdc\x0d\x2d\x41\x54\xfe\x30\xb4\xb2\x0d\xa7\x23\x42\xd6\x99\x7f\x44\xa9\x16\x72\xac\xd3\x47\xeb\x00\xa9\xed\xcb\xa3\x8a\x4b\x49\x58\xc0\x8b\xe6\x68\x23\x29\xbb\x29\x90\x8c\x12\xac\x63\x15\xc4\x0d\xbb\xc0\x95\x2c\xb0\x81\xbc\xbb\x36\x72\x49\xcd\x36\x53\xac\x49\xac\x30\x63\xc0\xa8\x2e\x53\x8a\x1f\x54\x00\xc3\xde\xe8\x1f\xad\x7b\x1b\xf2\x1d\xa6\xac\x52\x90\x63\x12\x0c\xd3\x23\x8a\x52\x70\x6a\x84\x37\x9c\xa4\x4d\x59\xe2\x97\xbc\x9f\xb6\x81\x44\xbc\xab\x21\x12\xaa\xf0\x17\x3f\xeb\xda\x2e\xaa\xd2\x53\x7e\xa0\xa6\x71\xbe\xdb\x51\xa5\x4d\xdb\xa5\x0a\xd9\xfd\x72\xc3\xec\x6b\xb0\xf3\x4f\xdd\x2c\xb6\xac\xae\xad\x13\x2e\x2b\xe1\x67\xcc\xe1\xdc\x10\x04\xac\xb3\x9f\x71\x22\x31\x05\xba\x0e\x71\xc3\x5e\x7e\x94\x3e\x9a\x4c\xba\xad\x88\x5c\x0a\x46\xdb\x8a\x63\x09\x0e\x89\xe0\xad\x90\x53\x8c\xef\x46\x6b\xaf\x4d\xaf\xee\x97\x4a\x69\xa2\x81\xa1\x21\x78\xa6\xbc\x10\xcf\x17\x4c\xb8\x9c\x29\x49\x86\x09\x8c\x02\xf1\xad\x82\xd6\x46\x61\xca\xcd\xc5\x47\x57\x63\xb1\x48\x05\x3b\x50\xc0\xa7\x86\x9e\xcd\xb7\x10\x59\xb8\x8d\x88\xf1\x16\xe7\xb0\x43\x68\x59\xd7\xd2\xef\xb0\x83\x78\xab\xf2\x6f\x28\xc6\x06\x2f\x8e\x24\xed\x01\x17\x2d\xc3\x42\x89\x9a\xc8\x2a\x7a\x0c\x56\x42\x29\xe6\xaf\x7c\xdc\x70\xe9\x39\xc6\x62\x0f\x5b\xa0\x28\x49\x3a\x37\xed\x50\xb9\x90\xcb\x6f\xdc\xc4\xcf\x46\x37\xf1\xb0\x4d\x25\x2e\x97\x8a\x21\xc9\x27\xc9\xc8\x5b\x15\x65\x1f\x20\x3a\x54\x5b\x1e\xe8\xcb\x3f\x76\x74\x70\x6f\x69\x34\x97\x40\x02\x5a\x7d\x1c\x5a\x9e\xf5\x20\xab\x4d\xb2\x8a\x83\x37\x30\x96\x5b\x7f\xd3\x7d\x8d\x77\x5b\x7d\x6d\x1a\x36\x06\x93\x43\x52\x47\x77\x61\x19\x7f\x43\x1c\x9a\xec\x3b\x78\xc3\x50\x87\x5a\x20\x0a\xa5\x5c\x89\xf9\xff\x88\x54\x3f\xba\x5d\x7f\x3f\x1b\xec\xbe\xcd\x88\x7e\x23\xd0\xa0\xae\xce\xf5\x09\x57\x3c\x3f\x80\xce\xde\x59\x15\x93\x44\xe7\x55\x45\x87\xfa\xa9\x8a\x37\xf5\x0a\xf7\xf4\xcd\x52\xc9\x74\x33\x6e\x4e\x92\x97\x7e\x55\xb1\x71\x97\x31\x86\x79\xbe\x64\x74\x6b\x9f\xb9\xb3\xf9\x1e\x12\xd8\xfc\x1d\x4d\xda\x09\x71\x9e\xf3\x05\xe3\xfe\xfd\x6f\x33\x15\xde\xdc\x55\xbe\x37\x2a\x8d\x16\xb8\xf7\xe0\xd7\xe9\xa8\x79\xee\xa5\x3b\xfd\x58\x2b\xec\xff\x3d\xfd\xe4\xd3\xad\x9a\x4f\x7e\x9a\x6c\x16\x7f\x73\x4f\xba\xda\xcf\xae\x36\x8e\x7c\x46\x90\xf6\x62\xac\x95\x68\x37\xf6\x7e\x42\xf0\x26\xbf\xef\x83\xae\xf1\x39\x5b\xff\x61\x55\xe0\xe8\x7f\x65\xff\x6d\x3e\x82\x5b\xbd\xae\xfe\x17\x00\x00\xff\xff\xf8\x93\x01\x77\x6e\x3c\x00\x00") func dataConfig_schema_v34JsonBytes() ([]byte, error) { return bindataRead( diff --git a/cli/compose/schema/data/config_schema_v3.4.json b/cli/compose/schema/data/config_schema_v3.4.json index 4cfbd060a2..ce9512076b 100644 --- a/cli/compose/schema/data/config_schema_v3.4.json +++ b/cli/compose/schema/data/config_schema_v3.4.json @@ -339,7 +339,10 @@ "delay": {"type": "string", "format": "duration"}, "failure_action": {"type": "string"}, "monitor": {"type": "string", "format": "duration"}, - "max_failure_ratio": {"type": "number"} + "max_failure_ratio": {"type": "number"}, + "order": {"type": "string", "enum": [ + "start-first", "stop-first" + ]} }, "additionalProperties": false }, diff --git a/cli/compose/types/types.go b/cli/compose/types/types.go index 918c9bef0c..8e93d9fb66 100644 --- a/cli/compose/types/types.go +++ b/cli/compose/types/types.go @@ -187,6 +187,7 @@ type UpdateConfig struct { FailureAction string `mapstructure:"failure_action"` Monitor time.Duration MaxFailureRatio float32 `mapstructure:"max_failure_ratio"` + Order string } // Resources the resource limits and reservations