Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Redfish: Attribute Links/ManagedBy is missing from the resource #70

Closed
lentzi90 opened this issue Feb 7, 2025 · 13 comments
Closed
Assignees
Labels
area/redfish Front-end protocol related and it's Redfish component/agent Relevant to the virtualized BMCs kind/bug Something isn't working

Comments

@lentzi90
Copy link

lentzi90 commented Feb 7, 2025

Describe the bug

I am trying to use kubevirtbmc with Bare Metal Operator and Ironic.
So far I have managed to get the connection and authentication to work. I.e. Ironic is able to reach the Redfish API.
However, it then gets stuck because it expects to find Links/ManagedBy attribute for the System. Here is how it looks in the logs:

2025-02-07 07:50:44.639 1 DEBUG sushy.connector [None req-9282022a-d73b-4b77-a90f-f8ac968b8909 - - - - - -] HTTP request: GET http://default-testvm-virtbmc.kubevirtbmc-system.svc/redfish/v1/Systems/1; headers: {'OData-Version': '4.0', 'Accept-Encoding': 'identity'}; body: None; blocking: False; timeout: 60; session arguments: {}; _op /usr/lib/python3.9/site-packages/sushy/connector.py:157
2025-02-07 07:50:44.642 1 DEBUG sushy.connector [None req-9282022a-d73b-4b77-a90f-f8ac968b8909 - - - - - -] HTTP response for GET http://default-testvm-virtbmc.kubevirtbmc-system.svc/redfish/v1/Systems/1: status code: 200 _op /usr/lib/python3.9/site-packages/sushy/connector.py:306
2025-02-07 07:50:44.642 1 DEBUG sushy.resources.base [None req-9282022a-d73b-4b77-a90f-f8ac968b8909 - - - - - -] Received representation of System /redfish/v1/Systems/1: {'_actions': {'reset': {'allowed_values': None, 'operation_apply_time_support': None, 'target_uri': '/redfish/v1/Systems/1/Actions/ComputerSystem.Reset'}}, '_oem_vendors': None, '_settings': None, 'asset_tag': '', 'bios_version': None, 'boot': {'allowed_values': None, 'enabled': <BootSourceOverrideEnabled.DISABLED: 'Disabled'>, 'http_boot_uri': None, 'mode': <BootSourceOverrideMode.LEGACY: 'Legacy'>, 'target': <BootSource.HDD: 'Hdd'>}, 'boot_progress': {'last_boot_seconds_count': None, 'last_state': None, 'last_state_updated_at': None, 'oem_last_state': None}, 'description': 'Computer System', 'hostname': None, 'identity': '1', 'indicator_led': <IndicatorLED.UNKNOWN: 'Unknown'>, 'links': {'oem_vendors': None}, 'maintenance_window': None, 'manufacturer': 'KubeVirt', 'memory_summary': {'health': None, 'size_gib': 0}, 'name': 'default/testvm', 'part_number': '', 'power_state': <PowerState.OFF: 'Off'>, 'serial_number': '000000000000', 'sku': '', 'status': {'health': None, 'health_rollup': None, 'state': None}, 'system_type': <SystemType.VIRTUAL: 'Virtual'>, 'uuid': '00000000-0000-0000-0000-000000000000'} refresh /usr/lib/python3.9/site-packages/sushy/resources/base.py:697
2025-02-07 07:50:44.642 1 WARNING sushy.resources.system.system [None req-9282022a-d73b-4b77-a90f-f8ac968b8909 - - - - - -] Unable to find ManagedBy attribute for System 1, retrying with Managers attribute: sushy.exceptions.MissingAttributeError: The attribute Links/ManagedBy is missing from the resource /redfish/v1/Systems/1
2025-02-07 07:50:44.642 1 ERROR sushy.resources.system.system [None req-9282022a-d73b-4b77-a90f-f8ac968b8909 - - - - - -] Both ManagedBy and Managers attributes missing for System 1, aborting: sushy.exceptions.MissingAttributeError: The attribute Links/Managers is missing from the resource /redfish/v1/Systems/1

I tried looking through the code to see what could be missing. If I understand correctly, there are definitely Managers so I guess they would just need to be linked, perhaps here.
Does that sound correct?

To Reproduce

I have pushed my WIP changes here.
Deploying BMO/Ironic is unfortunately a bit complicated still so that is why rather link to the manifests instead of reproducing them here.

Steps to reproduce the behavior:

  1. Create a kind cluster
  2. Deploy BMO and Ironic, preferably without hostNetwork to make it easier to work with kubevirtbmc. Instead, expose it through a Service and adjust the Certificate to match (see my playground repo link above where I have done all this).
  3. Deploy kubevirt and kubevirtbmc
  4. Create a test VM and a BareMetalHost object that makes use of the BMC API as defined in the virtualmachinebmc.
  5. The BareMetalHost goes through the registering phase, confirming access to the BMC
  6. The BareMetalHost proceeds to inspecting
  7. Inspection fails
Failed to inspect hardware. Reason: unable to start inspection: The attribute Links/ManagedBy is missing from the resource /redfish/v1/Systems/1

More details can be found in the logs of the Ironic pod, specifically from the ironic container (not ironic-http).

Expected behavior
BMO/Ironic should be able to control the kubevirt VMs through the Redfish interface setup by kubevirtbmc.

@lentzi90 lentzi90 added the kind/bug Something isn't working label Feb 7, 2025
@starbops
Copy link
Owner

starbops commented Feb 8, 2025

Hi @lentzi90, thanks for the feedback! I will try to set up BMO and Ironic in my environment to see what Redfish endpoints are required for Ironic to go through the provisioning workflow. In the meantime, if you know what those endpoints are, it would be great to post them directly here to save some time (for instance, https://www.dmtf.org/sites/default/files/standards/documents/DSP2046_2024.2.html#manager-1191). I'm sure this is due to some missing Redfish endpoints, as the implemented ones are limited (I only tested with Tinkerbell).

By the way, do you think your work can somehow become an e2e testing case for KubeVirtBMC?

@starbops starbops added area/redfish Front-end protocol related and it's Redfish component/agent Relevant to the virtualized BMCs labels Feb 8, 2025
@starbops starbops moved this to Backlog in KubeVirtBMC project Feb 8, 2025
@starbops starbops moved this from Backlog to Ready in KubeVirtBMC project Feb 8, 2025
@lentzi90
Copy link
Author

lentzi90 commented Feb 8, 2025

Thank you!

By the way, do you think your work can somehow become an e2e testing case for KubeVirtBMC?

I'm hoping to use kubevirtbmc in BMO e2e tests eventually. Currently I am trying it out to find any blockers or missing features. It does look promising and would make our e2e test setup much simpler.

I'm not sure if it would make sense to test kubevirtbmc itself in this way but it would certainly be possible! We currently test Redfish, IPMI and Redfish with virtualmedia. The tests would go through things like power on/off, reboot, change boot device order and of course virtualmedia.

@starbops
Copy link
Owner

Thanks for sharing. But I have to say that the virtual media function, as recorded in #44, has not yet been implemented. At the current stage, I suggest using iPXE to do the provisioning.

OTOH, I was told by a Redfish expert that there is an interop validator on the DMTF website and an interoperability profile provided by the Ironic project. With these at hand, we can have a canonical way to test the conformance of KubeVirtBMC and see whether it conforms to Ironic's workflow.

@MartijnStraatman
Copy link

Hi,

We are having the same issue. We are also trying to use kubevirtbmc and the baremetal operator. Would be really great if this can be implemented.

@starbops starbops moved this from Ready to In progress in KubeVirtBMC project Feb 20, 2025
@starbops
Copy link
Owner

starbops commented Mar 1, 2025

@lentzi90 I had a hard time pulling things together and made them work correctly. I was basically following the Metal3 quick-start guide and the guide on your GitHub repo but I couldn't make the VM under provision to query the correct endpoint for getting the kernel and initrd files:

Image Image

172.18.0.2 is the node IP of the KinD cluster. Apparently, the VM, which got an IP 192.168.48.65, wouldn't be able to contact it. How do I customize the generated pxelinux.cfg/xx-xx-xx-xx-xx-xx and inspector.ipxe file? The machine I ran, with the dnsmasq, nginx containers, and KinD, has an IP address of 192.168.48.58. I must have missed something important in the env file for Ironic. What I got was:

HTTP_PORT=6180
PROVISIONING_INTERFACE=eth0
CACHEURL=http://192.168.48.58
IRONIC_KERNEL_PARAMS=console=ttyS0

I found that you seem to have worked on similar stuff before (metal3-io/ironic-image#468). Could you provide me with some insights? Thank you.

@starbops
Copy link
Owner

starbops commented Mar 1, 2025

I managed to get it working by forcing it to use IRONIC_IP=192.168.48.58, which I'm unsure is the correct way or just a hack. Please let me know if there is a better way to tackle this situation.

With this setup working, however, I ended up with a successful BMH inspection without encountering the issue you mentioned originally. Here's the BMH resource I used/ended up with:

apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"metal3.io/v1alpha1","kind":"BareMetalHost","metadata":{"annotations":{},"name":"bml-01","namespace":"default"},"spec":{"bmc":{"address":"redfish://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io/redfish/v1/Systems/1","credentialsName":"bml-01","disableCertificateVerification":true},"bootMACAddress":"ea:e3:66:d4:ca:4b","bootMode":"legacy","online":true,"rootDeviceHints":{"deviceName":"/dev/vda"}}}
  creationTimestamp: "2025-03-01T16:38:10Z"
  finalizers:
  - baremetalhost.metal3.io
  generation: 2
  name: bml-01
  namespace: default
  resourceVersion: "22136"
  uid: ea01f292-dc49-42c5-ae59-b4ff5613a508
spec:
  architecture: x86_64
  automatedCleaningMode: metadata
  bmc:
    address: redfish://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io/redfish/v1/Systems/1
    credentialsName: bml-01
    disableCertificateVerification: true
  bootMACAddress: ea:e3:66:d4:ca:4b
  bootMode: legacy
  online: true
  rootDeviceHints:
    deviceName: /dev/vda
status:
  errorCount: 0
  errorMessage: ""
  goodCredentials:
    credentials:
      name: bml-01
      namespace: default
    credentialsVersion: "19689"
  hardware:
    cpu:
      arch: x86_64
      count: 2
      flags:
      - 3dnowprefetch
      - abm
      - adx
      - aes
      - apic
      - arat
      - arch_capabilities
      - avx
      - avx2
      - bmi1
      - bmi2
      - clflush
      - cmov
      - constant_tsc
      - cpuid
      - cpuid_fault
      - cx16
      - cx8
      - de
      - ept
      - ept_ad
      - erms
      - f16c
      - flexpriority
      - fma
      - fpu
      - fsgsbase
      - fxsr
      - hle
      - ht
      - hypervisor
      - ibpb
      - ibrs
      - invpcid
      - lahf_lm
      - lm
      - mca
      - mce
      - md_clear
      - mmx
      - movbe
      - msr
      - mtrr
      - nopl
      - nx
      - pae
      - pat
      - pcid
      - pclmulqdq
      - pdpe1gb
      - pge
      - pni
      - popcnt
      - pse
      - pse36
      - pti
      - rdrand
      - rdseed
      - rdtscp
      - rep_good
      - rtm
      - sep
      - smap
      - smep
      - ss
      - ssbd
      - sse
      - sse2
      - sse4_1
      - sse4_2
      - ssse3
      - stibp
      - syscall
      - tpr_shadow
      - tsc
      - tsc_adjust
      - tsc_deadline_timer
      - tsc_known_freq
      - umip
      - vme
      - vmx
      - vnmi
      - vpid
      - x2apic
      - xsave
      - xsaveopt
      - xtopology
      model: Intel Core Processor (Broadwell, IBRS)
    firmware:
      bios:
        date: 04/01/2014
        vendor: SeaBIOS
        version: rel-1.16.0-0-gd239552c-rebuilt.opensuse.org
    hostname: localhost.localdomain
    nics:
    - ip: 192.168.48.65
      mac: ea:e3:66:d4:ca:4b
      model: 0x1af4 0x0001
      name: enp1s0
      pxe: true
    - ip: fe80::bcc5:2646:af52:4315%enp1s0
      mac: ea:e3:66:d4:ca:4b
      model: 0x1af4 0x0001
      name: enp1s0
      pxe: true
    ramMebibytes: 4096
    storage:
    - alternateNames:
      - /dev/vda
      - /dev/disk/by-path/pci-0000:07:00.0
      name: /dev/disk/by-path/pci-0000:07:00.0
      rotational: true
      sizeBytes: 10737418240
      type: HDD
      vendor: "0x1af4"
    systemVendor:
      manufacturer: KubeVirt
      productName: None
  hardwareProfile: unknown
  lastUpdated: "2025-03-01T16:59:17Z"
  operationHistory:
    deprovision:
      end: null
      start: null
    inspect:
      end: "2025-03-01T16:59:17Z"
      start: "2025-03-01T16:38:20Z"
    provision:
      end: null
      start: null
    register:
      end: "2025-03-01T16:38:20Z"
      start: "2025-03-01T16:38:10Z"
  operationalStatus: OK
  poweredOn: true
  provisioning:
    ID: a5db2eae-f18f-4fd8-9cbb-d8507a8c9b89
    bootMode: legacy
    image:
      url: ""
    rootDeviceHints:
      deviceName: /dev/vda
    state: available
  triedCredentials:
    credentials:
      name: bml-01
      namespace: default
    credentialsVersion: "19689"

I won't be able to verify whether my patch can fix the original issue if I cannot reproduce it first. What's your BMO and Ironic versions? I followed the quick start guide, but I believe it's pretty outdated: with BMO v0.5.1 and Ironic v24.0.0.

@starbops
Copy link
Owner

starbops commented Mar 1, 2025

OTOH, I ran the validator against the KubeVirtBMC's Redfish service, and got a report that showed all the required stuff we haven't implemented. Indeed, the Links/ManagedBy property is mandatory:

Image

The report is in HTML format so it's not allowed to post it here. Below are the steps to do the validation and generate a report. I put a note here in case someone may want to check it later :)

  1. Set up DMTF/Redfish-Interop-Validator
  2. Prepare the config virtual-metal.ini for the validator:
    [Tool]
    verbose = 
    
    [Host]
    ip = https://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io
    username = admin
    password = password
    description = KubeVirtBMC v0.5.0
    forceauth = False
    authtype = Session
    token = 
    
    [Validator]
    payload = 
    logdir = ./logs
    oemcheck = False
    online_profiles = False
    debugging = False
    collectionlimit = 
    
  3. Download the Redfish interoperability profile for OpenStack Ironic can be found here

Finally, run the validator with the config and profile:

$ python RedfishInteropValidator.py -c config/virtual-metal.ini test-profiles/OpenStackIronicProfile.v1_1_0.json
Redfish Interop Validator, version 2.2.7

{
    "DEFAULT": {},
    "Tool": {
        "verbose": {
            "value": "",
            "description": "TBD"
        }
    },
    "Host": {
        "ip": {
            "value": "https://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io",
            "description": "TBD"
        },
        "username": {
            "value": "admin",
            "description": "TBD"
        },
        "password": {
            "value": "******",
            "description": "TBD"
        },
        "description": {
            "value": "KubeVirtBMC v0.5.0",
            "description": "TBD"
        },
        "forceauth": {
            "value": "False",
            "description": "TBD"
        },
        "authtype": {
            "value": "Session",
            "description": "TBD"
        },
        "token": {
            "value": "",
            "description": "TBD"
        }
    },
    "Validator": {
        "payload": {
            "value": "",
            "description": "TBD"
        },
        "logdir": {
            "value": "./logs",
            "description": "TBD"
        },
        "oemcheck": {
            "value": "False",
            "description": "TBD"
        },
        "online_profiles": {
            "value": "False",
            "description": "TBD"
        },
        "debugging": {
            "value": "False",
            "description": "TBD"
        },
        "collectionlimit": {
            "value": "",
            "description": "TBD"
        }
    }
}
Target URI: https://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io
authtype: Session
collectionlimit: ['LogEntry', '20']
config: config/virtual-metal.ini
debugging: False
forceauth: False
ip: https://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io
logdir: ./logs
oemcheck: False
online_profiles: False
password: ******
profile: ['test-profiles/OpenStackIronicProfile.v1_1_0.json']
username: admin
verbose: 0
warnrecommended: False
writecheck: False
Start time: 03/02/25 - 01:15:51

Setting up service...
Session successfully created
Session successfully created
Redfish Version of Service: 1.16.1
Description of service: KubeVirtBMC v0.5.0

Profile Hashes:
profile: OpenStackIronicProfile 1.1.0, dict md5 hash: a4279c0b60056c1ed0dacfff98cd796b


*** /redfish/v1/, ServiceRoot
         Type (#ServiceRoot.v1_16_1.ServiceRoot), GET SUCCESS (time: 0.001107)
### Validating an InteropResource
### Validating PropertyRequirements for Systems
### Validating PropertyRequirements for SessionService
Comparison failed
### Validating PropertyRequirements for TaskService
        Item is recommended but does not exist
### Validating PropertyRequirements for UpdateService
Comparison failed
4 of 8 tests passed.
ServiceRoot, Counter({'totaltests': 8, 'pass': 4, 'passGet': 1, 'fail.SessionService.Comparison': 1, 'fail.UpdateService.Comparison': 1})

          FAIL...
/redfish/v1/AccountService:  URI could not be acquired: 501
/redfish/v1/AccountService:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Chassis:  URI could not be acquired: 501
/redfish/v1/Chassis:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/CompositionService:  URI could not be acquired: 501
/redfish/v1/CompositionService:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/EventService:  URI could not be acquired: 501
/redfish/v1/EventService:  This resource is inaccessible and cannot be validated or traversed for links.


*** /redfish/v1/Managers/BMC, Manager
         Type (#Manager.v1_19_2.Manager), GET SUCCESS (time: 0.001665)
### Validating an InteropResource
### Validating PropertyRequirements for FirmwareVersion
        Item is recommended but does not exist
0 of 1 tests passed.
ServiceRoot:Links:ManagerProvidingService, Counter({'passGet': 1, 'totaltests': 1})

         PASS
/redfish/v1/SessionService/Sessions:  URI could not be acquired: 501
/redfish/v1/SessionService/Sessions:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Registries:  URI could not be acquired: 501
/redfish/v1/Registries:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/SessionService:  URI could not be acquired: 501
/redfish/v1/SessionService:  This resource is inaccessible and cannot be validated or traversed for links.


*** /redfish/v1/Systems, ComputerSystemCollection
         Type (#ComputerSystemCollection.ComputerSystemCollection), GET SUCCESS (time: 0.000955)
### Validating an InteropResource
### Validating PropertyRequirements for Members
2 of 2 tests passed.
ServiceRoot:Systems, Counter({'pass': 2, 'totaltests': 2, 'passGet': 1})

         PASS
/redfish/v1/Tasks:  URI could not be acquired: 404
/redfish/v1/Tasks:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/TelemetryService:  URI could not be acquired: 501
/redfish/v1/TelemetryService:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/UpdateService:  URI could not be acquired: 501
/redfish/v1/UpdateService:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Managers/BMC/EthernetInterfaces:  URI could not be acquired: 501
/redfish/v1/Managers/BMC/EthernetInterfaces:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Managers/BMC/LogServices:  URI could not be acquired: 501
/redfish/v1/Managers/BMC/LogServices:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Managers/BMC/SerialInterfaces:  URI could not be acquired: 501
/redfish/v1/Managers/BMC/SerialInterfaces:  This resource is inaccessible and cannot be validated or traversed for links.


*** /redfish/v1/Systems/1, ComputerSystem
         Type (#ComputerSystem.v1_22_0.ComputerSystem), GET SUCCESS (time: 0.004684)
### Validating an InteropResource
### Validating PropertyRequirements for Bios
### Validating PropertyRequirements for BiosVersion
        Item is recommended but does not exist
### Validating PropertyRequirements for Boot
Unable to test writeable property, no Allow header available Mandatory
MinSupportValues failed
Unable to test writeable property, no Allow header available Mandatory
Unable to test writeable property, no Allow header available Mandatory
MinSupportValues failed
### Validating PropertyRequirements for EthernetInterfaces
This URI is empty!
Comparison failed
### Validating PropertyRequirements for IndicatorLED
Unable to test writeable property, no Allow header available Recommended
### Validating PropertyRequirements for Links
        Item is recommended but does not exist
### Validating PropertyRequirements for Manufacturer
### Validating PropertyRequirements for MemorySummary
### Validating PropertyRequirements for PowerState
### Validating PropertyRequirements for Processors
Comparison failed
### Validating PropertyRequirements for SecureBoot
Comparison failed
### Validating PropertyRequirements for SimpleStorage
Comparison failed
### Validating PropertyRequirements for Storage
Comparison failed
### Validating PropertyRequirements for VirtualMedia
Comparison failed
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: ResetType
18 of 33 tests passed.
ServiceRoot:Systems:Members#0, Counter({'totaltests': 33, 'pass': 17, 'passGet': 1, 'fail.BootSourceOverrideEnabled.SupportedValues': 1, 'fail.BootSourceOverrideTarget.SupportedValues': 1, 'fail.EthernetInterfaces.Comparison': 1, 'fail.ManagedBy.ReadRequirement': 1, 'fail.Processors.Comparison': 1, 'fail.SecureBoot.Comparison': 1, 'fail.SimpleStorage.Comparison': 1, 'fail.Storage.Comparison': 1, 'fail.VirtualMedia.Comparison': 1, 'warn': 1})

          FAIL...


*** /redfish/v1/Managers/BMC/VirtualMedia/1, VirtualMedia
         Type (#VirtualMedia.v1_6_3.VirtualMedia), GET SUCCESS (time: 0.001415)
### Validating an InteropResource
### Validating PropertyRequirements for Image
Unable to test writeable property, no Allow header available Recommended
### Validating PropertyRequirements for Inserted
Unable to test writeable property, no Allow header available Recommended
### Validating PropertyRequirements for MediaTypes
### Validating PropertyRequirements for WriteProtected
Unable to test writeable property, no Allow header available Recommended
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: Image
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: Inserted
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: TransferMethod
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: TransferProtocolType
        No such ActionInfo exists for this Action, and no AllowableValues exists.  Cannot validate the following parameters: WriteProtected
14 of 17 tests passed.
ServiceRoot:Links:ManagerProvidingService:VirtualMedia:Members#0, Counter({'totaltests': 17, 'pass': 9, 'warn': 5, 'passGet': 1})

         PASS
/redfish/v1/Systems/1/NetworkInterfaces:  URI could not be acquired: 501
/redfish/v1/Systems/1/NetworkInterfaces:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Systems/1/SimpleStorage:  URI could not be acquired: 501
/redfish/v1/Systems/1/SimpleStorage:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Systems/1/Storage:  URI could not be acquired: 501
/redfish/v1/Systems/1/Storage:  This resource is inaccessible and cannot be validated or traversed for links.
/redfish/v1/Systems/1/VirtualMedia:  URI could not be acquired: 501
/redfish/v1/Systems/1/VirtualMedia:  This resource is inaccessible and cannot be validated or traversed for links.
Service Level Checks
Validating Bios ReadRequirement
        Item is recommended but does not exist
Validating Chassis ReadRequirement
        Item is recommended but does not exist
Validating ComputerSystemCollection ReadRequirement
Validating AnyOf Comparison for ComputerSystem : IndicatorLED
  ['Unknown'],  Expecting ['Lit', 'Off', 'Blinking']
  FAIL
Validating ComputerSystem ReadRequirement
Validating Drive ReadRequirement
        Item is recommended but does not exist
Validating EthernetInterface ReadRequirement
        Item is recommended but does not exist
Validating Manager ReadRequirement
Validating Power ReadRequirement
        Item is recommended but does not exist
Validating Processor ReadRequirement
        Item is recommended but does not exist
Validating SecureBoot ReadRequirement
        Item is recommended but does not exist
Validating ServiceRoot ReadRequirement
Validating SessionService ReadRequirement
        Item is recommended but does not exist
Validating SimpleStorage ReadRequirement
        Item is recommended but does not exist
Validating Storage ReadRequirement
        Item is recommended but does not exist
Validating TaskService ReadRequirement
        Item is recommended but does not exist
Validating Thermal ReadRequirement
        Item is recommended but does not exist
Validating UpdateService ReadRequirement
        Item is recommended but does not exist
Validating VirtualMedia ReadRequirement
Validating Volume ReadRequirement
        Item is recommended but does not exist
Validating VolumeCollection ReadRequirement
        Item is recommended but does not exist
Elapsed time: 0:00:00
1 fail.Comparison.ComputerSystem.IndicatorLED errors in Service Level Requirements
1 fail.SessionService.Comparison errors in /redfish/v1/
1 fail.UpdateService.Comparison errors in /redfish/v1/
1 fail.BootSourceOverrideEnabled.SupportedValues errors in /redfish/v1/Systems/1
1 fail.BootSourceOverrideTarget.SupportedValues errors in /redfish/v1/Systems/1
1 fail.EthernetInterfaces.Comparison errors in /redfish/v1/Systems/1
1 fail.ManagedBy.ReadRequirement errors in /redfish/v1/Systems/1
1 fail.Processors.Comparison errors in /redfish/v1/Systems/1
1 fail.SecureBoot.Comparison errors in /redfish/v1/Systems/1
1 fail.SimpleStorage.Comparison errors in /redfish/v1/Systems/1
1 fail.Storage.Comparison errors in /redfish/v1/Systems/1
1 fail.VirtualMedia.Comparison errors in /redfish/v1/Systems/1
fail.BootSourceOverrideEnabled.SupportedValues: 1
fail.BootSourceOverrideTarget.SupportedValues: 1
fail.Comparison.ComputerSystem.IndicatorLED: 1
fail.EthernetInterfaces.Comparison: 1
fail.ManagedBy.ReadRequirement: 1
fail.Processors.Comparison: 1
fail.SecureBoot.Comparison: 1
fail.SessionService.Comparison: 1
fail.SimpleStorage.Comparison: 1
fail.Storage.Comparison: 1
fail.UpdateService.Comparison: 1
fail.VirtualMedia.Comparison: 1
inaccessibleResource: 17
notTested: 8
pass: 38
passGet: 7
totaltests: 61
warn: 6
warningPresent: 19
Validation has failed: 12 problems found

The report will be in the logs directory.

@starbops starbops self-assigned this Mar 1, 2025
@starbops starbops added this to the Phase 3 - Support Redfish milestone Mar 1, 2025
@lentzi90
Copy link
Author

lentzi90 commented Mar 3, 2025

Thank you for this @starbops !
We have had some issues with breaking changes in both Ironic and Ironic-python-agent lately that could be causing this I think. I will try "rebasing" and see if I can get things working. It is promising that you managed to get through inspection at least!

@starbops
Copy link
Owner

starbops commented Mar 5, 2025

Hi @lentzi90 The fix #72 has been merged and a new version v0.5.1 has been released. Please kindly try again. Thank you!

@lentzi90
Copy link
Author

lentzi90 commented Mar 6, 2025

Ok so I realize I cannot use virtualmedia, the Attribute error came when using virtualmedia. Indeed it changed now to another error with v0.5.1, so some progress I guess! 🙂

I am now trying to switch to Redfish without virtualmedia but I have a hard time figuring out how to configure the PXE booting. Did you use multus to be able to do this over the host network? Could you perhaps share the VirtualMachine yaml of how you did that?

@starbops
Copy link
Owner

starbops commented Mar 7, 2025

Absolutely. I can successfully PXE booting the virtual machine and install the target OS without issues.

My setup runs on a single-node Harvester cluster, so I can quickly get a KubeVirt-ready environment and deploy the Metal3 stack using a separate Kubernetes cluster in a virtual machine. But setting up the environment from the ground up is fine.

Since KubeVirtBMC needs to communicate with the API server where the virtual machines exist, I installed it on the underlying Harvester cluster. I then spun up two virtual machines: one is our target machine for provisioning and the other is for installing all the quickstart-mentioned stuff, including the KinD cluster.

  • virtual-metal: the unprovisioned virtual machine
  • aio: Metal3 all-in-one
Image

Both virtual machines are attached to a Multus bridge network, which is basically the same L2 network as the Harvester node. That means they are all in the same subnet 192.168.48.0/24.

VirtualMachine manifest
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  annotations:
    harvesterhci.io/vmRunStrategy: Always
    harvesterhci.io/volumeClaimTemplates: '[{"metadata":{"name":"virtual-metal-rootdisk"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"10Gi"}},"volumeMode":"Block","storageClassName":"harvester-longhorn"}}]'
    kubevirt.io/latest-observed-api-version: v1
    kubevirt.io/storage-observed-api-version: v1
    network.harvesterhci.io/ips: '[]'
  creationTimestamp: "2025-03-01T08:06:45Z"
  finalizers:
  - kubevirtbmc-virtualmachine-controller
  - kubevirt.io/virtualMachineControllerFinalize
  - wrangler.cattle.io/VMController.CleanupPVCAndSnapshot
  generation: 42
  labels:
    harvesterhci.io/creator: harvester
    harvesterhci.io/os: linux
  name: virtual-metal
  namespace: adhoc
  resourceVersion: "1752062"
  uid: 170c15be-add7-47dd-bcfe-1cea5d76eb18
spec:
  running: true
  template:
    metadata:
      annotations:
        harvesterhci.io/sshNames: '[]'
      creationTimestamp: null
      labels:
        harvesterhci.io/vmName: virtual-metal
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: network.harvesterhci.io/mgmt
                operator: In
                values:
                - "true"
      architecture: amd64
      domain:
        cpu:
          cores: 2
          sockets: 1
          threads: 1
        devices:
          disks:
          - bootOrder: 1
            disk:
              bus: virtio
            name: rootdisk
          interfaces:
          - bridge: {}
            macAddress: ea:e3:66:d4:ca:4b
            model: virtio
            name: default
        features:
          acpi:
            enabled: true
        machine:
          type: q35
        memory:
          guest: 4Gi
        resources:
          limits:
            cpu: "2"
            memory: 4Gi
          requests:
            cpu: 125m
            memory: 2730Mi
      evictionStrategy: LiveMigrateIfPossible
      hostname: virtual-metal
      networks:
      - multus:
          networkName: default/net-48
        name: default
      terminationGracePeriodSeconds: 120
      volumes:
      - name: rootdisk
        persistentVolumeClaim:
          claimName: virtual-metal-rootdisk
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2025-03-07T09:03:14Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: null
    status: "True"
    type: LiveMigratable
  created: true
  desiredGeneration: 42
  observedGeneration: 42
  printableStatus: Running
  ready: true
  runStrategy: Always
  volumeSnapshotStatuses:
  - enabled: false
    name: rootdisk
    reason: 2 matching VolumeSnapshotClasses for harvester-longhorn
BareMetalHost manifest
NAME     STATE         CONSUMER   ONLINE   ERROR   AGE
bml-01   provisioned              true             55m
ubuntu@aio:~$ kubectl get bmh bml-01 -o yaml
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"metal3.io/v1alpha1","kind":"BareMetalHost","metadata":{"annotations":{},"name":"bml-01","namespace":"default"},"spec":{"bmc":{"address":"redfish://adhoc-virtual-metal-
  creationTimestamp: "2025-03-07T08:59:31Z"
  finalizers:
  - baremetalhost.metal3.io
  generation: 2
  name: bml-01
  namespace: default
  resourceVersion: "192942"
  uid: 4a7cefab-76b9-4d73-a51c-09b0d0926f52
spec:
  architecture: x86_64
  automatedCleaningMode: metadata
  bmc:
    address: redfish://adhoc-virtual-metal-virtbmc.192.168.48.100.sslip.io/redfish/v1/Systems/1
    credentialsName: bml-01
    disableCertificateVerification: true
  bootMACAddress: ea:e3:66:d4:ca:4b
  bootMode: legacy
  image:
    checksum: http://192.168.48.58/SHA256SUMS
    checksumType: sha256
    format: qcow2
    url: http://192.168.48.58/jammy-server-cloudimg-amd64.img
  online: true
  rootDeviceHints:
    deviceName: /dev/vda
  userData:
    name: user-data
    namespace: default
status:
  errorCount: 0
  errorMessage: ""
  goodCredentials:
    credentials:
      name: bml-01
      namespace: default
    credentialsVersion: "192488"
  hardware:
    cpu:
      arch: x86_64
      count: 2
      flags:
      - 3dnowprefetch
      - abm
      - adx
      - aes
      - apic
      - arat
      - arch_capabilities
      - avx
      - avx2
      - bmi1
      - bmi2
      - clflush
      - cmov
      - constant_tsc
      - cpuid
      - cpuid_fault
      - cx16
      - cx8
      - de
      - ept
      - ept_ad
      - erms
      - f16c
      - flexpriority
      - fma
      - fpu
      - fsgsbase
      - fxsr
      - hle
      - ht
      - hypervisor
      - ibpb
      - ibrs
      - invpcid
      - lahf_lm
      - lm
      - mca
      - mce
      - md_clear
      - mmx
      - movbe
      - msr
      - mtrr
      - nopl
      - nx
      - pae
      - pat
      - pcid
      - pclmulqdq
      - pdpe1gb
      - pge
      - pni
      - popcnt
      - pse
      - pse36
      - pti
      - rdrand
      - rdseed
      - rdtscp
      - rep_good
      - rtm
      - sep
      - smap
      - smep
      - ss
      - ssbd
      - sse
      - sse2
      - sse4_1
      - sse4_2
      - ssse3
      - stibp
      - syscall
      - tpr_shadow
      - tsc
      - tsc_adjust
      - tsc_deadline_timer
      - tsc_known_freq
      - umip
      - vme
      - vmx
      - vnmi
      - vpid
      - x2apic
      - xsave
      - xsaveopt
      - xtopology
      model: Intel Core Processor (Broadwell, IBRS)
    firmware:
      bios:
        date: 04/01/2014
        vendor: SeaBIOS
        version: rel-1.16.0-0-gd239552c-rebuilt.opensuse.org
    hostname: localhost.localdomain
    nics:
    - ip: 192.168.48.65
      mac: ea:e3:66:d4:ca:4b
      model: 0x1af4 0x0001
      name: enp1s0
      pxe: true
    - ip: fe80::d325:1b78:5142:bfee%enp1s0
      mac: ea:e3:66:d4:ca:4b
      model: 0x1af4 0x0001
      name: enp1s0
      pxe: true
    ramMebibytes: 4096
    storage:
    - alternateNames:
      - /dev/vda
      - /dev/disk/by-path/pci-0000:07:00.0
      name: /dev/disk/by-path/pci-0000:07:00.0
      rotational: true
      sizeBytes: 10737418240
      type: HDD
      vendor: "0x1af4"
    systemVendor:
      manufacturer: KubeVirt
      productName: None
  hardwareProfile: unknown
  lastUpdated: "2025-03-07T09:03:23Z"
  operationHistory:
    deprovision:
      end: null
      start: null
    inspect:
      end: "2025-03-07T09:02:22Z"
      start: "2025-03-07T08:59:41Z"
    provision:
      end: "2025-03-07T09:03:23Z"
      start: "2025-03-07T09:02:22Z"
    register:
      end: "2025-03-07T08:59:41Z"
      start: "2025-03-07T08:59:31Z"
  operationalStatus: OK
  poweredOn: true
  provisioning:
    ID: 829d8b96-61d9-4fb5-aa9f-e7da7a339d0a
    bootMode: legacy
    image:
      checksum: http://192.168.48.58/SHA256SUMS
      checksumType: sha256
      format: qcow2
      url: http://192.168.48.58/jammy-server-cloudimg-amd64.img
    rootDeviceHints:
      deviceName: /dev/vda
    state: provisioned
  triedCredentials:
    credentials:
      name: bml-01
      namespace: default
    credentialsVersion: "192488"

I noticed that you seem to install all of them in the same Kubernetes cluster. That's convenient because Metal3 can communicate to KubeVirtBMC directly via service names, so there's no need to set up an ingress controller. Maybe I should try it. This kind of setup is more likely for testing environment, which is the key pain point that KubeVirtBMC wants to resolve.

@lentzi90
Copy link
Author

lentzi90 commented Mar 7, 2025

Awesome, thank you! I think I will be able to progress with this, but it will likely be next week before I have time.

I noticed that you seem to install all of them in the same Kubernetes cluster. That's convenient because Metal3 can communicate to KubeVirtBMC directly via service names, so there's no need to set up an ingress controller. Maybe I should try it.

I'm not completely sure if this will actually work. I thought it would be easy with virtualmedia and just in-cluster network, but I am not sure if PXE would work well like that. In fact, I already started reverting back to host network and will probably go that route first since it is closer to what we normally do.
Once I have something working, I will definitely try to get rid of the host network though 😄

@starbops
Copy link
Owner

starbops commented Mar 7, 2025

Good luck with that!

I'll close this issue since the link attributes were added to the Redfish resource. Feel free to re-open it if you find something still missing or let me know what I can do here.

Thank you.

@starbops starbops closed this as completed Mar 7, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in KubeVirtBMC project Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redfish Front-end protocol related and it's Redfish component/agent Relevant to the virtualized BMCs kind/bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants