diff options
author | Kevin Hilman <khilman@baylibre.com> | 2019-10-04 07:35:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 07:35:05 -0700 |
commit | d7360d5899d7a4cc701634fbb6e3b6d5606dc04b (patch) | |
tree | 02c8c3541667d7d15071ca8e8942954ddab66440 /lava-slave | |
parent | 8ebcea50e12756580560b4b6578ad3979682ea59 (diff) | |
parent | 4760b0d2372ca68275296e86aa6cfc1f731cd543 (diff) |
Merge pull request #104 from montjoie/2019.09
2019.09
Diffstat (limited to 'lava-slave')
-rw-r--r-- | lava-slave/Dockerfile | 2 | ||||
-rwxr-xr-x | lava-slave/scripts/setup.sh | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile index b93e310..a2ce4b3 100644 --- a/lava-slave/Dockerfile +++ b/lava-slave/Dockerfile @@ -1,4 +1,4 @@ -FROM lavasoftware/lava-dispatcher:2019.07 +FROM lavasoftware/lava-dispatcher:2019.09 RUN apt-get update diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh index 4bf2f67..c39fdc4 100755 --- a/lava-slave/scripts/setup.sh +++ b/lava-slave/scripts/setup.sh @@ -105,10 +105,14 @@ do if [ $? -eq 0 ];then echo "$devicename already present" #verify if present on another worker - #TODO - lavacli $LAVACLIOPTS devices show $devicename |grep ^worker |grep -q $worker - if [ $? -ne 0 ];then - echo "ERROR: $devicename already present on another worker" + lavacli $LAVACLIOPTS devices show $devicename |grep ^worker > /tmp/current-worker + if [ $? -ne 0 ]; then + CURR_WORKER="" + else + CURR_WORKER=$(cat /tmp/current-worker | sed '^.* ,,') + fi + if [ ! -z "$CURR_WORKER" -a "$CURR_WORKER" != "$worker" ];then + echo "ERROR: $devicename already present on another worker $CURR_WORKER" exit 1 fi DEVICE_HEALTH=$(grep "$devicename[[:space:]]" /tmp/devices.list | sed 's/.*,//') |