diff --git a/magnum/templates/swarm/fragments/write-swarm-agent-service.sh b/magnum/templates/swarm/fragments/write-swarm-agent-service.sh index 6fb806615e..ffbbbe6293 100644 --- a/magnum/templates/swarm/fragments/write-swarm-agent-service.sh +++ b/magnum/templates/swarm/fragments/write-swarm-agent-service.sh @@ -41,7 +41,11 @@ SCRIPT=/usr/local/bin/notify-heat cat > $SCRIPT << EOF #!/bin/sh -until etcdctl --peers $ETCD_SERVER_IP:2379 ls /v2/keys/swarm/docker/swarm/nodes/$myip:2375 +until etcdctl \ + --peers $ETCD_SERVER_IP:2379 \ + --timeout 1s \ + --total-timeout 5s \ + ls /v2/keys/swarm/docker/swarm/nodes/$myip:2375 do echo "Waiting for swarm agent registration..." sleep 5 diff --git a/magnum/templates/swarm/swarmcluster.yaml b/magnum/templates/swarm/swarmcluster.yaml index 44f9acd132..6b2a7b649b 100644 --- a/magnum/templates/swarm/swarmcluster.yaml +++ b/magnum/templates/swarm/swarmcluster.yaml @@ -299,7 +299,6 @@ resources: type: "OS::Heat::ResourceGroup" depends_on: - extrouter_inside - - swarm_masters properties: count: {get_param: number_of_nodes} resource_def: diff --git a/magnum/tests/functional/api/v1/test_bay.py b/magnum/tests/functional/api/v1/test_bay.py index 29dd6f0d5b..0d754194fb 100644 --- a/magnum/tests/functional/api/v1/test_bay.py +++ b/magnum/tests/functional/api/v1/test_bay.py @@ -106,7 +106,8 @@ class BayTest(base.BaseMagnumTest): # they time out on the gate (2 hours not enough) @testtools.testcase.attr('positive') def test_create_list_and_delete_bays(self): - gen_model = datagen.valid_bay_data(baymodel_id=self.baymodel.uuid) + gen_model = datagen.valid_bay_data( + baymodel_id=self.baymodel.uuid, node_count=1) _, temp_model = self._create_bay(gen_model) resp, model = self.bay_client.list_bays() self.assertEqual(resp.status, 200) @@ -139,24 +140,6 @@ class BayTest(base.BaseMagnumTest): exceptions.BadRequest, self.bay_client.post_bay, gen_model) - @testtools.testcase.attr('negative') - def test_update_bay_baymodel_name_for_existing_bay(self): - first_model = datagen.valid_bay_data(baymodel_id=self.baymodel.uuid, - name='test') - _, old_model = self._create_bay(first_model) - - patch_model = datagen.bay_name_patch_data() - self.assertRaises( - exceptions.BadRequest, - self.bay_client.patch_bay, - old_model.uuid, patch_model) - - patch_baymodel = datagen.baymodel_name_patch_data() - self.assertRaises( - exceptions.BadRequest, - self.baymodel_client.patch_baymodel, - self.baymodel.uuid, patch_baymodel) - @testtools.testcase.attr('negative') def test_update_bay_for_nonexisting_bay(self): patch_model = datagen.bay_name_patch_data()