aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-02-27 10:56:20 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2019-02-27 15:51:56 +0100
commitb0d0e945ebdff62045fe74bceacbf731f5d1abfd (patch)
treec6eb3b10f034b805cd33530fb64d6adfbe67bf02
parent9262d3c0ee23aa5b79dbf790162134acccb5c42b (diff)
Ensure boot order in heat_ims
Ellis publishes the shared config which mostly fails when resources are allocated in parallel (conflict). Then nothing works when the shared config is blank. It still remains failures in IMS testing which are still under analysis. Change-Id: Ic54a2a7478e07a9291c76be8ffc57f04d199421e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/vnf/Dockerfile7
-rw-r--r--docker/vnf/clearwater-heat-add-deps.patch126
2 files changed, 131 insertions, 2 deletions
diff --git a/docker/vnf/Dockerfile b/docker/vnf/Dockerfile
index 90efb8609..aba09ebbf 100644
--- a/docker/vnf/Dockerfile
+++ b/docker/vnf/Dockerfile
@@ -17,6 +17,7 @@ ENV GOPATH /src/epc-requirements/go
ENV GOBIN /src/epc-requirements/go/bin
ENV PATH $GOBIN:$PATH
+COPY clearwater-heat-add-deps.patch /tmp/clearwater-heat-add-deps.patch
RUN apk --no-cache add --update \
ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
procps libxslt libxml2 zlib libffi python3 go musl-dev && \
@@ -43,7 +44,8 @@ RUN apk --no-cache add --update \
git init /src/heat_vims && \
(cd /src/heat_vims && \
git fetch --tags https://github.com/Metaswitch/clearwater-heat.git $HEAT_VIMS_TAG && \
- git checkout FETCH_HEAD) && \
+ git checkout FETCH_HEAD && \
+ patch -p1 < /tmp/clearwater-heat-add-deps.patch) && \
git init /src/opnfv-vnf-vyos-blueprint && \
(cd /src/opnfv-vnf-vyos-blueprint && \
git fetch --tags https://github.com/oolorg/opnfv-vnf-vyos-blueprint.git $VROUTER_BP_TAG && \
@@ -68,7 +70,8 @@ RUN apk --no-cache add --update \
(cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/vims-test/.git /src/cloudify_vims/.git /src/heat_vims/.git /src/vims-test/quaff/.git \
/src/vims-test/build-infra/.git /src/opnfv-vnf-vyos-blueprint/.git \
- /src/epc-requirements/abot_charm/.git /root/.cache/go-build && \
+ /src/epc-requirements/abot_charm/.git /root/.cache/go-build \
+ /tmp/clearwater-heat-add-deps.patch && \
apk del .build-deps
COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
CMD ["run_tests", "-t", "all"]
diff --git a/docker/vnf/clearwater-heat-add-deps.patch b/docker/vnf/clearwater-heat-add-deps.patch
new file mode 100644
index 000000000..4c9dd143e
--- /dev/null
+++ b/docker/vnf/clearwater-heat-add-deps.patch
@@ -0,0 +1,126 @@
+diff --git a/clearwater.yaml b/clearwater.yaml
+index a155c60..1de2e0f 100644
+--- a/clearwater.yaml
++++ b/clearwater.yaml
+@@ -185,6 +185,7 @@ resources:
+
+ ellis:
+ type: ./ellis.yaml
++ depends_on: dns
+ properties:
+ public_mgmt_net_id: { get_param: public_mgmt_net_id }
+ private_mgmt_net_id: { get_attr: [ mgmt_network, private_net ] }
+@@ -202,6 +203,7 @@ resources:
+
+ bono:
+ type: OS::Heat::ResourceGroup
++ depends_on: ellis
+ properties:
+ count: { get_param: bono_cluster_size }
+ index_var: "__index__"
+@@ -229,6 +231,7 @@ resources:
+
+ sprout:
+ type: OS::Heat::ResourceGroup
++ depends_on: ellis
+ properties:
+ count: { get_param: sprout_cluster_size }
+ index_var: __index__
+@@ -257,6 +260,7 @@ resources:
+
+ homer:
+ type: OS::Heat::ResourceGroup
++ depends_on: ellis
+ properties:
+ count: { get_param: homer_cluster_size }
+ index_var: __index__
+@@ -285,6 +289,7 @@ resources:
+
+ dime:
+ type: OS::Heat::ResourceGroup
++ depends_on: ellis
+ properties:
+ count: { get_param: dime_cluster_size }
+ index_var: __index__
+@@ -313,6 +318,7 @@ resources:
+
+ vellum:
+ type: OS::Heat::ResourceGroup
++ depends_on: ellis
+ properties:
+ count: { get_param: vellum_cluster_size }
+ index_var: __index__
+diff --git a/dns.yaml b/dns.yaml
+index 825ede1..3e6c938 100644
+--- a/dns.yaml
++++ b/dns.yaml
+@@ -91,6 +91,16 @@ resources:
+ security_groups:
+ - { get_param: dns_security_group }
+
++ wait_condition:
++ type: OS::Heat::WaitCondition
++ properties:
++ handle: {get_resource: wait_handle}
++ count: 1
++ timeout: 600
++
++ wait_handle:
++ type: OS::Heat::WaitConditionHandle
++
+ server:
+ type: OS::Nova::Server
+ properties:
+@@ -110,6 +120,7 @@ resources:
+ __public_ip__: { get_attr: [ mgmt_floating_ip, floating_ip_address ] }
+ __private_sig_ip__: { get_attr: [ sig_port, fixed_ips, 0, ip_address ] }
+ __private_sig_cidr__: { get_param: private_sig_net_cidr }
++ wc_notify: { get_attr: [wait_handle, curl_cli] }
+ template: |
+ #!/bin/bash
+
+@@ -162,6 +173,7 @@ resources:
+
+ # Now that BIND configuration is correct, kick it to reload.
+ service bind9 reload
++ wc_notify --data-binary '{"status": "SUCCESS"}'
+
+ outputs:
+ public_mgmt_ip:
+diff --git a/ellis.yaml b/ellis.yaml
+index 963352d..d39c235 100644
+--- a/ellis.yaml
++++ b/ellis.yaml
+@@ -103,6 +103,16 @@ resources:
+ floating_network_id: { get_param: public_mgmt_net_id }
+ port_id: { get_resource: mgmt_port }
+
++ wait_condition:
++ type: OS::Heat::WaitCondition
++ properties:
++ handle: {get_resource: wait_handle}
++ count: 1
++ timeout: 600
++
++ wait_handle:
++ type: OS::Heat::WaitConditionHandle
++
+ server:
+ type: OS::Nova::Server
+ properties:
+@@ -126,6 +136,7 @@ resources:
+ __dnssec_key__: { get_param: dnssec_key }
+ __etcd_ip__ : { get_param: etcd_ip }
+ __index__ : { get_param: index }
++ wc_notify: { get_attr: [wait_handle, curl_cli] }
+ template: |
+ #!/bin/bash
+
+@@ -227,6 +238,7 @@ resources:
+ echo 'nameserver __dns_mgmt_ip__' > /etc/dnsmasq.resolv.conf
+ echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq
+ service dnsmasq force-reload
++ wc_notify --data-binary '{"status": "SUCCESS"}'
+
+ outputs:
+ public_mgmt_ip: