openshift / assisted-service

Apache License 2.0
109 stars 209 forks source link

interface-name blocks the use of "identifer: mac-address" #6631

Open oybed opened 1 month ago

oybed commented 1 month ago

When providing an interface with the identifier: mac-address set (per nmstate docs [1]) the assisted service fails to create the image due to missing interface-name. This is new with the change from https://github.com/openshift/assisted-service/pull/6305 and now seeing this problem with OpenShift v4.16.

Example NMState

    - name: ens2f0
      mac-address: 01:23:45:67:89:ab
      type: ethernet
      state: up
      identifier: mac-address

Example error: image

[1]: https://nmstate.io/features/mac_identifier.html

rccrdpccl commented 1 month ago

cc @AlonaKaplan

AlonaKaplan commented 1 month ago

@oybed MAC identifier nmstate feature is not supported by assisted installer. AI resides on the mapping passed by the user between the interface name in the nmstate yaml to the MAC address. We are planning to allow passing nmstate yaml with nmpolicy/mac-identifier which will eliminate the need for the iface-name to MAC mapping. This new feature is currently in initial development stages.

EDIT: If you will remove the identifier: mac-address from your nmstate yaml it should work. It doesn't matter what name you put in the name section. assited-installer will take care of substituting it with the correct name based on the MAC mapping.

oybed commented 1 month ago

@AlonaKaplan thanks for the response. Yes, we removed the identifier: mac-address to make it work, but it seems strange to not support an advertised feature of nmstate (see earlier nmstate link).

Either way, the error message displayed to the user is not very friendly to understand that the identifier: mac-address is the culprit, so at least update the frontend to display a more descriptive message.