Bug 1500664

Summary: [hwivBoNF] Panic error "index out of range" on node when adding ipv6 address to hostsubnet as egressIPs
Product: OpenShift Container Platform Reporter: Meng Bo <bmeng>
Component: NetworkingAssignee: Dan Winship <danw>
Status: CLOSED ERRATA QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact: Ben Bennett <bbennett>
Priority: medium    
Version: 3.7.0CC: aos-bugs
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:16:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Meng Bo 2017-10-11 09:55:52 UTC
Description of problem:
Panic error found in node log when adding ipv6 as egressIPs to hostsubnet.

Version-Release number of selected component (if applicable):
v3.7.0-0.147.0

How reproducible:
always

Steps to Reproduce:
1. Setup multi node env
2. Modify the hostsubnet of any node to add the egressIPs
# oc patch hostsubnet node1 -p '{"egressIPs":["fe80::54aa:c3ff:fe26:2e76"]}'
3. Check the node log on node

Actual results:
Panic error about `index out of range`.

Expected results:
Should not be able to add ipv6 address as egressIPs.

Additional info:
Node log:
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: E1011 15:31:55.150299     542 runtime.go:66] Observed a panic: "index out of range" (runtime error: index out of range)
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /usr/lib/golang/src/runtime/asm_amd64.s:514
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /usr/lib/golang/src/runtime/panic.go:489
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /usr/lib/golang/src/runtime/panic.go:28
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/node/egressip.go:88
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/node/egressip.go:130
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/node/egressip.go:100
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/common/eventqueue.go:110
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/delta_fifo.go:451
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/common/eventqueue.go:116
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/common/common.go:223
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/node/egressip.go:102
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/pkg/network/node/egressip.go:77
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:97
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:98
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:52
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /builddir/build/BUILD/atomic-openshift-git-0.f5af375/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:43
Oct 11 15:31:55 ose-node1.bmeng.local atomic-openshift-node[542]: /usr/lib/golang/src/runtime/asm_amd64.s:2197

Comment 1 Dan Winship 2017-10-11 16:59:35 UTC
https://github.com/openshift/origin/pull/16807

Comment 2 Meng Bo 2017-10-18 05:37:28 UTC
Tested on ocp build v3.7.0-0.158.0, ipv6 addr cannot be added as egressIP.

[root@ose-master ~]# oc patch hostsubnet ose-node2.bmeng.local -p '{"egressIPs":["fe80::9400:a1ff:feb5:93b7"]}'
The HostSubnet "ose-node2.bmeng.local" is invalid: egressIPs[0]: Invalid value: "fe80::9400:a1ff:feb5:93b7": must be an IPv4 address

Comment 5 errata-xmlrpc 2017-11-28 22:16:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188