|
| 1 | += *Metal^3^* |
| 2 | + |
| 3 | +.Ironic: |
| 4 | +Due to a link:../components/metal3.adoci#L31[known issue], if you are trying to configure predictable names for the target OS network devices and you end up in errors, seeing that the discovered device names have different naming pattern, then you have a couple of options: |
| 5 | + |
| 6 | +_Option 1:_ Use two network configuration secrets, one for the inspection/provisioning phase and another for the deployed OS. |
| 7 | + |
| 8 | +It is recommended to create two different secrets with the network configuration, one to be used with the IPA using the device names as IPA will discover and use it as `preprovisioningNetworkDataName` on the `BareMetalHost` definition and another secret with the device names as SL Micro will discover and use it as `networkData.name` on the `BareMetalHost` definition: |
| 9 | + |
| 10 | +*_Example of creating two secrets, one to be used by IPA and another to be used by the target operating system_* |
| 11 | + |
| 12 | +* Target OS (SL Micro) secret: |
| 13 | +
|
| 14 | +---- |
| 15 | +apiVersion: v1 |
| 16 | +kind: Secret metadata: |
| 17 | + name: controlplane-0-networkdata-os |
| 18 | +type: Opaque |
| 19 | +stringData: |
| 20 | + networkData: | |
| 21 | + interfaces: |
| 22 | + - name: enp1s0 |
| 23 | + type: ethernet |
| 24 | + state: up |
| 25 | + mac-address: "00:f3:65:8a:a3:b0" |
| 26 | + ipv4: |
| 27 | + address: |
| 28 | + - ip: 192.168.125.200 |
| 29 | + prefix-length: 24 |
| 30 | + enabled: true |
| 31 | + dhcp: false dns-resolver: |
| 32 | + config: |
| 33 | + server: |
| 34 | + - 192.168.125.1 |
| 35 | + routes: |
| 36 | + config: |
| 37 | + - destination: 0.0.0.0/0 |
| 38 | + next-hop-address: 192.168.125.1 |
| 39 | + next-hop-interface: enp1s0 |
| 40 | +---- |
| 41 | + |
| 42 | +* ironic (IPA) secret: |
| 43 | +
|
| 44 | +---- |
| 45 | +apiVersion: v1 |
| 46 | +kind: Secret |
| 47 | +metadata: |
| 48 | + name: controlplane-0-networkdata-ipa |
| 49 | +type: Opaque |
| 50 | +stringData: |
| 51 | + networkData: | |
| 52 | + interfaces: |
| 53 | + - name: enp1s0np0 |
| 54 | + type: ethernet |
| 55 | + state: up |
| 56 | + mac-address: "00:f3:65:8a:a3:b0" |
| 57 | + ipv4: |
| 58 | + address: |
| 59 | + - ip: 192.168.125.200 |
| 60 | + prefix-length: 24 |
| 61 | + enabled: true |
| 62 | + dhcp: false |
| 63 | + dns-resolver: |
| 64 | + config: |
| 65 | + server: |
| 66 | + - 192.168.125.1 |
| 67 | + routes: |
| 68 | + config: |
| 69 | + - destination: 0.0.0.0/0 |
| 70 | + next-hop-address: 192.168.125.1 |
| 71 | + next-hop-interface: enp1s0np0 |
| 72 | +---- |
| 73 | + |
| 74 | +* Apply on bare metal host: |
| 75 | +
|
| 76 | +---- |
| 77 | +apiVersion: metal3.io/v1alpha1 |
| 78 | +kind: BareMetalHost |
| 79 | +metadata: |
| 80 | + name: controlplane-0 |
| 81 | + labels: |
| 82 | + cluster-role: control-plane |
| 83 | +spec: |
| 84 | + preprovisioningNetworkDataName: controlplane-0-networkdata-ipa |
| 85 | + networkData: |
| 86 | + name: controlplane-0-networkdata-os |
| 87 | +... |
| 88 | +
|
| 89 | +---- |
| 90 | + |
| 91 | +_Option 2:_ Alternateively, you can use UUIDs as identifiers. |
| 92 | + |
| 93 | +How to get the UUIDs you need: |
| 94 | + |
| 95 | +1. In your OpenSUSE or SLES machine install nmc: |
| 96 | +`zypper in nm-configurator` |
| 97 | +
|
| 98 | +2. then run directly: |
| 99 | +`nmc generate --config-dir /path/to/your/config --output-dir /where/you/want/it` |
| 100 | +now in the output files you should have the UUIDs that you can use in your configuration. |
| 101 | +
|
| 102 | +3. Alternatively, if you don't use OpenSUSE or SLES, you can use the nmc through the Edge Image Builder container image: |
| 103 | +`podman run -it --rm -v $(pwd):/path/to/your/config:Z --entrypoint=/usr/bin/nmc registry.suse.com/edge/3.3/edge-image-builder:1.2.1 generate --confi |
| 104 | +g-dir /path/to/your/config --output-dir /where/you/want/it` |
0 commit comments