Project

Profile

Help

Issue #703

closed

PulpCodedException(PLP0033) raised when adding distributor to a repo group

Added by amacdona@redhat.com about 9 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
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

Description of problem:

Version-Release number of selected component (if applicable):

Master

How reproducible:

Always

Steps to Reproduce:

$ curl -s -H Accept: application/json -H "WebFrameworkSwitch: webpy" -X POST -d '{"distributor_type_id": "group_export_distributor"}' -k -u admin:admin https://localhost/pulp/api/v2/repo_groups/test/distributors/ | python -mjson.tool

Actual results:

{
"_href": "/pulp/api/v2/repo_groups/test/distributors/",
"args": [],
"error": {
"code": "PLP0033",
"data": {},
"description": "Working Directory requested outside of asynchronous task. ",
"sub_errors": []
},
"error_message": "Working Directory requested outside of asynchronous task. ",
"exception": [
"PulpCodedException: Working Directory requested outside of asynchronous task. \n"
],
"http_request_method": "POST",
"http_status": 500,
"traceback": [
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/middleware/exception.py\", line 46, in call\n return self.app(environ, start_response)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/middleware/postponed.py\", line 55, in call\n return self.app(environ, start_response)\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 279, in wsgi\n result = self.handle_with_processors()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 18, in _handle_with_processors\n return process(self.processors)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in process\n return p(lambda: process(processors))\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 566, in processor\n return handler()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in <lambda>\n return p(lambda: process(processors))\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in process\n return p(lambda: process(processors))\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 581, in processor\n result = handler()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in <lambda>\n return p(lambda: process(processors))\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 17, in process\n return self.handle()\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 230, in handle\n return self._delegate(fn, self.fvars, args)\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 422, in _delegate\n return f()\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 430, in <lambda>\n f = lambda: self._delegate_sub_application(pat, what)\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 455, in _delegate_sub_application\n return app.handle_with_processors()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 18, in _handle_with_processors\n return process(self.processors)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in process\n return p(lambda: process(processors))\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 566, in processor\n return handler()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in <lambda>\n return p(lambda: process(processors))\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in process\n return p(lambda: process(processors))\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 581, in processor\n result = handler()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 15, in <lambda>\n return p(lambda: process(processors))\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/application.py\", line 17, in process\n return self.handle()\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 230, in handle\n return self._delegate(fn, self.fvars, args)\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 405, in _delegate\n return handle_class(f)\n",
" File \"/usr/lib/python2.7/site-packages/web/application.py\", line 396, in handle_class\n return tocall(*args)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/controllers/decorators.py\", line 241, in _auth_decorator\n return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/controllers/decorators.py\", line 195, in _verify_auth\n value = method(self, *args, **kwargs)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/webservices/controllers/repo_groups.py\", line 167, in POST\n distributor_config, distributor_id)\n",
" File \"/home/austin/devel/pulp/server/pulp/server/managers/repo/group/distributor.py\", line 148, in add_distributor\n transfer_group.working_dir = common_utils.get_working_directory()\n",
" File \"/home/austin/devel/pulp/server/pulp/server/managers/repo/_common.py\", line 199, in get_working_directory\n raise PulpCodedException(error_codes.PLP0033)\n"
]
}

Expected results:

Distributor added to repo group

Additional info:

Similar to https://bugzilla.redhat.com/show_bug.cgi?id=1192177

+ This bug was cloned from Bugzilla Bug #1193689 +

Actions #1

Updated by dkliban@redhat.com about 9 years ago

The following will successfully create repo-group distributor:

curl -s -H Accept: application/json -H "WebFrameworkSwitch: webpy" -X POST -d '{"distributor_type_id": "group_export_distributor","distributor_config": { "http": true, "https": false }}' -k -u admin:admin https://localhost/pulp/api/v2/repo_groups/test/distributors/ | python -mjson.tool

+ This comment was cloned from Bugzilla #1193689 comment 1 +

Actions #3

Updated by bmbouter about 9 years ago

  • Triaged changed from No to Yes
  • Severity set to Medium
Actions #4

Updated by bmbouter about 9 years ago

  • Severity changed from Medium to 2. Medium
Actions #5

Updated by dkliban@redhat.com almost 9 years ago

  • Platform Release set to 2.7.0
Actions #6

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by igulina@redhat.com almost 9 years ago

  • Status changed from 5 to 6
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch

>> curl -s -H Accept: application/json -H "WebFrameworkSwitch: webpy" -X POST -d '{"distributor_type_id": "group_export_distributor","distributor_config": { "http": true, "https": false }}' -k -u admin:admin https://localhost/pulp/api/v2/repo_groups/zoo_group/distributors/ | python -m json.tool
{
    "_href": "/pulp/api/v2/repo_groups/zoo_group/distributors/a6723afb-6e98-4515-8c92-0715e5e57c8d/",
    "_id": {
        "$oid": "55928327e512ed184258f310"
    },
    "_ns": "repo_group_distributors",
    "config": {
        "http": true,
        "https": false
    },
    "distributor_type_id": "group_export_distributor",
    "id": "a6723afb-6e98-4515-8c92-0715e5e57c8d",
    "last_publish": null,
    "repo_group_id": "zoo_group",
    "scratchpad": null
}
Actions #8

Updated by amacdona@redhat.com over 8 years ago

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

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #11

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

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

Also available in: Atom PDF