golemfactory/ya-runtime-vm

Self-check output in offer

evik42 opened this issue · 2 comments

Change how self check is executed so it can report some output that has an effect of the contents of the Offer.

Acceptance criteria:

  • Self check can output the amount of RAM/nr of Cores it sees and that is the basis of the information in the Offer
  • Ensure that WASM runtime still works after this change.

Additional Information:

GPU drawio

I do not understand what this health check is?

Among steps ya-provider performs on start up are:

  1. Running ya-runtime-vm test which runs some basic gvmi as a check if runtime can run anything at all (wasi runtime does not even have test param, so provider looks for printing out --help message .. https://github.com/golemfactory/yagna/blob/302baa6088a9e3e1cabc35d3fb3a2147852e10ef/agent/provider/src/execution/registry.rs#L380)

  2. Running ya-runtime offer-template which produces some system info, mostly about CPU features (note there is no num of cores or RAM):

{
  "constraints": "",
  "properties": {
    "golem.inf.cpu.brand": "AMD Ryzen 9 6900HS with Radeon Graphics",
    "golem.inf.cpu.capabilities": [
      "sse3",
      "pclmulqdq",
      "ssse3",
      // ...... //
    ],
    "golem.inf.cpu.model": "Stepping 1 Family 35 Model 132",
    "golem.inf.cpu.vendor": "AuthenticAMD",
    "golem.runtime.capabilities": [
      "inet",
      "vpn",
      "manifest-support",
      "start-entrypoint"
    ]
  }
}

(again, no such cmd in wasi runtime so that would be it regarding my breaking support concerns).

  1. Finally ya-provider prepares offer. It combines presets config with data produced by above offer-template cmd and profile config. Profiles are limited by system info like num CPUs, RAM, and storage which ya-provider generates by itself (instead of using vm runtime):
    https://github.com/golemfactory/yagna/blob/302baa6088a9e3e1cabc35d3fb3a2147852e10ef/agent/provider/src/hardware.rs#L123

Is this health check task even necessary?
Would it not be enough to just extend vm runtime offer-template cmd output with GPU info while working on #157 ?

EDIT:

Clarification:
The goal of the task is to:

  • update gvmi image used in ya-runtime-vm test command so it will return some system info (eventually GPU, but for now it could be num of CPUs, or RAM)
  • return produced system info as a ya-runtime-vm test cmd output
  • add this system info to offer (probably somewhere in golem.inf namespace)

Done. CI updated for both ya-runtime-vm and ya-self-test-img.
PRs are still drafts because I might want to do some clippy/refactors on ya-runtime-vm.