Project

General

Profile

Actions

Subtask #7789

closed

Feature #7008: pulpito: show pass/fail stats by machine

paddles: add table/class for nodes

Added by Zack Cerza about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

30%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Actions #1

Updated by Zack Cerza about 10 years ago

  • Status changed from New to In Progress
  • Assignee set to Zack Cerza
  • % Done changed from 0 to 30

I've come up with an almost-final schema for Nodes, and also an alembic migration. I am currently thinking about how to populate the table with our existing infrastructure.

This is paving the way for locking support in paddles as well.

Actions #2

Updated by Zack Cerza about 10 years ago

Making a lot of progress on this.

Database entries for job target nodes:

>>> r.name
u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana'
>>> r.jobs[0].job_id
u'139370'
>>> [node.name for node in r.jobs[0].target_nodes]
[u'plana62.front.sepia.ceph.com', u'plana67.front.sepia.ceph.com']

Which vps nodes are hosted on which mira nodes:

>>> vms=Node.query.filter(Node.is_vm.is_(True))
>>> pprint([vm.name for vm in vms.filter(Node.vm_host == Node.query.filter(Node.name == 'mira008.front.sepia.ceph.com').one())])
[u'vpm041.front.sepia.ceph.com',
 u'vpm042.front.sepia.ceph.com',
 u'vpm043.front.sepia.ceph.com',
 u'vpm044.front.sepia.ceph.com',
 u'vpm045.front.sepia.ceph.com',
 u'vpm046.front.sepia.ceph.com',
 u'vpm047.front.sepia.ceph.com',
 u'vpm048.front.sepia.ceph.com']

What jobs have had plana72 as a target?

>>> plana72 = Node.query.filter(Node.name == u'plana72.front.sepia.ceph.com').one()
>>> pprint(["%s %s" % (job.name, job.job_id) for job in Job.query.filter(Job.target_nodes.contains(plana72))])
[u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139482',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139458',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139402',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139327',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139429',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139337',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139333',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139341',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139470',
 u'teuthology-2014-03-20_02:30:02-rados-firefly-distro-basic-plana 139476',
 u'teuthology-2014-03-20_01:35:01-upgrade:dumpling-x:stress-split-firefly---basic-plana 139299',
 u'teuthology-2014-03-19_23:00:19-rgw-master-testing-basic-plana 139013',
 u'teuthology-2014-03-19_23:00:19-rgw-master-testing-basic-plana 139019',
 u'teuthology-2014-03-19_23:02:54-knfs-master-testing-basic-plana 139164']

(Note that this is on a local development db so the results aren't fully-populated)

Actions #3

Updated by Zack Cerza about 10 years ago

$ curl http://127.0.0.1:8080/nodes/job_stats/
{
plana86.front.sepia.ceph.com: {
unknown: 2,
pass: 9
},
<...>
}

$ curl http://127.0.0.1:8080/nodes/plana72.front.sepia.ceph.com/job_stats                                               
{
fail: 32,
unknown: 5,
running: 0,
dead: 0,
pass: 76
}

$ curl http://127.0.0.1:8080/nodes/plana72.front.sepia.ceph.com/         
{
is_vm: false,
locked: true,
locked_since: "2014-03-27 23:49:34",
locked_by: "scheduled_ubuntu@yw",
up: true,
name: "plana72.front.sepia.ceph.com",
mac_address: "78:2b:cb:5b:ff:78",
machine_type: "plana",
vm_host: null,
distro: "ubuntu",
arch: "x86_64",
ssh_pub_key: <snipped; very long>,
description: null
}

$ curl http://127.0.0.1:8080/nodes/?locked=true&machine_type=plana
[
{
is_vm: false,
locked: true,
locked_since: "2014-03-28 16:02:07",
locked_by: "scheduled_teuthology@teuthology",
up: true,
name: "plana53.front.sepia.ceph.com",
mac_address: "78:2b:cb:5e:d0:05",
machine_type: "plana",
vm_host: null,
distro: "ubuntu",
arch: "x86_64",
ssh_pub_key: <snipped; very long>,
description: null
},
<...>
]
Actions #5

Updated by Zack Cerza about 10 years ago

  • Status changed from In Progress to Resolved
  • Translation missing: en.field_remaining_hours set to 0.0
Actions

Also available in: Atom PDF