ceph / paddles

RESTful API to store (and report) on Ceph tests
14 stars 26 forks source link

ERROR:teuthology.report:Could not report results to #72

Closed lnsyyj closed 6 years ago

lnsyyj commented 7 years ago

The master branch appears

pecan log: (virtualenv)[paddles@teuthology paddles]$ pecan serve config.py Starting server in PID 23712 serving on http://192.168.0.32:8080 No handlers could be found for logger "sqlalchemy.engine.base.Engine" 2017-09-27 23:22:17,407 INFO [paddles.controllers.jobs] Creating job: yujiang/17 2017-09-27 23:22:27,200 INFO [paddles.controllers.jobs] Job yujiang/17 status changed from queued to running 2017-09-27 23:22:27,264 INFO [paddles.controllers.jobs] Job yujiang/17 status changed from running to waiting 2017-09-27 23:22:27,282 DEBUG [paddles.controllers.nodes] Locking 1 plana nodes for scheduled_teuthology@teuthology.novalocal 2017-09-27 23:22:27,284 INFO sqlalchemy.engine.base.OptionEngine BEGIN (implicit) 2017-09-27 23:22:27,285 INFO sqlalchemy.engine.base.OptionEngine SELECT nodes.id AS nodes_id, nodes.name AS nodes_name, nodes.description AS nodes_description, nodes.up AS nodes_up, nodes.machine_type AS nodes_machine_type, nodes.arch AS nodes_arch, nodes.is_vm AS nodes_is_vm, nodes.os_type AS nodes_os_type, nodes.os_version AS nodes_os_version, nodes.vm_host_id AS nodes_vm_host_id, nodes.locked AS nodes_locked, nodes.locked_by AS nodes_locked_by, nodes.locked_since AS nodes_locked_since, nodes.mac_address AS nodes_mac_address, nodes.ssh_pub_key AS nodes_ssh_pub_key FROM nodes WHERE nodes.machine_type = %(machine_type_1)s AND nodes.up IS true AND nodes.locked IS false LIMIT %(param_1)s 2017-09-27 23:22:27,285 INFO sqlalchemy.engine.base.OptionEngine {'machine_type_1': u'plana', 'param_1': 1} 2017-09-27 23:22:27,287 INFO sqlalchemy.engine.base.OptionEngine UPDATE nodes SET description=%(description)s, locked=%(locked)s, locked_by=%(locked_by)s, locked_since=%(locked_since)s WHERE nodes.id = %(nodes_id)s 2017-09-27 23:22:27,287 INFO sqlalchemy.engine.base.OptionEngine {'nodes_id': 2, 'locked_by': u'scheduled_teuthology@teuthology.novalocal', 'locked': True, 'description': u'/home/teuthworker/archive/yujiang/17', 'locked_since': datetime.datetime(2017, 9, 27, 15, 22, 27, 286230)} 2017-09-27 23:22:27,288 INFO sqlalchemy.engine.base.OptionEngine COMMIT 2017-09-27 23:22:27,292 INFO sqlalchemy.engine.base.OptionEngine BEGIN (implicit) 2017-09-27 23:22:27,293 INFO sqlalchemy.engine.base.OptionEngine SELECT nodes.id AS nodes_id, nodes.name AS nodes_name, nodes.description AS nodes_description, nodes.up AS nodes_up, nodes.machine_type AS nodes_machine_type, nodes.arch AS nodes_arch, nodes.is_vm AS nodes_is_vm, nodes.os_type AS nodes_os_type, nodes.os_version AS nodes_os_version, nodes.vm_host_id AS nodes_vm_host_id, nodes.locked AS nodes_locked, nodes.locked_by AS nodes_locked_by, nodes.locked_since AS nodes_locked_since, nodes.mac_address AS nodes_mac_address, nodes.ssh_pub_key AS nodes_ssh_pub_key FROM nodes WHERE nodes.id = %(param_1)s 2017-09-27 23:22:27,293 INFO sqlalchemy.engine.base.OptionEngine {'param_1': 2} 2017-09-27 23:22:27,294 INFO [paddles.controllers.nodes] Locked for scheduled_teuthology@teuthology.novalocal with description /home/teuthworker/archive/yujiang/17 2017-09-27 23:22:27,295 INFO sqlalchemy.engine.base.OptionEngine COMMIT 2017-09-27 23:22:27,337 INFO [paddles.controllers.jobs] Job yujiang/17 status changed from waiting to running 2017-09-27 23:22:27,658 INFO [paddles.controllers.nodes] Updating : {u'name': u'plana004.lenovo.com', u'up': True, u'os_version': u'7.3', u'user': u'ubuntu', u'os_type': u'centos', u'arch': u'x86_64', u'ssh_pub_key': u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCi9riDqGdUpCOd9pajdmVEWncYtvt5nB9FUECkodBjhGtqEjuc0aQrETptmCNlhcMK0/s6KPTgGe+JiD31wO4GZbW7hdOSDLf7DTRtwQzXplgqcMJH/FWY5NccG5ZLzsDuNaPJE36NNFFmL4/Dj/IfjWfLsAGOErfVQoZl1OgMnYf6SdUnHsH/ObFTlCJ4sJWWsGseBJyVT4OPA1P7CKaSnQsAzPGdgNLUOQmymIuA7+dHFGM3RzUqie10IMypcd4j+Msaa1aqQAHT21oh0NsjW+bDs950t+dCFOXRmKpFQCPeIXB5QlNAqxsrigDycV35bGWtudVOMeDiWY6REWsv'} 2017-09-27 23:22:37,015 DEBUG [paddles.controllers.nodes] Unlocking for scheduled_teuthology@teuthology.novalocal with description /home/teuthworker/archive/yujiang/17 2017-09-27 23:22:37,019 INFO [paddles.controllers.nodes] Unlocked for scheduled_teuthology@teuthology.novalocal with description /home/teuthworker/archive/yujiang/17 2017-09-27 23:22:37,113 INFO [paddles.stats] Could not find statsd configuration; disabling statsd. Error message was: 'module' object has no attribute 'Connection' Traceback (most recent call last): File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/middleware/recursive.py", line 56, in call return self.application(environ, start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 810, in call return super(Pecan, self).call(environ, start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 659, in call self.invoke_controller(controller, args, kwargs, state) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 559, in invoke_controller result = controller(*args, *kwargs) File "/home/paddles/github/paddles/paddles/controllers/jobs.py", line 53, in index_post self.job.update(request.json) File "/home/paddles/github/paddles/paddles/models/jobs.py", line 206, in update self.set_or_update(json_data) File "/home/paddles/github/paddles/paddles/models/jobs.py", line 148, in set_or_update counter = get_statsd_client().get_counter('jobs.status') File "/home/paddles/github/paddles/paddles/stats.py", line 24, in get_client statsd.Connection.set_defaults( AttributeError: 'module' object has no attribute 'Connection' 2017-09-27 23:24:26,240 INFO [paddles.stats] Could not find statsd configuration; disabling statsd. Error message was: 'module' object has no attribute 'Connection' Traceback (most recent call last): File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/middleware/recursive.py", line 56, in call return self.application(environ, start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 810, in call return super(Pecan, self).call(environ, start_response) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 659, in call self.invoke_controller(controller, args, kwargs, state) File "/home/paddles/github/paddles/virtualenv/lib/python2.7/site-packages/pecan/core.py", line 559, in invoke_controller result = controller(args, **kwargs) File "/home/paddles/github/paddles/paddles/controllers/jobs.py", line 53, in index_post self.job.update(request.json) File "/home/paddles/github/paddles/paddles/models/jobs.py", line 206, in update self.set_or_update(json_data) File "/home/paddles/github/paddles/paddles/models/jobs.py", line 148, in set_or_update counter = get_statsd_client().get_counter('jobs.status') File "/home/paddles/github/paddles/paddles/stats.py", line 24, in get_client statsd.Connection.set_defaults( AttributeError: 'module' object has no attribute 'Connection'

teuthology log: 2017-09-27T23:22:37.054 DEBUG:teuthology.report:Pushing job info to http://10.100.46.208:8080 2017-09-27T23:22:37.124 ERROR:teuthology.report:Could not report results to http://10.100.46.208:8080 Traceback (most recent call last): File "/home/teuthworker/src/teuthology_master/teuthology/report.py", line 466, in try_push_job_info push_job_info(run_name, job_id, job_info) File "/home/teuthworker/src/teuthology_master/teuthology/report.py", line 431, in push_job_info reporter.report_job(run_name, job_id, job_info) File "/home/teuthworker/src/teuthology_master/teuthology/report.py", line 320, in report_job response.raise_for_status() File "/home/teuthworker/src/teuthology_master/virtualenv/lib/python2.7/site-packages/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) HTTPError: 500 Server Error: Internal Server Error for url: http://10.100.46.208:8080/runs/yujiang/jobs/17/ 2017-09-27T23:22:37.125 INFO:teuthology.run:pass

alfredodeza commented 7 years ago

This is due to installing the package statsd, vs. the actual package needed called python-statsd

The python-statsd contains the .Connection attribute, while statsd doesn't.

Make sure you have the right one https://pypi.python.org/pypi/python-statsd

And not https://pypi.python.org/pypi/statsd

This is also defined in requirements.txt in this project. If you confirm that is the case, please close this issue.

lnsyyj commented 6 years ago

@alfredodeza thank you very much