armada-app: fix build failure on centos 62/3462/1
authorJackie Huang <jackie.huang@windriver.com>
Sun, 26 Apr 2020 03:58:07 +0000 (20:58 -0700)
committerJackie Huang <jackie.huang@windriver.com>
Sun, 26 Apr 2020 09:53:58 +0000 (17:53 +0800)
- 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 <jackie.huang@windriver.com>
Change-Id: I431b49da630c43948b956b702bf57480d44096b8

meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm-elastic_1.0.bb
meta-stx/recipes-core/stx-monitor-armada-app/monitor-helm_1.0.bb
meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm-infra_1.0.bb
meta-stx/recipes-core/stx-openstack-armada-app/openstack-helm_1.0.bb
meta-stx/recipes-core/stx-openstack-armada-app/stx-openstack-helm_1.0.bb
meta-stx/recipes-core/stx-platform-armada-app/stx-platform-helm_1.0.bb

index 7cc8dab..1f54f1d 100644 (file)
@@ -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}
 }
 
index 78503ac..375c006 100644 (file)
@@ -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}
 }
 
index 92ad899..2b7e196 100644 (file)
@@ -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}
 }
 
index 17b1fe0..a43d9f4 100644 (file)
@@ -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
index 0941ab7..d4635a8 100644 (file)
@@ -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
index 6f041e4..88cf8b2 100644 (file)
@@ -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