Bug 1258423

Summary: Met panic when add pvc to pod
Product: OKD Reporter: XiuJuan Wang <xiuwang>
Component: StorageAssignee: Mark Turansky <mturansk>
Status: CLOSED CURRENTRELEASE QA Contact: Liang Xia <lxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mnagy, rcarvalh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-11 17:23: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 XiuJuan Wang 2015-08-31 11:04:48 UTC
Description of problem:
Met panic when add pvc to pod.
I0831 10:41:45.624237     977 event.go:203] Event(api.ObjectReference{Kind:"ReplicationController", Namespace:"xiuwang12", Name:"mydb-4", UID:"dbd1727a-4fcc-11e5-b82f-22000ba111e4", APIVersion:"v1", ResourceVersion:"3509", FieldPath:""}): reason: 'successfulCreate' Created pod: mydb-4-fww44
E0831 10:41:46.317648     977 util.go:68] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/util/util.go:62
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/util/util.go:53
/usr/lib/golang/src/runtime/asm_amd64.s:401
/usr/lib/golang/src/runtime/panic.go:387
/usr/lib/golang/src/runtime/panic.go:42
/usr/lib/golang/src/runtime/sigpanic_unix.go:26
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/volume/secret/secret.go:59
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/volume/plugins.go:223
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/volumes.go:83
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/volumes.go:59
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/volume/persistent_claim/persistent_claim.go:82
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/volumes.go:91
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/volumes.go:111
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:1201
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:356
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:109
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:118
/go/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:153
/usr/lib/golang/src/runtime/asm_amd64.s:2232


Version-Release number of selected component (if applicable):
devenv-fedora-2246
openshift v1.0.5-89-gc9008aa
kubernetes v1.1.0-alpha.0-1605-g44c91b1


How reproducible:
always

Steps to Reproduce:
1.Prepare nfs server
2.Deploy an app.
$ oc new-app -i openshift/mongo -e MONGODB_USER=tester,MONGODB_PASSWORD=xxx,MONGODB_DATABASE=testdb,MONGODB_ADMIN_PASSWORD=yyy --name=mydb
3.Create pv and pvc
$ oc  get  pv 
NAME          LABELS    CAPACITY     ACCESSMODES   STATUS    CLAIM             REASON    AGE
xiuwangpv11   <none>    5368709120   RWO           Bound     xiuwang12/pvc11             22m
[fedora@ip-10-99-197-55 jenkins]$ oc  get  pvc
NAME      LABELS    STATUS    VOLUME        AGE
pvc11     map[]     Bound     xiuwangpv11   11m
4.Add volume to pod
oc volume dc/mydb --add --type=persistentVolumeClaim --mount-path=/opt1 --name=v1 --claim-name=pvc11
5.Check pods

Actual results:
Please see error logs in Description part.
$ oc  get  pods 
NAME            READY     STATUS                                                                                                                                      RESTARTS   AGE
mydb-3-2i5ft    1/1       Running                                                                                                                                     0          13m
mydb-4-deploy   1/1       Running                                                                                                                                     0          10m
mydb-4-fww44    0/1       Image: openshift/mysql-55-centos7@sha256:f18a51a536498dae3edf935a1e1defd9b49ec0a1cea228024089148ad4698676 is ready, container is creating   0          9m
nfs-server      1/1       Running                                                                                                                                     0          1h


Expected results:
Pods should deploy successfully.

Additional info:

Comment 1 Mark Turansky 2015-09-02 13:29:56 UTC
Will be fixed by https://github.com/openshift/origin/pull/4384

Comment 2 Rodolfo Carvalho 2015-09-07 09:00:37 UTC
Should be fixed now. Please verify.

Comment 3 XiuJuan Wang 2015-09-07 09:09:50 UTC
verified with devenv-fedora_2291
After add pv to dc/rc ,pods will be running with persistent volume.
Will change the bug status after bug move to on_qa

Comment 4 Mark Turansky 2015-09-11 17:23:24 UTC
Issue is verified fixed by QA.  Closing.