From f4dde4fe30d1ac9e14ac80a64a480624aa92596d Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Sat, 25 Apr 2020 20:58:07 -0700 Subject: [PATCH] armada-app: fix build failure on centos - use $! instead of pidof to get the last backgrounded helm service - add a sleep after helm serve to ensure the servie is running Issue-ID: INF-42 Signed-off-by: Jackie Huang Change-Id: I431b49da630c43948b956b702bf57480d44096b8 --- .../recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb | 6 +++--- meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb | 6 +++--- .../stx-openstack-armada-app/openstack-helm-infra_1.0.bb | 6 +++--- .../recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb | 6 +++--- .../recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb | 6 +++--- .../recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb b/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb index 7cc8dab..1f54f1d 100644 --- a/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb +++ b/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb @@ -81,6 +81,7 @@ do_compile () { # Host a server for the charts helm serve --repo-path . & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -88,9 +89,8 @@ do_compile () { rm -rf elasticsearch/Makefile make elasticsearch - # terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} } diff --git a/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb b/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb index 78503ac..375c006 100644 --- a/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb +++ b/meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb @@ -88,6 +88,7 @@ do_compile () { # Host a server for the charts helm serve --repo-path . & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -101,9 +102,8 @@ do_compile () { make logstash make elasticsearch-curator - # terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} } diff --git a/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm-infra_1.0.bb b/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm-infra_1.0.bb index 92ad899..2b7e196 100644 --- a/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm-infra_1.0.bb +++ b/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm-infra_1.0.bb @@ -78,6 +78,7 @@ do_compile () { # Host a server for the charts tmpdir=`mktemp -d ${B}/charts-XXXXXX` helm serve ${tmpdir} --address localhost:8879 --url http://localhost:8879/charts & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -92,9 +93,8 @@ do_compile () { make rabbitmq make ceph-rgw - # terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} } diff --git a/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb b/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb index 17b1fe0..a43d9f4 100644 --- a/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb +++ b/meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb @@ -85,6 +85,7 @@ do_compile () { # Host a server for the charts helm serve --repo-path . & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -104,9 +105,8 @@ do_compile () { make panko make placement - # terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} # Remove the helm-toolkit tarball diff --git a/meta-stx/recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb b/meta-stx/recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb index 0941ab7..d4635a8 100644 --- a/meta-stx/recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb +++ b/meta-stx/recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb @@ -74,6 +74,7 @@ do_compile () { # Host a server for the charts helm serve --repo-path . & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -87,9 +88,8 @@ do_compile () { make dcdbsync cd - - # terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} # Remove the helm-toolkit tarball diff --git a/meta-stx/recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb b/meta-stx/recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb index 6f041e4..88cf8b2 100644 --- a/meta-stx/recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb +++ b/meta-stx/recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb @@ -80,6 +80,7 @@ do_compile () { # Host a server for the charts helm serve --repo-path . & + sleep 1 helm repo rm local helm repo add local http://localhost:8879/charts @@ -92,9 +93,8 @@ do_compile () { make node-feature-discovery cd - - # Terminate helm server - pid=`/bin/pidof helm` - kill ${pid} + # Terminate helm server (the last backgrounded task) + kill $! rm -rf ${helm_home} # Create a chart tarball compliant with sysinv kube-app.py -- 2.16.6