Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr: dashboard GUI module #14946

Merged
merged 12 commits into from May 19, 2017
Merged

mgr: dashboard GUI module #14946

merged 12 commits into from May 19, 2017

Conversation

dmick
Copy link
Member

@dmick dmick commented May 4, 2017

Cleanup of work from @jcsp to add a ceph-mgr Python module to provide a web service that displays a simple GUI status, with one feature added to allow configuration of the listen addr and port for the server.

Configuration is done with ceph config-key put; the key names are

mgr.dashboard.server_addr
mgr.dashboard.server_port

@liewegas
Copy link
Member

liewegas commented May 4, 2017

Since you can have multiple mgr's on different hosts, I think we need to qualify these with the mgr id. Something like

mgr/x/dashboard/server_addr
mgr/x/dashboard/server_port
mgr/y/dashboard/server_addr
mgr/y/dashboard/server_port

(The dm-crypt stuff in config-key is currently using / instead of . as delimiter; we may as well stick with that?)

@liewegas liewegas changed the title Manager dashboard GUI module mgr: dashboard GUI module May 4, 2017
@dmick
Copy link
Member Author

dmick commented May 4, 2017

ok, will hack

@dmick dmick changed the title mgr: dashboard GUI module DNM: mgr: dashboard GUI module May 4, 2017
@dmick dmick force-pushed the wip-mgr-dashboard branch 5 times, most recently from ac10336 to 1217a29 Compare May 4, 2017 23:53
@dmick dmick changed the title DNM: mgr: dashboard GUI module mgr: dashboard GUI module May 5, 2017
@dmick
Copy link
Member Author

dmick commented May 6, 2017

Working on Yet Another Rebase

@dmick
Copy link
Member Author

dmick commented May 8, 2017

Removing some commits that had made it into master in the meantime made this merge more cleanly; this branch appears to pass dumb functional tests again.

@dmick dmick changed the title mgr: dashboard GUI module DNM: mgr: dashboard GUI module May 8, 2017
@dmick
Copy link
Member Author

dmick commented May 8, 2017

uhh....there are apparently a few more files than I wanted here. Edit: ah, no, all the JS and CSS. My bad.

@dmick dmick changed the title DNM: mgr: dashboard GUI module mgr: dashboard GUI module May 8, 2017
@jcsp
Copy link
Contributor

jcsp commented May 10, 2017

@dmick you could probably cull a lot of the AdminLTE guff, I think there are various optional bits (themes/plugins) in there where we only need the files for the ones we use.

@dmick
Copy link
Member Author

dmick commented May 16, 2017

rebased again

@liewegas
Copy link
Member

weird thing on this run: http://pulpito.ceph.com/sage-2017-05-17_15:24:19-rados-wip-sage-testing---basic-smithi/1189010

smithi055 and smithi067 are both trusty, but the cherrypy error only came up on one of them. not a package dependency for deb yet?

@liewegas
Copy link
Member

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

yeah, we can remove the unused AdminLTE bits later on. and move this into a separated package probably.

@@ -196,10 +196,10 @@ ceph_config_get(PyObject *self, PyObject *args)
std::string value;
bool found = global_handle->get_config(handle, what, &value);
if (found) {
derr << "Found" << dendl;
derr << "ceph_config_get " << what << " found: " << value.c_str() << dendl;
Copy link
Contributor

Choose a reason for hiding this comment

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

could you use __func__ instead here?

return PyString_FromString(value.c_str());
} else {
derr << "Not found" << dendl;
derr << "ceph_config_get " << what << " not found " << dendl;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

@tchaikov
Copy link
Contributor

@dmick please feel free to merge this when you feel appropriate.

John Spray and others added 11 commits May 18, 2017 22:09
...so that mgr modules can get at it.

Signed-off-by: John Spray <john.spray@redhat.com>
Signed-off-by: John Spray <john.spray@redhat.com>
A read only display of some of the cluster's state, plus
some cephfs/rbd/osd pages that demonstrate how to go
read state remotely from daemons.

Signed-off-by: John Spray <john.spray@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Otherwise, the incomplete ServeThread type causes problems
for others who include PyModules.h

Signed-off-by: Dan Mick <dan.mick@redhat.com>
…y '/'

dm_crypt config-key usage has established '/' as the separator; keep
that as a convention for now

Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
@dmick
Copy link
Member Author

dmick commented May 19, 2017

Dependencies added, very simple smoke test added to make check

@liewegas
Copy link
Member

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:45: run:  sleep 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:39: run:  [[ 4 < 30 ]]
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:47: run:  curl -s http://127.0.0.1:7001/toplevel_data
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:48: run:  jq .health.overall_status
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:48: run:  grep HEALTH_
parse error: Invalid numeric literal at line 1, column 10
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/mgr/mgr-dashboard-smoke.sh:48: run:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/ceph-helpers.sh:1692: main:  display_logs td/mgr-dashboard-smoke

@dmick
Copy link
Member Author

dmick commented May 19, 2017

Yep; internal failure in dashboard. Trying to reproduce now.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
@dmick
Copy link
Member Author

dmick commented May 19, 2017

It was intermittent; sometimes after the mgr said 'available', dashboard still wasn't quite ready. Added a second retry loop; running with ctest --output-on-failure --repeat-until-fail 100 -R mgr-dash looks solid now

@liewegas
Copy link
Member

excellent, thanks!

@liewegas liewegas merged commit de6c0bd into ceph:master May 19, 2017
@dmick
Copy link
Member Author

dmick commented May 19, 2017

Sorry @tchaikov, missed your comments about func; I wasn't ignoring you on purpose

@dmick dmick deleted the wip-mgr-dashboard branch May 19, 2017 22:36
@tchaikov
Copy link
Contributor

@dmick no worries, we can always improve it once we are at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants