From: Sage Weil Date: Fri, 14 Feb 2020 19:13:10 +0000 (-0600) Subject: qa/tasks/cephadm: deploy node-exporter X-Git-Tag: v15.1.1~361^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33123%2Fhead;p=ceph.git qa/tasks/cephadm: deploy node-exporter Signed-off-by: Sage Weil --- diff --git a/qa/clusters/fixed-2.yaml b/qa/clusters/fixed-2.yaml index ca92a8ff188..e4448bb2008 100644 --- a/qa/clusters/fixed-2.yaml +++ b/qa/clusters/fixed-2.yaml @@ -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 diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index a65cd13bde9..3a48bdebf93 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -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), ):