Bug 1272973 - Frontend and redis-master pods created from guestbook example keep in CrashLoopBackOff status
Frontend and redis-master pods created from guestbook example keep in CrashLo...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kubernetes (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Jan Chaloupka
atomic-bugs@redhat.com
: Extras
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-19 06:23 EDT by Wenjing Zheng
Modified: 2015-10-20 01:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-20 01:52:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2015-10-19 06:23:52 EDT
Description of problem:
When create resources with yaml files under https://github.com/kubernetes/kubernetes/tree/master/examples/guestbook, some created pods keeps in CrashLoopBackOff state:
[root@ip-172-18-14-241 ~]# kubectl get pods -n test2
NAME                 READY     STATUS             RESTARTS   AGE
frontend-0hjv5       0/1       CrashLoopBackOff   1          1h
frontend-8kywj       0/1       CrashLoopBackOff   1          1h
frontend-pr1yx       0/1       CrashLoopBackOff   1          1h
redis-master-lbc2g   0/1       CrashLoopBackOff   2          1h
redis-slave-4g96h    1/1       Running            0          1h
redis-slave-z4ma4    1/1       Running            0          1h
[root@ip-172-18-14-241 ~]# docker ps -a | grep redis-master-lbc2g
3aacd6389534        redis                                     "/entrypoint.sh redi   3 minutes ago       Exited (1) 3 minutes ago                            k8s_master.9da36dc9_redis-master-lbc2g_test2_1741dcf7-7632-11e5-82d3-0e8be43978a1_b1447a3e              
e3fa5795855b        redis                                     "/entrypoint.sh redi   9 minutes ago       Exited (1) 8 minutes ago                            k8s_master.9da36dc9_redis-master-lbc2g_test2_1741dcf7-7632-11e5-82d3-0e8be43978a1_a7537774              
63b033211b01        openshift/origin-pod:v1.0.6               "/pod"                 About an hour ago   Up About an hour                                    k8s_POD.9a2ff5e6_redis-master-lbc2g_test2_1741dcf7-7632-11e5-82d3-0e8be43978a1_2f29acdc                 
[root@ip-172-18-14-241 ~]# docker logs 3aacd6389534
chown: changing ownership of `.': Operation not permitted

Version-Release number of selected component (if applicable):
kubernetes v1.1.0-alpha.1-653-g86b4e77

How reproducible:
always

Steps to Reproduce:
1. Create a project
2. Create with guestbook example
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/redis-master-controller.yaml
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/redis-master-service.yaml
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/redis-slave-controller.yaml
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/redis-slave-service.yaml
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/frontend-controller.yaml
$kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/guestbook/frontend-service.yaml
3. Check the pods status
$kubectl get pods

Actual results:
[root@ip-172-18-14-241 ~]# kubectl get pods -n test2
NAME                 READY     STATUS             RESTARTS   AGE
frontend-0hjv5       0/1       CrashLoopBackOff   1          1h
frontend-8kywj       0/1       CrashLoopBackOff   1          1h
frontend-pr1yx       0/1       CrashLoopBackOff   1          1h
redis-master-lbc2g   0/1       CrashLoopBackOff   2          1h
redis-slave-4g96h    1/1       Running            0          1h
redis-slave-z4ma4    1/1       Running            0          1h


Expected results:
The pods should be running.

Additional info:
[root@ip-172-18-14-241 ~]# docker run -ti redis /bin/bash
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
root@1eb8a5f34dad:/data# ls
root@1eb8a5f34dad:/data# ls /
bin  boot  data  dev  entrypoint.sh  etc  home	lib  lib64  media  mnt	opt  proc  root  run  sbin  selinux  srv  sys  tmp  usr  var
root@1eb8a5f34dad:/data# cd /
root@1eb8a5f34dad:/# cat entrypoint.sh
#!/bin/bash
set -e

if [ "$1" = 'redis-server' ]; then
	chown -R redis .
	exec gosu redis "$@"
fi

exec "$@"
Comment 2 Guohua Ouyang 2015-10-19 08:23:30 EDT
It should not a 100% issue, it works on my RHEL7.1 at least.

[root@dell-per630-04 guestbook]# kubectl get pod
NAME                 READY     STATUS    RESTARTS   AGE
frontend-bovtt       1/1       Running   0          19m
frontend-g88b7       1/1       Running   0          19m
frontend-tb0kr       1/1       Running   0          19m
redis-master-jns1h   1/1       Running   0          13m
redis-slave-3hggp    1/1       Running   0          9m
redis-slave-pg0ul    1/1       Running   0          9m
[root@dell-per630-04 guestbook]# kubectl version 
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1.0-alpha.1-653-g86b4e77", GitCommit:"86b4e77", GitTreeState:"not a git tree"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1.0-alpha.1-653-g86b4e77", GitCommit:"86b4e77", GitTreeState:"not a git tree"}
Comment 3 Jan Chaloupka 2015-10-19 10:19:59 EDT
Hi Wenjing,

is it always reproducible? Does it happen with kubernetes-1.0.3-0.3.gitb9a88a7.el7 ?

Jan
Comment 4 Wenjing Zheng 2015-10-20 01:52:24 EDT
After I edit SecurityContextConstraints privileged to add "- system:authenticated", pod can be running. Close this defect as not-a-bug, thx for your attention!
[root@ip-172-18-6-100 ~]# kubectl version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1.0-alpha.1-653-g86b4e77", GitCommit:"86b4e77", GitTreeState:"not a git tree"}
[root@ip-172-18-6-100 ~]# oc get pods
NAME                 READY     STATUS    RESTARTS   AGE
frontend-guvpb       1/1       Running   0          30m
frontend-osyxt       1/1       Running   0          30m
frontend-pgpue       1/1       Running   0          30m
redis-master-tr0ji   1/1       Running   0          31m
redis-slave-bqepk    1/1       Running   0          30m
redis-slave-ixjha    1/1       Running   0          30m

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