kernelci / kernelci-docker

Docker containers configurations for KernelCI
GNU Lesser General Public License v2.1
9 stars 23 forks source link

How can LAVA job results be transmit to kernelci backend and store to database. #25

Closed jiewu9823 closed 1 year ago

jiewu9823 commented 1 year ago

Hi, I have some troubles need your help. I would be grateful if you can give any assistance. I used lava-docker to deploy LAVA and the qemu job can be executed successfully. I used kernelci-docker to deploy kernelci. I configured notify block in LAVA job and expect that kernelci backend can receive the request of LAVA job result and store to database. In this way, LAVA job result should be shown in kernelci frontend. In fact, kernelci backend can receive the request of LAVA job result but seems not to store to database. There is not any item in Tests page of kernelci frontend. How can LAVA job results be transmit to kernelci backend and store to database.

lava job

device_type: qemu
job_name: qemu-riscv-kernelci-test
timeouts:
  job:
    minutes: 15
  action:
    minutes: 10
  connection:
    minutes: 2
priority: medium
visibility: public
context:
  arch: riscv64
  machine: virt
  guestfs_interface: virtio
  extra_options:
    - -machine virt
    - -nographic
    - -smp 2
    - -m 4G
    - -device virtio-blk-device,drive=hd0
    - -append "root=/dev/vda rw console=ttyS0"
    - -device virtio-net-device,netdev=usernet
    - -netdev user,id=usernet,hostfwd=tcp::10000-:22
metadata:
  git.branch: master
  git.commit: 80e62bc8487b049696e67ad133c503bf7f6806f7
  job.arch: riscv
  job.build_environment: riscv
  kernel.defconfig: defconfig
  kernel.defconfig_base: defconfig
  kernel.tree: none
  platform.name: qemu
  test.plan: qemu-test
actions:
- deploy:
    timeout:
      minutes: 5
    to: tmpfs
    images:
      kernel:
        image_arg: -kernel {kernel}
        url: file:///home/inlinepath/Image
      rootfs:
        image_arg: -drive file={rootfs},format=raw,id=hd0
        url: file:///home/inlinepath/rootfs.img
- boot:
    timeout:
      minutes: 6
    method: qemu
    media: tmpfs
    prompts: ["root@openEuler-riscv64"]
    auto_login:
      login_prompt: "openEuler-riscv64 login:"
      username: root
      password_prompt: "Password:"
      password: openEuler12#$
- test:
    timeout:
      minutes: 5
    definitions:
    - repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: smoke-tests-basic
          description: "Basic system test command for oerv images"
        run:
          steps:
          - printenv
      from: inline
      name: env-dut-inline
      path: inline/env-dut.yaml
notify:
  criteria:
    status: finished
  callbacks:
    - url: http://127.0.0.1:20001/callback/lava/test?lab_name=lab-01-nantong&status={STATUS}&status_string={STATUS_STRING}
      method: POST
      dataset: all
      token: 345a6f59-6d47-4fb8-9fae-5a8ecac70cdc
      content-type: json

kernelci backend docker container log

-> mongo is available, launching the backend
[    INFO/MainThread] 200 GET /version (172.31.0.6) 0.88ms
[    INFO/MainThread] 200 GET /version (172.31.0.3) 0.73ms
[    INFO/  Thread-1] New token creation from IP address 172.31.0.1
[    INFO/MainThread] 201 POST /token (172.31.0.1) 4.12ms
[ WARNING/  Thread-2] Received callback POST request from an admin token
[    INFO/MainThread] 202 POST /callback/lava/test?lab_name=lab-01-nantong&status=2&status_string=complete (180.128.161.205) 61.36ms
gctucker commented 1 year ago

@montjoie Could you please take a look?

jiewu9823 commented 1 year ago

resolved

BIRooter commented 1 year ago

@jiewu-plct : I met the same problem. Could you tell me how to fix it? Thanks!