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

Fix guestbook-demo to work on openshift #484

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

kadel
Copy link
Member

@kadel kadel commented Nov 23, 2017

related to #483

@kadel kadel mentioned this pull request Nov 23, 2017
@surajssd
Copy link
Member

$ kedge create -f .
W1124 08:13:22.956505   31972 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
service "backend" created
W1124 08:13:24.214638   31981 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
deployment "backend" created
W1124 08:13:24.464889   32000 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
persistentvolumeclaim "mongodb-data" created
W1124 08:13:24.986851   32008 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
service "mongodb" created
W1124 08:13:26.284518   32025 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
secret "mongodb-admin" created
W1124 08:13:26.723313   32047 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
secret "mongodb-user" created
W1124 08:13:28.016186   32057 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
configmap "mongodb-user" created
W1124 08:13:28.569403   32085 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
deployment "mongodb" created
W1124 08:13:29.125537   32095 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
service "frontend" created
W1124 08:13:31.518919   32121 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger
deployment "frontend" created

mongodb pod in CrashLoopBackOff

$ oc get pods
NAME                       READY     STATUS             RESTARTS   AGE
backend-1706566060-wqj6w   1/1       Running            2          8m
frontend-855248943-rdm2z   1/1       Running            0          8m
mongodb-1672985142-1cl96   0/1       CrashLoopBackOff   4          8m

Mongo logs

$ oc logs mongodb-1672985142-1cl96 -f
note: noprealloc may hurt performance in many applications
=>  Waiting for MongoDB daemon up
Fri Nov 24 02:47:47.375 [initandlisten] MongoDB starting : pid=14 port=27017 dbpath=/var/lib/mongodb/data 64-bit host=mongodb-1672985142-1cl96
Fri Nov 24 02:47:47.375 [initandlisten] db version v2.4.9
Fri Nov 24 02:47:47.375 [initandlisten] git version: nogitversion
Fri Nov 24 02:47:47.375 [initandlisten] build info: Linux c1bg.rdu2.centos.org 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 BOOST_LIB_VERSION=1_53
Fri Nov 24 02:47:47.375 [initandlisten] allocator: tcmalloc
Fri Nov 24 02:47:47.375 [initandlisten] options: { config: "/etc/mongod.conf", dbpath: "/var/lib/mongodb/data", nohttpinterface: "true", noprealloc: "true", oplogSize: 64, port: 27017, quiet: "true", setParameter: [ "textSearchEnabled=false" ], smallfiles: "true" }
Fri Nov 24 02:47:47.376 [initandlisten] exception in initAndListen std::exception: boost::filesystem::status: Permission denied: "/var/lib/mongodb/data/mongod.lock", terminating
Fri Nov 24 02:47:47.376 dbexit: 
Fri Nov 24 02:47:47.376 [initandlisten] shutdown: going to close listening sockets...
Fri Nov 24 02:47:47.376 [initandlisten] shutdown: going to flush diaglog...
Fri Nov 24 02:47:47.376 [initandlisten] shutdown: going to close sockets...
Fri Nov 24 02:47:47.385 [initandlisten] shutdown: waiting for fs preallocator...
Fri Nov 24 02:47:47.385 [initandlisten] shutdown: lock for final commit...
Fri Nov 24 02:47:47.385 [initandlisten] shutdown: final commit...
Fri Nov 24 02:47:47.385 [initandlisten] shutdown: closing all files...
Fri Nov 24 02:47:47.385 [initandlisten] closeAllFiles() finished
Fri Nov 24 02:47:47.385 dbexit: really exiting now
=>  Waiting for MongoDB daemon up
=>  Waiting for MongoDB daemon up
...
=>  Waiting for MongoDB daemon up
=> Giving up: MongoDB daemon is not up!

It failed as [initandlisten] exception in initAndListen std::exception: boost::filesystem::status: Permission denied: "/var/lib/mongodb/data/mongod.lock", terminating

@kadel
Copy link
Member Author

kadel commented Nov 27, 2017

W1124 08:13:22.956505 31972 factory_object_mapping.go:423] Failed to download OpenAPI (unknown), falling back to swagger

This is just warning showing because kubectl is used against OpenShift. It is just warning, no error.

MongDB error

It failed as [initandlisten] exception in initAndListen std::exception: boost::filesystem::status: Permission denied: "/var/lib/mongodb/data/mongod.lock", terminating

Looks more like an issue with PV on your cluster setup? Are you using Minishift?

@kadel kadel force-pushed the guestbook-example-on-openshift branch from 4baf19e to a3f0c54 Compare November 27, 2017 12:06
@kadel kadel force-pushed the guestbook-example-on-openshift branch from a3f0c54 to a5a85e0 Compare November 28, 2017 08:14
@surajssd
Copy link
Member

@kadel yes I tried that on minishift which has no addons enabled!

@kadel
Copy link
Member Author

kadel commented Nov 28, 2017

can't reproduce it :-(
I've tried that on two different minishift versions and on oc cluster up and it worked for me every time

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, magically works for me!

@cdrage
Copy link
Collaborator

cdrage commented Nov 28, 2017

LGTM.

(side-bit, we need to get these README's tutorials and such on the site. but that's for later #501 )

@cdrage cdrage merged commit 99e40dd into kedgeproject:master Nov 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants