Project

Profile

Help

Issue #1089

closed

pulp status call returning ISE 500

Added by paji@redhat.com over 9 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

on a machine with pulp-server-2.7.0-0.3.beta.el7.noarch run the following command

curl -k "https://<fqdn>/pulp/api/v2/status/"

Expected:
Ok

Actual:
{"http_request_method": "GET", "exception": ["AttributeError: 'dict' object has no attribute 'to_dict'\n"], "error_message": "'dict' object has no attribute 'to_dict'", "_href": "/pulp/api/v2/status/", "http_status": 500, "traceback": [" File \"/usr/lib/python2.7/site-packages/django/core/handlers/base.py\", line 112, in get_response\n response = wrapped_callback(request, *callback_args, **callback_kwargs)\n", " File \"/usr/lib/python2.7/site-packages/django/views/generic/base.py\", line 69, in view\n return self.dispatch(request, *args, **kwargs)\n", " File \"/usr/lib/python2.7/site-packages/django/views/generic/base.py\", line 87, in dispatch\n return handler(request, *args, **kwargs)\n", " File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/views/status.py\", line 33, in get\n pulp_workers = [w.to_mongo().to_dict() for w in status_manager.get_workers()]\n"]}

Better trace:

Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: Unhandled Exception
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) 'dict' object has no attribute 'to_dict'
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) Traceback (most recent call last):
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) response = wrapped_callback(request, *callback_args, **callback_kwargs)
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) return self.dispatch(request, *args, **kwargs)
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) return handler(request, *args, **kwargs)
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/status.py", line 33, in get
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) pulp_workers = [w.to_mongo().to_dict() for w in status_manager.get_workers()]
Jun 24 18:00:29 katello-kant pulp: pulp.server.webservices.middleware.exception:ERROR: (6700-99680) AttributeError: 'dict' object has no attribute 'to_dict'

Other notes
This works

curl -k "https://<fqdn>/pulp/api/v2/status" vs curl -k "https://<fqdn>/pulp/api/v2/status/"

This trailing '/' may be a smell for other issues.


Related issues

Blocked by Pulp - Story #934: Update mongoengine dependency to 0.9CLOSED - CURRENTRELEASEbmbouter

Actions
Actions #1

Updated by jsherril@redhat.com over 9 years ago

Note that on 2.6, /status would result in a 404, not found, you HAD to use /status/

Actions #2

Updated by dkliban@redhat.com over 9 years ago

I was not able to reproduce on Fedora 22. I even downgraded Django to 1.6.11 and still could not reproduce. The bug was originally encountered on EL7.

Actions #3

Updated by dkliban@redhat.com over 9 years ago

The problem here is that the box has mongoengine 0.7.10 installed. When I upgraded it to pymongo 2.7.2 and mongoengine 0.9.0 everything works properly.

Actions #4

Updated by dkliban@redhat.com over 9 years ago

  • Blocked by Story #934: Update mongoengine dependency to 0.9 added
Actions #5

Updated by mhrivnak over 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com
  • Triaged changed from No to Yes
Actions #6

Updated by dkliban@redhat.com over 9 years ago

  • Status changed from ASSIGNED to 5
  • Platform Release set to 2.7.0
Actions #7

Updated by pthomas@redhat.com over 9 years ago

  • Status changed from 5 to 6

verified

[root@mgmt4 ~]# curl -k "https://localhost/pulp/api/v2/status/"
{"known_workers": [{"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:55Z", "_id": "reserved_resource_worker-3@mgmt4.rhq.lab.eng.bos.redhat.com"}, {"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:52Z", "_id": "reserved_resource_worker-1@mgmt4.rhq.lab.eng.bos.redhat.com"}, {"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:51Z", "_id": "reserved_resource_worker-0@mgmt4.rhq.lab.eng.bos.redhat.com"}, {"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:53Z", "_id": "reserved_resource_worker-2@mgmt4.rhq.lab.eng.bos.redhat.com"}, {"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:28Z", "_id": "scheduler@mgmt4.rhq.lab.eng.bos.redhat.com"}, {"_ns": "workers", "last_heartbeat": "2015-07-07T16:38:39Z", "_id": "resource_manager@mgmt4.rhq.lab.eng.bos.redhat.com"}], "messaging_connection": {"connected": true}, "database_connection": {"connected": true}, "api_version": "2", "versions": {"platform_version": "2.7.0b4"}}[root@mgmt4 ~]# 
[root@mgmt4 ~]# 
[root@mgmt4 ~]# 
[root@mgmt4 ~]# curl -k "https://localhost/pulp/api/v2/status"
[root@mgmt4 ~]# 
[root@mgmt4 ~]# 
[root@mgmt4 ~]# rpm -qa mongoengine
[root@mgmt4 ~]# 
[root@mgmt4 ~]# rpm -qa |grep mongoengine
python-mongoengine-0.9.0-1.el6.noarch
Actions #8

Updated by amacdona@redhat.com about 9 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #10

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added
Actions #11

Updated by bmbouter over 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF