{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph-docker/pulls/comments/34697886","id":34697886,"diff_hunk":"@@ -462,34 +277,34 @@ elif [[ \"$CEPH_DAEMON\" = \"OSD_CEPH_DISK_ACTIVATE\" ]]; then\n   ceph --name=osd.${OSD_ID} --keyring=/var/lib/ceph/osd/${CLUSTER}-${OSD_ID}/keyring osd crush create-or-move -- ${OSD_ID} ${OSD_WEIGHT} root=default host=$(hostname)\n \n   exec /usr/bin/ceph-osd -f -d -i ${OSD_ID}\n-\n+}\n \n #######\n # MDS #\n #######\n \n-elif [[ \"$CEPH_DAEMON\" = \"MDS\" ]]; then\n-\n-  if [[ \"$KV_TYPE\" != \"none\" ]]; then\n-    create_ceph_config_from_kv\n-  fi\n-\n-  ceph_config_check\n+function start_mds {\n+  get_config\n+  check_config\n \n   # Check to see if we are a new MDS\n   if [ ! -e /var/lib/ceph/mds/ceph-${MDS_NAME}/keyring ]; then\n \n      mkdir -p /var/lib/ceph/mds/ceph-${MDS_NAME}\n \n-    if [ ! -e /var/lib/ceph/bootstrap-mds/ceph.keyring ]; then\n-      echo \"ERROR- /var/lib/ceph/bootstrap-mds/ceph.keyring must exist. You can extract it from your current monitor by running 'ceph auth get client.bootstrap-mds -o /var/lib/ceph/bootstrap-mds/ceph.keyring'\"\n+    if [ -e /etc/ceph/${CLUSTER}.client.admin.keyring ]; then\n+       KEYRING_OPT=\"--keyring /etc/ceph/${CLUSTER}.client.admin.keyring\"\n+    elif [ -e /var/lib/ceph/bootstrap-mds/ceph.keyring ]; then\n+       KEYRING_OPT=\"--keyring /var/lib/ceph/bootstrap-mds/ceph.keyring\"\n+    else\n+      echo \"ERROR- Failed to bootstrap MDS: could not find admin or bootstrap-mds keyring.  You can extract it from your current monitor by running 'ceph auth get client.bootstrap-mds -o /var/lib/ceph/bootstrap-mds/ceph.keyring'\"\n       exit 1\n     fi\n \n-    timeout 10 ceph --cluster ${CLUSTER} --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring health || exit 1\n+    timeout 10 ceph --cluster ${CLUSTER} --name client.bootstrap-mds $KEYRING_OPT || exit 1","path":"daemon/entrypoint.sh","position":421,"original_position":421,"commit_id":"e21c97cfb0f8dc4786e7fd694bddc9e95d04991e","original_commit_id":"e21c97cfb0f8dc4786e7fd694bddc9e95d04991e","user":{"login":"leseb","id":912735,"avatar_url":"https://avatars.githubusercontent.com/u/912735?v=3","gravatar_id":"","url":"https://api.github.com/users/leseb","html_url":"https://github.com/leseb","followers_url":"https://api.github.com/users/leseb/followers","following_url":"https://api.github.com/users/leseb/following{/other_user}","gists_url":"https://api.github.com/users/leseb/gists{/gist_id}","starred_url":"https://api.github.com/users/leseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leseb/subscriptions","organizations_url":"https://api.github.com/users/leseb/orgs","repos_url":"https://api.github.com/users/leseb/repos","events_url":"https://api.github.com/users/leseb/events{/privacy}","received_events_url":"https://api.github.com/users/leseb/received_events","type":"User","site_admin":false},"body":"You forgot the \"health\", the command is broken.","created_at":"2015-07-15T16:26:40Z","updated_at":"2015-07-15T16:26:40Z","html_url":"https://github.com/ceph/ceph-docker/pull/120#discussion_r34697886","pull_request_url":"https://api.github.com/repos/ceph/ceph-docker/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/comments/34697886"},"html":{"href":"https://github.com/ceph/ceph-docker/pull/120#discussion_r34697886"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph-docker/pulls/120","id":39762349,"html_url":"https://github.com/ceph/ceph-docker/pull/120","diff_url":"https://github.com/ceph/ceph-docker/pull/120.diff","patch_url":"https://github.com/ceph/ceph-docker/pull/120.patch","issue_url":"https://api.github.com/repos/ceph/ceph-docker/issues/120","number":120,"state":"open","locked":false,"title":"Refactor entrypoint script","user":{"login":"Ulexus","id":1946248,"avatar_url":"https://avatars.githubusercontent.com/u/1946248?v=3","gravatar_id":"","url":"https://api.github.com/users/Ulexus","html_url":"https://github.com/Ulexus","followers_url":"https://api.github.com/users/Ulexus/followers","following_url":"https://api.github.com/users/Ulexus/following{/other_user}","gists_url":"https://api.github.com/users/Ulexus/gists{/gist_id}","starred_url":"https://api.github.com/users/Ulexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ulexus/subscriptions","organizations_url":"https://api.github.com/users/Ulexus/orgs","repos_url":"https://api.github.com/users/Ulexus/repos","events_url":"https://api.github.com/users/Ulexus/events{/privacy}","received_events_url":"https://api.github.com/users/Ulexus/received_events","type":"User","site_admin":false},"body":"The entrypoint script has gotten a bit ragged; this is an attempt to refactor it and make it a bit more flexible, with less repetition.\r\n\r\nIn particular, I have broken out the \"static\" and \"kv\" backends, which both adds separation and leaves open the option of others providing their own configuration backends. More thought and work is probably in order.","created_at":"2015-07-12T13:55:51Z","updated_at":"2015-07-15T16:26:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c06f33874e06c8b5e973dbcd02341d99f22d7384","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph-docker/pulls/120/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph-docker/pulls/120/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph-docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph-docker/issues/120/comments","statuses_url":"https://api.github.com/repos/ceph/ceph-docker/statuses/e21c97cfb0f8dc4786e7fd694bddc9e95d04991e","head":{"label":"ceph:refactor_ep","ref":"refactor_ep","sha":"e21c97cfb0f8dc4786e7fd694bddc9e95d04991e","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":29601598,"name":"ceph-docker","full_name":"ceph/ceph-docker","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph-docker","description":"Docker files and images to run Ceph in containers","fork":false,"url":"https://api.github.com/repos/ceph/ceph-docker","forks_url":"https://api.github.com/repos/ceph/ceph-docker/forks","keys_url":"https://api.github.com/repos/ceph/ceph-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-docker/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-docker/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-docker/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-docker/events","assignees_url":"https://api.github.com/repos/ceph/ceph-docker/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-docker/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-docker/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-docker/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-docker/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-docker/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-docker/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-docker/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-docker/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-docker/merges","archive_url":"https://api.github.com/repos/ceph/ceph-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-docker/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-docker/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-docker/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-docker/releases{/id}","created_at":"2015-01-21T17:22:51Z","updated_at":"2015-07-15T16:25:59Z","pushed_at":"2015-07-15T16:03:19Z","git_url":"git://github.com/ceph/ceph-docker.git","ssh_url":"git@github.com:ceph/ceph-docker.git","clone_url":"https://github.com/ceph/ceph-docker.git","svn_url":"https://github.com/ceph/ceph-docker","homepage":null,"size":6848,"stargazers_count":82,"watchers_count":82,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":11,"forks":40,"open_issues":11,"watchers":82,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"ab4284f1ee6a38f38f4cdeb7d87fbccccbde8f11","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":29601598,"name":"ceph-docker","full_name":"ceph/ceph-docker","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph-docker","description":"Docker files and images to run Ceph in containers","fork":false,"url":"https://api.github.com/repos/ceph/ceph-docker","forks_url":"https://api.github.com/repos/ceph/ceph-docker/forks","keys_url":"https://api.github.com/repos/ceph/ceph-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-docker/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-docker/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-docker/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-docker/events","assignees_url":"https://api.github.com/repos/ceph/ceph-docker/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-docker/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-docker/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-docker/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-docker/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-docker/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-docker/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-docker/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-docker/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-docker/merges","archive_url":"https://api.github.com/repos/ceph/ceph-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-docker/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-docker/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-docker/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-docker/releases{/id}","created_at":"2015-01-21T17:22:51Z","updated_at":"2015-07-15T16:25:59Z","pushed_at":"2015-07-15T16:03:19Z","git_url":"git://github.com/ceph/ceph-docker.git","ssh_url":"git@github.com:ceph/ceph-docker.git","clone_url":"https://github.com/ceph/ceph-docker.git","svn_url":"https://github.com/ceph/ceph-docker","homepage":null,"size":6848,"stargazers_count":82,"watchers_count":82,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":11,"forks":40,"open_issues":11,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/120"},"html":{"href":"https://github.com/ceph/ceph-docker/pull/120"},"issue":{"href":"https://api.github.com/repos/ceph/ceph-docker/issues/120"},"comments":{"href":"https://api.github.com/repos/ceph/ceph-docker/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph-docker/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph-docker/statuses/e21c97cfb0f8dc4786e7fd694bddc9e95d04991e"}}}}