Commit Graph

88 Commits

Author SHA1 Message Date
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
John Spray
d4ed33c2e0 qa: test mgr live configuration updates
Signed-off-by: John Spray <john.spray@redhat.com>
2018-04-23 07:29:47 -04:00
Stephan Müller
1b28705be5 mgr/dashboard: Add pool listing
Adds a new top level menu entry, called "Pool", which lists all pools
and contains a minimalistic detail view.

Signed-off-by: Stephan Müller <smueller@suse.com>
2018-04-20 16:13:34 +02:00
Volker Theile
ee5c9ad03c mgr/dashboard: Modify RGW proxy response of errors to display a detailed message in the error notification.
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-04-19 11:35:13 +02:00
Lenz Grimmer
5ce1f1d45e
Merge pull request #21360 from rjfd/wip-dashboard-rbd
mgr/dashboard: RBD management (backend)

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-04-16 17:54:36 +02:00
Ricardo Dias
fb41b943e0
qa/tasks/mgr/dashboard: rbd: use JSON schema validator
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
d575653738
mgr/dashboard: rbd: changed REST API prefix to /block/image
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
bbe12b0b8a
qa/tasks/mgr/dashboard: rbd: image copy test
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:50 +01:00
Ricardo Dias
67f3ac643a
qa/tasks/mgr/dashboard: rbd: snapshot clone test
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
3e0e883e4d
qa/tasks/mgr/dashboard: rbd: snapshot rollback test
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
386a7b53f2
mgr/dashboard: taskmanager: support exception handler
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
e11ae2355e
mgr/dashboard: rbd: major refactoring for using the Task decorator
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:49 +01:00
Ricardo Dias
9f027edfc9
qa/tasks/mgr/dashboard: rbd: snapshot edit tests
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
266ce4c8ee
qa/tasks/mgr/dashboard: rbd: use dashboard pool API for creating pools
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
1e854da1cc
qa/tasks/mgr/dashboard: rbd: image edit tests
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:48 +01:00
Ricardo Dias
3013d7ac8a
qa/tasks/mgr/dashboard: rbd: snapshot create/delete tests
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
8264e93458
qa/tasks/mgr/dashboard: rbd: image deletion test
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
fa7cac8158
mgr/dashboard: rbd: image disk usage implementation
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:47 +01:00
Ricardo Dias
3ab7612d97
qa/tasks/mgr/dashboard: rbd: asynchronous image create test
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:46 +01:00
Ricardo Dias
77c676ca6f
qa/tasks/mgr/dashboard: rbd: new image list format
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-04-13 15:58:46 +01:00
Mohamad Gebai
fb638381b2 mgr/iostat: add self-test
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2018-04-12 00:26:24 -04:00
Patrick Nawracay
e4a0b12abf mgr/dashboard: Implement RGW proxy
This implementation is basically a Rados Gateway reverse proxy.  It
additionally takes care of the authentication to the Rados Gateway, but to use
it you will have to be authenticated against the dashboards RESTful API.

The corresponding credentials can be configured using the following commands:

    dashboard set-rgw-api-secret-key <secret-key>

    dashboard set-rgw-api-access-key <access-key>

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-04-11 12:26:42 +02:00
Lenz Grimmer
34232b347b
Merge pull request #21022 from sebastian-philipp/dashboard_get_range
mgr/dashboard: Refactor multiple duplicates of `get_rate()`

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2018-04-11 12:22:00 +02:00
Lenz Grimmer
f0614a8d4e
Merge pull request #20920 from sebastian-philipp/dashboard_v2-erasure-code-profile
mgr/dashboard: Add ErasureCodeProfile controller

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2018-04-11 12:19:40 +02:00
Sage Weil
b0fe734c21 qa/tasks/mgr/test_failover: fix for id -> name rename in mgr metadata
This was changed by 428236de8b4155beffb5a4ffa8dd206230325a01

Signed-off-by: Sage Weil <sage@redhat.com>
2018-04-09 21:48:40 -05:00
Sebastian Wagner
012be1dc86 qa/tasks/mgr/dashboard: Imroved JSON validation
Refactored `OsdTest` to make use of `self.assertSchema()`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-04-09 16:42:33 +02:00
Stephan Müller
c60da7bb1f mgr/dashboard: Pool backend changes
As needed by the UI.

Signed-off-by: Stephan Müller <smueller@suse.com>
2018-04-06 17:41:28 +02:00
Sebastian Wagner
7b6a45cc8c mgr/dashboard: Add ErasureCodeProfile controller
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-04-06 17:40:03 +02:00
Ricardo Dias
5a861f5fb1
Merge pull request #20870 from rjfd/wip-dashboard-tasks
mgr/dashboard: asynchronous task support

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-03-28 08:27:51 +01:00
zouaiguo
4840e899f1 [mgr/dashboard] add image id to rbd info instead of block_name_prefix
when create images use data_pool parameter, such as:
rbd create -p pool1 -s 1G --data-pool pool2  image1

then get image info from mgr use request http://192.7.7.36:7000/rbd_pool_data/pool1
we got the response:
[{"parent_name": "", "parent_pool": 18446744073709551615, "name": "image1", "num_objs": 256, "block_name_prefix": "rbd_data.14.f561643c986", "obj_size": 4194304, "features": 189, "features_name": "fast-diff, layering, exclusive-lock, deep-flatten, object-map, data-pool", "order": 22, "size": 1073741824}]

notice:
since block_name_prefix is deprecated,
from block_name_prefix we can not get image id(the real id is ''f561643c9869')
we need add image id to rbd info instead block_name_prefix

Python 2.7.5 (default, Jun 17 2014, 18:11:42)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rados
>>> import rbd
>>> RADOS_NAME = 'client.admin'
>>> cluster_name="ceph"
>>> cluster_handle = rados.Rados(name=RADOS_NAME, clustername=cluster_name, conffile='')
>>> cluster_handle.connect()
>>> ioctx = cluster_handle.open_ioctx("pool1")
>>> image_inst = rbd.Image(ioctx, "image1")
>>> image_inst.stat()
{'parent_name': '', 'parent_pool': 18446744073709551615L, 'num_objs': 256L, 'block_name_prefix': u'rbd_data.14.f561643c986', 'obj_size': 4194304L, 'order': 22, 'size': 1073741824L}
>>> image_inst.id()
u'f561643c9869'

after fix:

[root@tfg36 site-packages]# curl http://192.7.7.36:7000/rbd_pool_data/pool1
[{"parent_name": "", "parent_pool": 18446744073709551615, "name": "image1", "num_objs": 256, "block_name_prefix": "rbd_data.14.f561643c986", "obj_size": 4194304, "features": 189, "id": "f561643c9869", "features_name": "fast-diff, layering, exclusive-lock, deep-flatten, object-map, data-pool", "order": 22, "size": 1073741824}]

Signed-off-by: zouaiguo <zou.aiguo@zte.com.cn>
2018-03-28 10:14:42 +08:00
Ricardo Dias
067b86eb42
mgr/dashboard: added tasks info to summary controller
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-27 14:08:47 +01:00
Lenz Grimmer
d5e54fda5c
Merge pull request #21024 from s0nea/wip-dashboard-return-features-list
mgr/dashboard: Convert the RBD feature names to a list of strings

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2018-03-27 11:45:54 +02:00