Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

guestbook example is broken #520

Open
concaf opened this issue Dec 7, 2017 · 8 comments
Open

guestbook example is broken #520

concaf opened this issue Dec 7, 2017 · 8 comments

Comments

@concaf
Copy link
Collaborator

concaf commented Dec 7, 2017

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.1", GitCommit:"1dc5c66f5dd61da08412a74221ecc79208c2165b", GitTreeState:"clean", BuildDate:"2017-07-14T02:00:46Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-09-11T21:52:19Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

$ kedge create -f examples/guestbook/db.yaml 
persistentvolumeclaim "mongodb-data" created
service "mongodb" created
secret "mongodb-admin" created
secret "mongodb-user" created
configmap "mongodb-user" created
deployment "mongodb" created

$ kubectl get pods
NAME                       READY     STATUS    RESTARTS   AGE
mongodb-2659439370-6k4zr   0/1       Error     2          19s

$ kubectl logs mongodb-2659439370-6k4zr 
=> sourcing 10-check-env-vars.sh ...
=> sourcing 20-setup-wiredtiger-cache.sh ...
=> sourcing 30-set-config-file.sh ...
=> sourcing 35-setup-default-datadir.sh ...
ERROR: Couldn't write into /var/lib/mongodb/data
CAUSE: current user doesn't have permissions for writing to /var/lib/mongodb/data directory
DETAILS: current user id = 184, user groups: 997 0
stat: failed to get security context of '/var/lib/mongodb/data': No data available
DETAILS: directory permissions: drwxr-xr-x owned by 0:0, SELinux: ?
@cdrage
Copy link
Collaborator

cdrage commented Dec 7, 2017

Ummm. Confused what example you're using.

It says: kedge create -f examples/guestbook/db.yaml

Yet our folder-name is guestbook-demo ?

https://github.com/kedgeproject/kedge/tree/master/examples/guestbook-demo

@cdrage
Copy link
Collaborator

cdrage commented Dec 7, 2017

Nvm, I am getting the same error too:

▶ kubectl logs mongodb-2659439370-1vmwl
=> sourcing 10-check-env-vars.sh ...
=> sourcing 20-setup-wiredtiger-cache.sh ...
=> sourcing 30-set-config-file.sh ...
=> sourcing 35-setup-default-datadir.sh ...
ERROR: Couldn't write into /var/lib/mongodb/data
CAUSE: current user doesn't have permissions for writing to /var/lib/mongodb/data directory
DETAILS: current user id = 184, user groups: 997 0
stat: failed to get security context of '/var/lib/mongodb/data': No data available
DETAILS: directory permissions: drwxr-xr-x owned by 0:0, SELinux: ?

@cdrage
Copy link
Collaborator

cdrage commented Dec 7, 2017

@containscafeine

The old-example works (using the bitnami container). We'll have to trouble-shoot this and fix up the current container we use.

▶ ./kedge apply -f backend.yaml -f frontend.yaml -f db.yaml                                                                              
service "backend" configured
deployment "backend" configured
service "frontend" configured
deployment "frontend" configured
persistentvolumeclaim "mongodb-data" configured
service "mongodb" configured
secret "mongodb-admin" configured
secret "mongodb-user" configured
configmap "mongodb-user" configured
deployment "mongodb" configured

github.com/kedgeproject/kedge  master ✗                                                                                                                                                                                                                               18h55m ◒  ⍉
▶ kubectl get po -w
NAME                        READY     STATUS    RESTARTS   AGE
backend-2776521642-zf5kl    1/1       Running   0          2m
frontend-2675451940-nq6d6   1/1       Running   0          2m
mongodb-3720339234-1njhr    1/1       Running   0          34s

@kadel
Copy link
Member

kadel commented Dec 11, 2017

hmm, that is strange it works on OpenShift but not on Kubernetes (minishift/minikube). We should report it so it can be fixed. Those CentOS images are in really bad shape.

@cdrage
Copy link
Collaborator

cdrage commented Dec 12, 2017

Hey @kadel I was toying the idea of changing our Guestbook-go example to reflect the official one (using redis + redis clusters, go application rather than PHP, etc.). Have you already begun work on this, and if not, mind if I take up this issue?

@cdrage
Copy link
Collaborator

cdrage commented Dec 12, 2017

Nevermind, I see @surajnarwade has already began that. What's the status of your work @surajnarwade ? I could provide some help.

@surajnarwade
Copy link
Collaborator

@cdrage @kadel @containscafeine , I have started working on it.
so @cdrage , I am following this official example https://kubernetes.io/docs/tutorials/stateless-application/guestbook/

@cdrage
Copy link
Collaborator

cdrage commented Dec 14, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants