]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephadm: deploy node-exporter 33123/head
authorSage Weil <sage@redhat.com>
Fri, 14 Feb 2020 19:13:10 +0000 (13:13 -0600)
committerPatrick Seidensal <pseidensal@suse.com>
Wed, 19 Feb 2020 14:24:52 +0000 (15:24 +0100)
Signed-off-by: Sage Weil <sage@redhat.com>
qa/clusters/fixed-2.yaml
qa/tasks/cephadm.py

index ca92a8ff1881008331b6283ff0ff363fd72c921b..e4448bb2008834ec3e0480e0a9d83070be48b818 100644 (file)
@@ -1,6 +1,6 @@
 roles:
-- [mon.a, mon.c, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0]
-- [mon.b, mgr.x, osd.4, osd.5, osd.6, osd.7, client.1, prometheus.a]
+- [mon.a, mon.c, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0, node-exporter.a]
+- [mon.b, mgr.x, osd.4, osd.5, osd.6, osd.7, client.1, prometheus.a, node-exporter.b]
 openstack:
 - volumes: # attached to each instance
     count: 4
index a65cd13bde995abc1f851e518d94aced05c51188..3a48bdebf932a1c79469fac41673bc4c292e2bdb 100644 (file)
@@ -642,9 +642,9 @@ def ceph_mdss(ctx, config):
     yield
 
 @contextlib.contextmanager
-def ceph_prometheus(ctx, config):
+def ceph_monitoring(daemon_type, ctx, config):
     """
-    Deploy prometheus
+    Deploy prometheus, node-exporter, etc.
     """
     cluster_name = config['cluster']
     fsid = ctx.ceph[cluster_name].fsid
@@ -653,20 +653,20 @@ def ceph_prometheus(ctx, config):
     daemons = {}
     for remote, roles in ctx.cluster.remotes.items():
         for role in [r for r in roles
-                    if teuthology.is_type('prometheus', cluster_name)(r)]:
+                    if teuthology.is_type(daemon_type, cluster_name)(r)]:
             c_, _, id_ = teuthology.split_role(role)
             log.info('Adding %s on %s' % (role, remote.shortname))
             nodes.append(remote.shortname + '=' + id_)
             daemons[role] = (remote, id_)
     if nodes:
         _shell(ctx, cluster_name, remote, [
-            'ceph', 'orch', 'apply', 'prometheus',
+            'ceph', 'orch', 'apply', daemon_type,
             str(len(nodes))] + nodes
         )
     for role, i in daemons.items():
         remote, id_ = i
         ctx.daemons.register_daemon(
-            remote, 'prometheus', id_,
+            remote, daemon_type, id_,
             cluster=cluster_name,
             fsid=fsid,
             logger=log.getChild(role),
@@ -1039,7 +1039,8 @@ def task(ctx, config):
             lambda: ceph_osds(ctx=ctx, config=config),
             lambda: ceph_mdss(ctx=ctx, config=config),
             lambda: ceph_rgw(ctx=ctx, config=config),
-            lambda: ceph_prometheus(ctx=ctx, config=config),
+            lambda: ceph_monitoring('prometheus', ctx=ctx, config=config),
+            lambda: ceph_monitoring('node-exporter', ctx=ctx, config=config),
             lambda: ceph_clients(ctx=ctx, config=config),
             lambda: distribute_config_and_admin_keyring(ctx=ctx, config=config),
     ):