Hi,
I'm trying to run a job which reboots the board. The reboot is controlled with interactive shell. After issuing 'reboot' I try to run a 'boot' action with download overlay. This unfortunately fails. If there is 'transfer_overlay' lava complains there is no overlay available to download. When I remove 'transfer_overlay' lava complains there are no tests to run. I guess I need to add 'deploy' action before the second boot, but I don't know how to do it properly. The DUT should be left on it's own and not reflashed. Here is my job definition:
actions: - deploy: namespace: before timeout: minutes: 10 to: flasher images: image: .... - boot: namespace: before prompts: - "root@imx8mmevk" timeout: minutes: 10 auto_login: login_prompt: 'login:' username: fio password_prompt: "Password:" password: "fio" login_commands: - sudo su - fio method: minimal transfer_overlay: download_command: cd /home ; wget unpack_command: tar -C / -xzf - test: namespace: before timeout: minutes: 5 definitions: - repository: metadata: format: Lava-Test Test Definition 1.0 name: prepare-upgrade description: "OTA upgrade" os: - debian scope: - functional run: steps: ... from: inline name: prepare-upgrade path: inline/prepare-upgrade.yaml - test: namespace: before timeout: minutes: 1 interactive: - name: reboot prompts: ['root@imx8mmevk',] script: - command: reboot name: reboot - boot: namespace: after connection-namespace: before prompts: - "root@imx8mmevk" timeout: minutes: 10 auto_login: login_prompt: 'login:' username: fio password_prompt: "Password:" password: "fio" login_commands: - sudo su - fio method: minimal transfer_overlay: download_command: cd /home ; wget unpack_command: tar -C / -xzf - test: namespace: after connection-namespace: before timeout: minutes: 5 definitions: - repository: metadata: format: Lava-Test Test Definition 1.0 name: verify-rollback description: "OTA upgrade" os: - debian scope: - functional run: steps: ... from: inline name: verify-rollback path: inline/verify-rollback.yaml
I removed the test steps as they're not relevant. The 'before' and 'after' namespaces are required. Without namespaces LAVA will only run last boot and test sections and ignores the ones in 'before' namespace.
To conclude - does anyone know how to make this job working? Either by adding a 'dummy deploy' to the 'after' namespace or by getting rid of namespaces so all tests are executed in the defined order?
Best Regards, Milosz
Hello Milosz,
have you tried adding a deploy to download in the after namespace? This should make the second test available.
Cheers
Le mar. 27 juil. 2021 à 16:43, Milosz Wasilewski < milosz.wasilewski@foundries.io> a écrit :
Hi,
I'm trying to run a job which reboots the board. The reboot is controlled with interactive shell. After issuing 'reboot' I try to run a 'boot' action with download overlay. This unfortunately fails. If there is 'transfer_overlay' lava complains there is no overlay available to download. When I remove 'transfer_overlay' lava complains there are no tests to run. I guess I need to add 'deploy' action before the second boot, but I don't know how to do it properly. The DUT should be left on it's own and not reflashed. Here is my job definition:
actions:
- deploy: namespace: before timeout: minutes: 10 to: flasher images: image: ....
- boot: namespace: before prompts:
timeout: minutes: 10 auto_login: login_prompt: 'login:' username: fio password_prompt: "Password:" password: "fio" login_commands: - sudo su - fio method: minimal transfer_overlay: download_command: cd /home ; wget unpack_command: tar -C / -xzf
- "root@imx8mmevk"
- test: namespace: before timeout: minutes: 5 definitions:
- repository: metadata: format: Lava-Test Test Definition 1.0 name: prepare-upgrade description: "OTA upgrade" os: - debian scope: - functional run: steps: ... from: inline name: prepare-upgrade path: inline/prepare-upgrade.yaml
- test: namespace: before timeout: minutes: 1 interactive:
- name: reboot prompts: ['root@imx8mmevk',] script:
- command: reboot name: reboot
- boot: namespace: after connection-namespace: before prompts:
timeout: minutes: 10 auto_login: login_prompt: 'login:' username: fio password_prompt: "Password:" password: "fio" login_commands: - sudo su - fio method: minimal transfer_overlay: download_command: cd /home ; wget unpack_command: tar -C / -xzf
- "root@imx8mmevk"
- test: namespace: after connection-namespace: before timeout: minutes: 5 definitions:
- repository: metadata: format: Lava-Test Test Definition 1.0 name: verify-rollback description: "OTA upgrade" os: - debian scope: - functional run: steps: ... from: inline name: verify-rollback path: inline/verify-rollback.yaml
I removed the test steps as they're not relevant. The 'before' and 'after' namespaces are required. Without namespaces LAVA will only run last boot and test sections and ignores the ones in 'before' namespace.
To conclude - does anyone know how to make this job working? Either by adding a 'dummy deploy' to the 'after' namespace or by getting rid of namespaces so all tests are executed in the defined order?
Best Regards, Milosz
Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
On Mon, Sep 27, 2021 at 4:08 PM Remi Duraffort remi.duraffort@linaro.org wrote:
Hello Milosz,
have you tried adding a deploy to download in the after namespace? This should make the second test available.
I made it working (I mentioned on IRC). The tricky part is there are 2 very similar deployments: - to:download - to:downloads
The former is doing a lot of things and I think it's meant for android. The latter (with s at the end) just downloads stuff and prepares overlay. This is what I switched to and it works. Hope this helps someone in a similar situation :)
Cheers, milosz
lava-users@lists.lavasoftware.org