Closed vilkaspilkas closed 2 years ago
According to https://github.com/tinkerbell/hub/blob/main/actions/rootio/v1/pkg/types.go/metadata.go#L14:L27 it would expect the storage block to be at the root of the returned metadata, but hegel returns everything wrapped in metadata":{...}. As a result rootio doesn't format/mount partitions as specified in the hardware config.
metadata":{...}
rootio should partition and format the disks if host metadata has a storage block.
storage
I get either Succesfully parsed the MetaData, Found [0] Disks or segfault in rootio.go:49.
Succesfully parsed the MetaData, Found [0] Disks
PR will follow.
run rootio partition action (image: /rootio:v1.0.1, command: ["partition"] in the template) against the following metadata returned for the box:
image: /rootio:v1.0.1, command: ["partition"]
{ "id": "f9f56dff-098a-4c5f-a51c-19ad35de85d4", "metadata": { "facility": { "facility_code": "onprem" }, "instance": {}, "storage": { "disks": [ { "device": "/dev/sda", "partitions": [ { "label": "BIOS", "number": 1, "size": 4096 }, { "label": "ROOT", "number": 2, "size": 8936000 } ], "wipe_table": true } ] } }, "network": { .... }
Hello, @markyjackson-taulia tagging you as requested.
According to https://github.com/tinkerbell/hub/blob/main/actions/rootio/v1/pkg/types.go/metadata.go#L14:L27 it would expect the storage block to be at the root of the returned metadata, but hegel returns everything wrapped in
metadata":{...}
. As a result rootio doesn't format/mount partitions as specified in the hardware config.Expected Behaviour
rootio should partition and format the disks if host metadata has a
storage
block.Current Behaviour
I get either
Succesfully parsed the MetaData, Found [0] Disks
or segfault in rootio.go:49.Possible Solution
PR will follow.
Steps to Reproduce (for bugs)
run rootio partition action (
image: /rootio:v1.0.1, command: ["partition"]
in the template) against the following metadata returned for the box: