sriov i/f not created in container in ipv6 environment

Bug #1836972 reported by Brent Rowsell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Steven Webster

Bug Description

Brief Description
-----------------
Cannot create a container with an sriov interface in an ipv6 deployment

Severity
--------
Major

Steps to Reproduce
------------------
In a ipv6 deployment, attempt to create a container with a sriov interface

Expected Behavior
------------------
Container should have a calico and and sriov interface

Actual Behavior
----------------
Container only has the container interface

Reproducibility
---------------
100%

System Configuration
--------------------
All

Branch/Pull Time/Commit
-----------------------
Recent load

Last Pass
---------
Never

Timestamp/Logs
--------------
Not required, issue is 100% reproducible

Test Activity
-------------
Other

Changed in starlingx:
assignee: nobody → Brent Rowsell (brent-rowsell)
tags: added: stx.2.0 stx.containers
description: updated
Ghada Khalil (gkhalil)
tags: added: stx.networking
Revision history for this message
Ghada Khalil (gkhalil) wrote :

This is an issue with the multus-cni image.
There is a pull request to fix the issue, but it has not been merged:
https://github.com/intel/multus-cni/pull/238/commits/5513f6c744a73e9bc42b09660dd030971b3493b4

Perhaps we can ping the owners to get this merged. In the meantime, we will likely need to build the image in stx and apply the required fix to enable IPv6 deployments.

Changed in starlingx:
assignee: Brent Rowsell (brent-rowsell) → Steven Webster (swebster-wr)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Don Penney found a way to do this without updating the image.

$ git diff
diff --git a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
index b7089f5..31fba98 100644
--- a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
+++ b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
@@ -152,6 +152,7 @@ spec:
           - |
             #!/bin/bash
             sed "s|__KUBERNETES_NODE_NAME__|${KUBERNETES_NODE_NAME}|g" /tmp/multus-conf/05-multus.conf > /usr/src/multus-cni/images/05-multus.conf
+ sed -i 's#//\${KUBERNETES_SERVICE_HOST}#//\[\${KUBERNETES_SERVICE_HOST}\]#' /entrypoint.sh
             /entrypoint.sh --multus-conf-file=/usr/src/multus-cni/images/05-multus.conf
         resources:
           requests:

Revision history for this message
Don Penney (dpenney) wrote :

Improved (untried) version, with the sed only running if ipv6 is used:

$ git diff
diff --git a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
index b7089f5..abad731 100644
--- a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
+++ b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb
@@ -152,6 +152,9 @@ spec:
           - |
             #!/bin/bash
             sed "s|__KUBERNETES_NODE_NAME__|${KUBERNETES_NODE_NAME}|g" /tmp/multus-conf/05-multus.conf > /usr/src/multus-cni/images/05-multus.conf
+ <%- if @pod_network_ipversion == 6 -%>
+ sed -i 's#//\${KUBERNETES_SERVICE_HOST}#//\[\${KUBERNETES_SERVICE_HOST}\]#' /entrypoint.sh
+ <%- end -%>
             /entrypoint.sh --multus-conf-file=/usr/src/multus-cni/images/05-multus.conf
         resources:
           requests:

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/676033

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)

Fix proposed to branch: master
Review: https://review.opendev.org/676034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/676033
Committed: https://git.openstack.org/cgit/starlingx/config/commit/?id=290a6f989dfd2f928b4a3c4df3c7727bb30c7511
Submitter: Zuul
Branch: master

commit 290a6f989dfd2f928b4a3c4df3c7727bb30c7511
Author: Steven Webster <email address hidden>
Date: Mon Aug 12 17:10:23 2019 -0500

    Multus support for IPv6 service endpoint

    The K8s service host in the Multus kubeconfig file is currently
    not wrapped with [brackets] in the case an IPv6 cluster service
    endpoint has been configured.

    This causes issues for Multus when it attemps to get (curl) for
    the address.

    This fix ensures the IPv6 address is properly formatted for use
    by Multus.

    Closes-Bug: 1836972

    Change-Id: I803edfb86a70d232d6015a7bb130da0756a56458
    Signed-off-by: Steven Webster <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/676034
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=b0b840356157b9c869bde765415081a366f6d21b
Submitter: Zuul
Branch: master

commit b0b840356157b9c869bde765415081a366f6d21b
Author: Steven Webster <email address hidden>
Date: Mon Aug 12 18:13:51 2019 -0500

    Multus support for IPv6 service endpoint

    The K8s service host in the Multus kubeconfig file is currently
    not wrapped with [brackets] in the case an IPv6 cluster service
    endpoint has been configured.

    This causes issues for Multus when it attemps to get (curl) for
    the address.

    This fix ensures the IPv6 address is properly formatted for use
    by Multus.

    Closes-Bug: 1836972

    Signed-off-by: Steven Webster <email address hidden>
    Change-Id: I7476908895d22eaa117a6eef85eff4c641a43d31

Revision history for this message
Ghada Khalil (gkhalil) wrote :

@Steve, please cherrypick to the r/stx.2.0 branch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (r/stx.2.0)

Fix proposed to branch: r/stx.2.0
Review: https://review.opendev.org/677467

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (r/stx.2.0)

Reviewed: https://review.opendev.org/677467
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=91ff75122f60cfbef7f81b442f6b9a56e5bbb94e
Submitter: Zuul
Branch: r/stx.2.0

commit 91ff75122f60cfbef7f81b442f6b9a56e5bbb94e
Author: Steven Webster <email address hidden>
Date: Mon Aug 12 18:13:51 2019 -0500

    Multus support for IPv6 service endpoint

    The K8s service host in the Multus kubeconfig file is currently
    not wrapped with [brackets] in the case an IPv6 cluster service
    endpoint has been configured.

    This causes issues for Multus when it attemps to get (curl) for
    the address.

    This fix ensures the IPv6 address is properly formatted for use
    by Multus.

    Closes-Bug: 1836972

    Signed-off-by: Steven Webster <email address hidden>
    Change-Id: I7476908895d22eaa117a6eef85eff4c641a43d31
    (cherry picked from commit b0b840356157b9c869bde765415081a366f6d21b)

Ghada Khalil (gkhalil)
tags: added: in-r-stx20
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.