Bug 1760790 - [simpleMacvlan] CNO will crashes when simpleMacvlan is configured without ipamConfig
Summary: [simpleMacvlan] CNO will crashes when simpleMacvlan is configured without ipa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.2.z
Assignee: Tomofumi Hayashi
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On: 1760787
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-11 10:42 UTC by Tomofumi Hayashi
Modified: 2019-11-19 13:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-19 13:49:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift cluster-network-operator pull 349 'None' 'closed' 'Bug 1760790: Fix dereference in macvlan IPAM validation function (backport 4.2)' 2019-11-21 16:17:52 UTC
Red Hat Product Errata RHBA-2019:3869 None None None 2019-11-19 13:49:14 UTC

Description Tomofumi Hayashi 2019-10-11 10:42:04 UTC
Description of problem:

With 
---
  additionalNetworks:
  - name: testmacvlan
    simpleMacvlanConfig:
      master: mvlanp0
    type: SimpleMacvlan

Version-Release number of selected component (if applicable):
4.3.0-0.ci-2019-10-09-053320

How reproducible:
always

Steps to Reproduce:
1. ' oc -n openshift-network-operator edit networks.operator.openshift.io/cluster'
2. Add above config in spec.
3.

Actual results:
[tohayash@tohayash-srv test191011a]$ oc -n openshift-network-operator logs network-operator-696ff88c47-sjllq
2019/10/11 10:28:48 Go Version: go1.10.8
2019/10/11 10:28:48 Go OS/Arch: linux/amd64
2019/10/11 10:28:48 operator-sdk Version: v0.4.1
2019/10/11 10:28:48 overriding kubernetes api to https://api-int.tohayash-test191011a.devcluster.openshift.com:6443
2019/10/11 10:28:50 Registering Components.
2019/10/11 10:28:50 Configuring Controllers
2019/10/11 10:28:50 Starting the Cmd.
2019/10/11 10:28:51 Reconciling configmap from  trusted-ca-bundle/openshift-kube-apiserver
2019/10/11 10:28:51 Reconciling Network.operator.openshift.io cluster
2019/10/11 10:28:51 Starting render phase
2019/10/11 10:28:51 Reconciling Network.config.openshift.io cluster
2019/10/11 10:28:51 Reconciling proxy 'cluster'
2019/10/11 10:28:51 httpProxy, httpsProxy and noProxy not defined for proxy 'cluster'; validation will be skipped
E1011 10:28:51.352077       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 628 [running]:
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.logPanic(0x14aaa40, 0x22f42b0)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xaa
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
panic(0x14aaa40, 0x22f42b0)
        /usr/local/go/src/runtime/panic.go:502 +0x229
github.com/openshift/cluster-network-operator/pkg/network.validateIPAMConfig(0x0, 0x23305b0, 0xc42046d3d0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/additional_networks.go:190 +0x4c
github.com/openshift/cluster-network-operator/pkg/network.validateSimpleMacvlanConfig(0xc42046d3d0, 0x23305b0, 0x1, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/additional_networks.go:212 +0xae
github.com/openshift/cluster-network-operator/pkg/network.ValidateAdditionalNetworks(0xc420038b98, 0x23305b0, 0x1, 0xc421950f10)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:326 +0x2d3
github.com/openshift/cluster-network-operator/pkg/network.RenderAdditionalNetworks(0xc420038b98, 0x167aa6f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:344 +0x7d
github.com/openshift/cluster-network-operator/pkg/network.Render(0xc420038b98, 0x0, 0x167aa6f, 0x9, 0x0, 0x0, 0xc420ae7dd0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:50 +0x3d6
github.com/openshift/cluster-network-operator/pkg/controller/operconfig.(*ReconcileOperConfig).Reconcile(0xc420083900, 0x0, 0x0, 0xc420469010, 0x7, 0x2311c40, 0x401945, 0xc4206aa600, 0x756ea11b4e4828)
        /go/src/github.com/openshift/cluster-network-operator/pkg/controller/operconfig/operconfig_controller.go:195 +0xb4f
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc4200d8b40, 0x1502020, 0xc4206aa600, 0x1502000)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216 +0x100
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc4200d8b40, 0xc420098400)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192 +0xb7
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc4200d8b40)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171 +0x2b
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm()
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x2a
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc420ad2ac0)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x54
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc420ad2ac0, 0x3b9aca00, 0x0, 0x1730101, 0xc42051a120)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xbd
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc420ad2ac0, 0x3b9aca00, 0xc42051a120)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x118fa5c]

goroutine 628 [running]:
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:55 +0x107
panic(0x14aaa40, 0x22f42b0)
        /usr/local/go/src/runtime/panic.go:502 +0x229
github.com/openshift/cluster-network-operator/pkg/network.validateIPAMConfig(0x0, 0x23305b0, 0xc42046d3d0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/additional_networks.go:190 +0x4c
github.com/openshift/cluster-network-operator/pkg/network.validateSimpleMacvlanConfig(0xc42046d3d0, 0x23305b0, 0x1, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/additional_networks.go:212 +0xae
github.com/openshift/cluster-network-operator/pkg/network.ValidateAdditionalNetworks(0xc420038b98, 0x23305b0, 0x1, 0xc421950f10)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:326 +0x2d3
github.com/openshift/cluster-network-operator/pkg/network.RenderAdditionalNetworks(0xc420038b98, 0x167aa6f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:344 +0x7d
github.com/openshift/cluster-network-operator/pkg/network.Render(0xc420038b98, 0x0, 0x167aa6f, 0x9, 0x0, 0x0, 0xc420ae7dd0, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-network-operator/pkg/network/render.go:50 +0x3d6
github.com/openshift/cluster-network-operator/pkg/controller/operconfig.(*ReconcileOperConfig).Reconcile(0xc420083900, 0x0, 0x0, 0xc420469010, 0x7, 0x2311c40, 0x401945, 0xc4206aa600, 0x756ea11b4e4828)
        /go/src/github.com/openshift/cluster-network-operator/pkg/controller/operconfig/operconfig_controller.go:195 +0xb4f
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc4200d8b40, 0x1502020, 0xc4206aa600, 0x1502000)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:216 +0x100
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc4200d8b40, 0xc420098400)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:192 +0xb7
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc4200d8b40)
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:171 +0x2b
github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).(github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.worker)-fm()
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x2a
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc420ad2ac0)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152 +0x54
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc420ad2ac0, 0x3b9aca00, 0x0, 0x1730101, 0xc42051a120)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153 +0xbd
github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc420ad2ac0, 0x3b9aca00, 0xc42051a120)
        /go/src/github.com/openshift/cluster-network-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
        /go/src/github.com/openshift/cluster-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b


Expected results:
Not crash and configure macvlan with default IPAM (i.e. DHCP)


Additional info:

Comment 4 Weibin Liang 2019-11-11 20:59:44 UTC
Tested and verified in 4.2.0-0.nightly-2019-11-11-110741

[root@dhcp-41-193 FILE]# oc logs network-operator-744f856785-jhbzl | grep panic

[root@dhcp-41-193 FILE]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2019-11-11-110741   True        False         16m     Cluster version is 4.2.0-0.nightly-2019-11-11-110741

Comment 6 errata-xmlrpc 2019-11-19 13:49:01 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/RHBA-2019:3869


Note You need to log in before you can comment on or make changes to this bug.