Uploaded image for project: 'OpenStack as Infra'
  1. OpenStack as Infra
  2. OSASINFRA-2760

Add support for VF when creating SriovNetworkNodePolicy

    XMLWordPrintable

Details

    • False
    • False

    Description

      See https://bugzilla.redhat.com/show_bug.cgi?id=2036948 for full context.
      And this slack thread:
      https://coreos.slack.com/archives/CH98TDJUD/p1641398905088600?thread_ts=1639061525.362100&cid=CH98TDJUD

      In the SR-IOV network operator, the sriov-config-daemon is not able to show Netfilter on the sriovnetworknodestate status section.

      sriov-config-daemon logs:
      I0105 12:47:28.201930 2842239 utils_virtual.go:165] DiscoverSriovDevicesVirtual
      I0105 12:47:28.223805 2842239 virtual_plugin.go:52] virtual-plugin OnNodeStateAdd()
      I0105 12:47:28.223891 2842239 daemon.go:479] nodeStateSyncHandler(): plugin virtual_plugin: reqDrain false, reqReboot false
      I0105 12:47:28.223901 2842239 daemon.go:483] nodeStateSyncHandler(): reqDrain false, reqReboot false disableDrain false
      I0105 12:47:28.223911 2842239 virtual_plugin.go:84] virtual-plugin Apply(): desiredState={5006414 []}

      The problem is when the NICs are passed with hw-offload, the interfaces are not in the OpenStack metadata section:

      ```
      {
      "uuid": "6a75c23b-5efc-4a75-97b6-1484b18f99db",
      "admin_pass": "dc7DcAzoMz8A",
      "hostname": "ostest-kdjnt-worker-1",
      "name": "ostest-kdjnt-worker-1",
      "launch_index": 0,
      "availability_zone": "nova",
      "random_seed": "RmN4d7iCA+00JjSYz89yElzwaSF3Z4ERerlbVu0daj+kSTszAf1UvVszgIRKHlgs/BwVPls0Gz3pFod/VetpeEAsownYuZPlX9RLtpsea6ZGMEGqYGlCeanxOQh4UTQWSN7hkzrpB5AzYppI5p7yO2hPQ5R6scp+4J73SkCHSbHs2bgvBXLyuikBLoTsuE23S9ma3rmYsaOqe6glsIhRjoLD06vDwpXkPfoolgeIsFfM1VMwzxmtE5GmC+ZAEhAHteynN1+uxxZ4GQtFTnF8QpVMsHhYr/5F/KdC59mBTlzyFFgXPAbHRpjDj0Ydng1VxI3bDIPiLBx/N3a6R2qAifzeDwphQBKgvhMlbmlBCZnfizViEDtQ45k6S4LrFhC9m+WLt/P43iWNOOqD4UVi5gjYOHwJNWSNuni4mkwM5dh8PP5xdEYOq2XUL1oYo/VV/Stxgc9L8dweZdqzvBWCtcp7MFQzuV0gYb8Me6lWmLqrhORDMfhg4AjzAmk0Ui7ryjTGY+6EC6HwjbtLJm77GfuoQTw0UtVVH2SnciwdKiN9gb06Vb0wkyimyxO77Eey6DQL9io8pnceSA6vVsZKD6IJ1KNE3NDvGqBByIsfl5WkaHBwW8eAO7MrRj7YH84jrE6aIzrvSjeAg0t0/fbfUJmynoFGemRL4XBo8+HrNgc=",
      "project_id": "e26bdb8747a94593a9b2ba5919439e57",
      "devices": [

      ]
      }
      ```

      So the sriov daemon is not able to connect the NIC PCI that should be under meta_data.json devices with the network_id from the network_meta.json

      ```
      {
      "links": [

      { "id": "tap8626696e-4c", "vif_id": "8626696e-4cf4-47a7-9490-fe2f046923a6", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:d6:98:de" }

      ,
      {
      "id": "tap3fbf098c-30",
      "vif_id": "3fbf098c-302d-40c2-a273-3c266398557b",
      "type": "ovs",
      "mtu": 1500,
      "ethernet_mac_address": "fa:16:3e:65:0f:62"
      },
      {
      "id": "tap81855815-39",
      "vif_id": "81855815-396c-4e0c-95bd-e48baf73cc69",
      "type": "ovs",
      "mtu": 1500,
      "ethernet_mac_address": "fa:16:3e:f4:79:a2"
      }
      ],
      "networks": [
      {
      "id": "network0",
      "type": "ipv4_dhcp",
      "link": "tap8626696e-4c",
      "network_id": "c0f4c670-9bf5-4867-8f31-1fed1ac137b6"
      },
      {
      "id": "network1",
      "type": "ipv4",
      "link": "tap3fbf098c-30",
      "ip_address": "10.10.9.147",
      "netmask": "255.255.255.0",
      "routes": [

      { "network": "0.0.0.0", "netmask": "0.0.0.0", "gateway": "10.10.9.254" }

      ],
      "network_id": "34591cf7-55e3-4229-8b00-17d3e0723e72",
      "services": [
      {
      "type": "dns",
      "address": "10.46.0.31"
      },
      {
      "type": "dns",
      "address": "8.8.8.8"
      }
      ]
      },
      {
      "id": "network2",
      "type": "ipv4",
      "link": "tap81855815-39",
      "ip_address": "10.10.10.154",
      "netmask": "255.255.255.0",
      "routes": [

      { "network": "0.0.0.0", "netmask": "0.0.0.0", "gateway": "10.10.10.254" }

      ],
      "network_id": "9e19273b-f0b7-4401-92ed-e0c775472a7c",
      "services": [
      {
      "type": "dns",
      "address": "10.46.0.31"
      },
      {
      "type": "dns",
      "address": "8.8.8.8"
      }
      ]
      }
      ],
      "services": [
      {
      "type": "dns",
      "address": "10.46.0.31"
      },
      {
      "type": "dns",
      "address": "8.8.8.8"
      }
      ]
      }
      ```

      one possible solution is to use only the network_meta.json file and connect between:
      1. mac inside the host(vm) and the links section in the network_meta.json
      2. the id in the link section and the id in the networks section to find the network_id

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emacchi@redhat.com Emilien Macchi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: