From 6b99d37261922362e61c982686043c9937f2889b Mon Sep 17 00:00:00 2001 From: xiexs Date: Fri, 9 Oct 2015 04:31:32 -0400 Subject: [PATCH] Add launch-timeout validator into config-validation. The "nodepool config-validate" will raise following error, while the launch-timeout option specified into the nodepool config file. [Error Msg]: voluptuous.MultipleInvalid: extra keys not allowed @ data['providers'][0]['launch-timeout'] And now add a launch-timeout validator into the config-validation to fix this issue. Change-Id: Ia4aae3e3629b9b6adbeeecd4179e2e5ae8081edb --- devstack/plugin.sh | 1 + nodepool/cmd/config_validator.py | 1 + nodepool/tests/fixtures/config_validate/good.yaml | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 4bd223595..a73058680 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -184,6 +184,7 @@ providers: api-timeout: 60 # Long boot timeout to deal with potentially nested virt. boot-timeout: 600 + launch-timeout: 900 max-servers: 2 rate: 0.25 images: diff --git a/nodepool/cmd/config_validator.py b/nodepool/cmd/config_validator.py index e1a434d14..331a09586 100644 --- a/nodepool/cmd/config_validator.py +++ b/nodepool/cmd/config_validator.py @@ -65,6 +65,7 @@ class ConfigValidator: }], 'boot-timeout': int, 'api-timeout': int, + 'launch-timeout': int, 'rate': float, 'images': [images], 'template-hostname': str diff --git a/nodepool/tests/fixtures/config_validate/good.yaml b/nodepool/tests/fixtures/config_validate/good.yaml index 6bfbf0447..b8705c6eb 100644 --- a/nodepool/tests/fixtures/config_validate/good.yaml +++ b/nodepool/tests/fixtures/config_validate/good.yaml @@ -444,6 +444,7 @@ providers: region-name: 'region-b.geo-1' api-timeout: 60 boot-timeout: 120 + launch-timeout: 900 max-servers: 100 networks: - net-id: b6596f90-914a-41e9-b01a-223d90b86e8d @@ -534,6 +535,7 @@ providers: auth-url: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0' api-timeout: 60 boot-timeout: 120 + launch-timeout: 900 max-servers: 100 networks: - net-id: 90169672-ad5a-4fd5-a1b6-af121203f95c @@ -623,6 +625,7 @@ providers: auth-url: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0' api-timeout: 60 boot-timeout: 120 + launch-timeout: 900 max-servers: 100 networks: - net-id: 63657422-b84f-4d2d-b7d2-765ac560546b @@ -712,6 +715,7 @@ providers: auth-url: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0' api-timeout: 60 boot-timeout: 120 + launch-timeout: 900 max-servers: 100 networks: - net-id: f6d0d957-f31d-4e3b-9c07-3d2a4feebc03 @@ -802,6 +806,7 @@ providers: auth-url: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0' api-timeout: 60 boot-timeout: 120 + launch-timeout: 900 max-servers: 100 networks: - net-id: b96c212f-16e1-4b9c-a3d2-09b3871220c2