hard_reset_command: can it be optional ?

Description

slaves: - name: agl-core-lab-1 host: agl-core-lab-1 zmq_auth_key: /root/lava-docker/certificates.d/agl-core-lab-1.key zmq_auth_key_secret: /root/lava-docker/certificates.d/agl-core-lab-1.key_secret remote_master: agl-master remote_address: lavadocker.automotivelinux.org remote_rpc_port: 443 remote_user: corelab remote_proto: https dispatcher_ip: 192.168.111.1 extra_actions: - "apt-get -y install lavapdu-client mc" - "echo \"#!/bin/bash\" >> /usr/local/bin/hardresetvayu-01.sh" - "echo \"curl http://admin:admin@192.168.2.198/FF0600 && sleep 2 && curl http://admin:admin@192.168.2.198/FF0601\" >> /usr/local/bin/hardresetvayu-01.sh" - "chmod a+x /usr/local/bin/hardresetvayu-01.sh" - "echo \"#!/bin/bash\" >> /usr/local/bin/hardresetrpi3-01.sh" - "echo \"curl http://admin:admin@192.168.2.198/FF0200 && sleep 2 && curl http://admin:admin@192.168.2.198/FF0201\" >> /usr/local/bin/hardresetrpi3-01.sh" - "chmod a+x /usr/local/bin/hardresetrpi3-01.sh"boards: - name: qemu-corelab-01 type: qemu - name: vayu-corelab-01 type: dra7-evm pdu_generic: hard_reset_command: hardresetvayu-01.sh power_off_command: curl http://admin:admin@192.168.2.198/FF0600 power_on_command: curl http://admin:admin@192.168.2.198/FF0601 uart: idvendor: 0x0403 idproduct: 0x6001 serial: A801ZUBH use_screen: true

 

The need to mess with hardreset*.sh instead of writing it directly into hard_reset_command

is iffy .

Also iirc lava does already emulate it if it is not specified by power_off and power_on .

So

a) why is it not optional

b) why does    curl ; sleep 1 ; curl    not work

 

Environment

None

Activity

Show:

Kevin Hilman 
October 4, 2018 at 1:52 PM

Merged into upstream lava-docker.

 

Jan-Simon Moeller 
October 3, 2018 at 7:55 PM

Ok, fair deal. Thanks.

 

Corentin Labbe 
October 3, 2018 at 12:11 PM

 have created https://github.com/montjoie/lava-docker/tree/copy_script for this issue.

Simply copy your script in lava-slave/scripts/ and it will be deployed (and made executable) in /usr/local/bin/

Now you can use it in hard_reset_command

Corentin Labbe 
October 2, 2018 at 8:21 AM

I have tried sh -c "curl url && sleep 2 && curl url" but it does not work. The "all command" in shell script is the only way

Corentin Labbe 
October 1, 2018 at 2:04 PM

LAVA does support multiple commands in hard_reset_command.

I can add a "hard_reset_command_sh: string" which produces the right shell script and set it as hard_reset_command

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created August 27, 2018 at 7:21 PM
Updated October 9, 2018 at 2:52 PM
Resolved October 4, 2018 at 1:52 PM

Flag notifications