Commit Graph

119 Commits

Author SHA1 Message Date
Ricardo Dias
47a50eeba5
Merge pull request #21881 from sebastian-philipp/dashboard-pool-patch
mgr/dashboard: Add Pool update endpoint 

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2018-08-01 10:00:10 +01:00
Ricardo Marques
71d952b1e2 mgr/dashboard: Add user management API
Fixes: https://tracker.ceph.com/issues/24446

Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-07-25 16:16:50 +01:00
Ricardo Marques
c4a1fe6b3b mgr/dashboard: Add asserError helper method
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-07-25 16:16:50 +01:00
Sebastian Wagner
0886de94b4 Check cluster health after each pool update
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-07-24 16:20:04 +02:00
Sebastian Wagner
70aa650014 Fixed qa tests:
* `s/_post/_task_post/g' for pools.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-07-24 16:20:04 +02:00
Stephan Müller
8506f02fe1 Small backend changes:
* Assert `pg_placement_num` has the same value as `pg_num`.
* Only set `application_metadata`, if not None.
* `osd pool set` only accepts strings.
* Sync `pgp_num` with `pg_num`.

Signed-off-by: Stephan Müller <smueller@suse.com>
2018-07-24 16:20:04 +02:00
Sebastian Wagner
1f58ca5e36 mgr/dashboard: Make use of Tasks in pool API
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-07-24 16:20:04 +02:00
Sebastian Wagner
80106bcbc0 mgr/dashboard: Add Pool update endpoint
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-07-24 16:20:04 +02:00
Stephan Müller
34638d58af qa/mgr/dashboard: compression_max_blob_size is a str
Signed-off-by: Stephan Müller <smueller@suse.com>
2018-07-24 16:20:04 +02:00
Stephan Müller
2b04699c61 mgr/dashboard: Pool API: app_metadata is now a str list
Signed-off-by: Stephan Müller <smueller@suse.com>
2018-07-24 16:20:04 +02:00
John Spray
d24e6cb32a mgr: generic self test command
Avoid need for each module to expose a self-test
command: they can just implement the method,
and then get it called via the selftest module.

As well as fewer LOC, this means that the self
test commands are not cluttering the interface
for end users, as they've invisible until
the selftest module is loaded.

Signed-off-by: John Spray <john.spray@redhat.com>
2018-07-20 13:09:19 -04:00
John Spray
f02316adb4 mgr: enable inter-module calls
This is being done by passing native CPython objects
back and forth.  It's safe because sub-interpreters in CPython
share memory allocation infrastructure and share the GIL.

With a view to PEP554, we limit inter-interpreter calls
to pickleable objects, so that this may be implemented
using byte-arrays in future.

This infrastructure should enable:
 - the dashboard to display the status of other modules, for
   example the set of progress indicators from `progress`
 - dashboard and restful to share an underlying long running
   job mechanism.

Signed-off-by: John Spray <john.spray@redhat.com>
2018-07-20 13:07:17 -04:00
John Spray
d7601c546f qa/mgr: delete devicehealth pool after selftest
This prevents tests getting hung up on the health
warnings from its very low pg count.

Signed-off-by: John Spray <john.spray@redhat.com>
2018-07-10 12:54:52 -04:00
Dan Mick
8145598f59 qa/tasks/mgr: add test_crash, call from test_module_selftest
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2018-06-29 14:51:45 -07:00
Tiago Melo
f21d0da5a3 mgr/dashboard: Add support for URI encode
Created a decorator and pipe to help encode special URI components in the
frontend.

Modified the backend request handler to decode all the string args.

fixes: http://tracker.ceph.com/issues/24621

Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-06-26 14:35:15 +01:00
Ricardo Dias
cc21d270c2
qa/tasks/mgr/dashboard: test_cluster_conf: restore original value of mon_allow_pool_delete
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-06-26 12:28:54 +01:00
Ricardo Dias
76f89edee0
mgr/dashboard: auth: return user permissions on login
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-06-26 12:28:54 +01:00
Ricardo Dias
01a1a1ff84
qa/tasks/mgr/dashboard: Adapted tests to work with new authentication system
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-06-26 12:28:54 +01:00
Sage Weil
dd6ad72b90 mgr/devicehealth: add self-test
Signed-off-by: Sage Weil <sage@redhat.com>
2018-06-23 17:01:55 -05:00
Volker Theile
a98bca6a2f mgr/dashboard: Replace RGW proxy controller
Fixes: http://tracker.ceph.com/issues/24436

To fully support the role based authentication/authorization system it is necessary to replace the RGW proxy controller by separate controllers for RGW user and bucket.

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-06-21 14:07:51 +02:00
Lenz Grimmer
ae4f4d315a
Merge pull request #22416 from votdev/get_rgw_api_user_via_rest
mgr/dashboard: Get user ID via RGW Admin Ops API

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2018-06-18 17:17:33 +02:00
Volker Theile
ed0750699e mgr/dashboard: Get user ID via RGW Admin Ops API.
The RGW API user id (set via 'ceph dashboard set-rgw-api-user-id <xxx>') is optional but the user ID is required internally for some situations. Because of that the user ID is requested via a RGW Admin Ops API call if it is not configured via CLI.

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-06-15 16:24:33 +02:00
Patrick Nawracay
d7de1fa067 mgr/dashboard/backend: Enable get/set of cluster-wide OSD settings
Add ability to list, set and unset cluster-wide OSD flags.

Flags can be listed and changed through the `/api/osd/flags` API
resource. By using a GET request, the list is retrieved. By using a PUT
request, the flags are updated (all at once). Flags not contained in the
data of the PUT are removed, additional once are added. Note that the
PUT requests require a JSON body with the data contained as value of the
'flags' key like so:

    {"flags": ["flag1", "flag2", ...]}

Fixes: http://tracker.ceph.com/issues/24056

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-06-15 10:26:29 +02:00
Lenz Grimmer
d785010a35
Merge pull request #22303 from ricardoasmarques/wip-help-menu
mgr/dashboard: Add help menu entry

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-14 15:56:39 +02:00
Tatjana Dehler
9ebf5eb650 mgr/dashboard: add config options to documentation page
This commit adds the config options stored by the MON database to the
configuration documentation page.
One can filter for these config options by setting the 'Source' filter
to 'mon' on the configuration documentation page.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2018-06-13 15:39:24 +02:00
Ricardo Marques
a97991d480 mgr/dashboard: Summary endpoint should return ceph version
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-06-12 11:46:45 +01:00
Ricardo Marques
091e01ca71 mgr/dashboard: Login failure should return HTTP 400
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-06-06 11:45:09 +01:00
Tiago Melo
2783b021ec mgr/dashboard: Add scrub methods to OSD controller and service
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-06-04 14:49:54 +01:00
Tiago Melo
7d842f20c0 mgr/dashboard: Remove unused data from summary controller
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-05-31 22:50:43 +01:00
Tiago Melo
f4d3b23555 mgr/dashboard: Refactor CephFS controller
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-05-31 22:50:43 +01:00
Ricardo Dias
8fb798fb93
mgr/dashboard: removed browsable api
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-05-24 10:42:24 +01:00
Wido den Hollander
394b10049e mgr/telemetry: Add Ceph Telemetry module to send reports back to project
This Manager Module will send statistics and version information from
a Ceph cluster back to telemetry.ceph.com if the user has opted-in on sending
this information.

Additionally a user can tell that the information is allowed to be made
public which then allows other users to see this information.

Signed-off-by: Wido den Hollander <wido@42on.com>
(cherry picked from commit 8f6137d162)
2018-05-14 23:34:25 +08:00
Volker Theile
83441af93c mgr/dashboard: Display useful info if RGW is not configured
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-05-14 12:58:29 +02:00
Kefu Chai
01c38041bc qa/tasks/mgr: fix test_pool.py
* per command desc of "osd pool set", "val" parameter should be a "string"
  not a number. so update the test_pool.py accordingly.
* also as a follow-up of 65925511bc, we need to update the test
  accordingly to reflect the change in the error's str representation.

Fixes: http://tracker.ceph.com/issues/24077
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-12 18:34:26 +08:00
Kefu Chai
3d772f2e4e
Merge pull request #21782 from wido/mgr-telegraf
mgr/telegraf: Telegraf module for Ceph Mgr

Reveiwed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-05-10 17:24:46 +08:00
Wido den Hollander
d15d510bab
mgr/telegraf: Telegraf module for Ceph Mgr
Telegraf is a agent for collecting and reporting metrics.

It has multiple inputs and can send data to various outputs like
for example InfluxDB or ElasticSearch.

This module works by using the socket_listener of Telegraf and can
send data over UDP, TCP and a local Unix Socket.

Signed-off-by: Wido den Hollander <wido@42on.com>
2018-05-09 16:00:15 +02:00
Sebastian Wagner
3a34bae0fe mgr/dashboard: Applied Exception handling to RBDs
* DashboardTestCase: Removed waiter-thread

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:46:47 +02:00
Sebastian Wagner
a49f39f60e mgr/dashboard: Change to Status Code 400 by default.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:39:51 +02:00
Sebastian Wagner
c08999a59c mgr/dashboard: Improved Exception handling in Tasks
* Set default status code to 400
* Added tests
* Fixed globbing in `test_task.py`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:36:44 +02:00
Sebastian Wagner
dc616c7d72 mgr/dashboard: Applied Exception Handling
* Minor changes to CephFS, OSD, Pool, RbdMirroring, Summary and RGW

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-05-08 16:30:54 +02:00
John Spray
b7a5da8bf0 qa: update dashboard tests for https://
Signed-off-by: John Spray <john.spray@redhat.com>
2018-04-27 09:58:47 -04:00
Sage Weil
510762f51e
Merge pull request #21061 from jan--f/jan-prometheus-file-sd-command
pybind/mgr/prometheus: add file_sd_config command

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
2018-04-26 12:39:51 -05:00
Jan Fajerski
2eb0b41407 pybind/mgr/prometheus: add file_sd_config command
This command returns a valid list of static targets pointing to the mgr
prometheus modules for a cluster. The output can be stored in a
file and the file be listed under the file_sd_config stanza in the
prometheus configuration.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2018-04-25 14:24:32 +02:00
Ricardo Marques
eeb87d3e42 mgr/dashboard: Add RBD default features REST API endpoint
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-04-24 16:50:37 +01:00
Ricardo Marques
838c9ce9e3 mgr/dashboard: RBD flatten
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-04-24 16:50:37 +01:00
John Spray
f959371a0a
Merge pull request #21607 from jcsp/wip-mgr-selftest-fixup
mgr: reconcile can_run checks and selftest

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2018-04-24 11:17:16 +01:00
Lenz Grimmer
83a740575a
Merge pull request #21602 from votdev/fix_rbd_form
mgr/dashboard: Adapt RBD form to new application_metadata type

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2018-04-24 11:33:33 +02:00
Kefu Chai
60e3a2404f qa/tasks/mgr: pass "--force" to "mgr module enable"
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-23 17:30:40 -04:00
Volker Theile
9a4d379705 mgr/dashboard: Fix bug in RBD form.
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-04-23 17:13:31 +02:00
John Spray
4b3f026d07 qa: update mgr test for MgrModule.OPTIONS
Signed-off-by: John Spray <john.spray@redhat.com>
2018-04-23 10:14:31 -04:00