Skip to content

Commit

Permalink
fix: handle more OpenStack link types
Browse files Browse the repository at this point in the history
Fixes #8481

The issue was that the link 'bridge' was skipped, so Talos default was
applied to run DHCP and use the DHCP hostname (instead of using
platform's hostname).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Apr 3, 2024
1 parent e7d8041 commit 1b17008
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,31 @@ func (o *Openstack) ParseMetadata(
// Interfaces

for idx, netLink := range unmarshalledNetworkConfig.Links {
// OpenStack network metadata schema:
// "type": {
// "$id": "#/definitions/l2_link/properties/type",
// "type": "string",
// "enum": [
// "bridge",
// "dvs",
// "hw_veb",
// "hyperv",
// "ovs",
// "tap",
// "vhostuser",
// "vif",
// "phy"
// ],
// "title": "Interface type",
// "examples": [
// "bridge"
// ]
// },
// "vif_id": {
// "$ref": "#/definitions/l2_vif_id"
// }
switch netLink.Type {
case "phy", "vif", "ovs":
case "phy", "vif", "ovs", "bridge", "tap", "vhostuser", "hw_veb":
linkName := ""

for hostInterfaceIter := hostInterfaces.Iterator(); hostInterfaceIter.Next(); {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
{
"id": "411f3980-d8f9-4bf0-a09a-9c01c81e1022",
"type": "phy",
"type": "bridge",
"ethernet_mac_address": "4c:d9:8f:b3:34:f8"
},
{
Expand Down Expand Up @@ -150,4 +150,4 @@
"type": "dns"
}
]
}
}

0 comments on commit 1b17008

Please sign in to comment.