Skip to content

dispatcher: allow place holder when specify binary address

Larry Shen requested to merge atline/lava:address_place_holder into master

This is an alternative implementation for !1713 with less code change and more universal, we still need this feature

The sample job will be next:

- deploy:
    timeout:
      minutes: 120
    to: tftp
    kernel:
      url: http://{LAVA_LOCAL_SERVER_IP}:9989/linux/Image-imx8mmevk.bin
      # url: http://10.192.244.104:9989/linux/Image-imx8mmevk.bin
      type: image
    persistent_nfs:
      address: "{LAVA_LOCAL_SERVER_IP}:/var/lib/lava/dispatcher/tmp/linux/imx8mm_rootfs"
      # address: "10.192.244.104:/var/lib/lava/dispatcher/tmp/linux/imx8mm_rootfs"
    dtb:
      url: http://{LAVA_LOCAL_SERVER_IP}:9989/linux/imx8mm-evk.dtb
    os: debian

The device jinja2:

{% set static_info = [{'LAVA_LOCAL_SERVER_IP': "10.192.244.104"}] %}

With this way, we possible to send same job template to different sites, and the worker in different sites can find the nearest server (defined in device.jinja, pre-define the Nexus/server which nearest to current worker/device). This improves the efficiency of global lava farm.

Sample log:

job_671.log

Edited by Larry Shen

Merge request reports