Project

Profile

Help

Issue #1120

closed

Error reporting is poor when distributor does not exist

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

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

Description

Trying to create a repository with the "nodes_http_distributor" raises the following exception

Exception adding distributor to repo [foo]; the repo will be deleted
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/cud.py", line 171, in create_and_conf

distributor_id)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/distributor.py", line 145, in add_dis
raise InvalidValue(['distributor_type_id'])
InvalidValue: Invalid properties: ['distributor_type_id']
Error received removing distributor [foo] from repo [foo]

More info:

Input :

Input
[E] RestClient.post "https://katello-kant.example.com/pulp/api/v2/repositories/", "{\"id\":\"foo\",\"display_name\":\"foo\",\"importer_type_id\":\"ostree_web_importer\",\"importer_config\":{\"feed\":\"http://doo.com\"},\"notes\":{\"_repo-type\":\"OSTREE\"},\"distributors\":[{\"distributor_type_id\":\"ostree_web_distributor\",\"distributor_config\":{\"relative_path\":\"/content\"},\"auto_publish\":false,\"distributor_id\":\"foo\"},{\"distributor_type_id\":\"nodes_http_distributor\",\"distributor_config\":{},\"auto_publish\":false,\"distributor_id\":\"foo_nodes\"}]}", "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"OAuth oauth_body_hash=\"2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D\", oauth_consumer_key=\"5PjrzSA7EMVHhbiW4xsro7N4shEQU25Y\", oauth_nonce=\"LgTqj5GoYEcgRCWO7i4zUxkCmOKmyXW6fbQOyOl3mmc\", oauth_signature=\"FY5MSkz7lsfwRtAucL76AZmOaRU%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1436312976\", oauth_version=\"1.0\"", "Content-Length"=>"433", "accept"=>"application/json", "content_type"=>"application/json", "pulp-user"=>"admin"

Output

pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) Exception adding distributor to repo [foo]; the repo will be deleted
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) Traceback (most recent call last):
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/cud.py", line 171, in create_and_configure_repo
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) distributor_id)
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/distributor.py", line 145, in add_distributor
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) raise InvalidValue(['distributor_type_id'])
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) InvalidValue: Invalid properties: ['distributor_type_id']
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) Error received removing distributor [foo] from repo [foo]
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) Traceback (most recent call last):
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/cud.py", line 226, in delete_repo
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) distributor_manager.remove_distributor(repo_id, repo_distributor['id'])
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/distributor.py", line 243, in remove_distributor
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) distributor_instance.distributor_removed(transfer_repo, call_config)
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp_ostree/plugins/distributors/web.py", line 126, in distributor_removed
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) shutil.rmtree(repo_dir, ignore_errors=True)
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib64/python2.7/shutil.py", line 228, in rmtree
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) if os.path.islink(path):
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) File "/usr/lib64/python2.7/posixpath.py", line 142, in islink
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) st = os.lstat(path)
pulp: pulp.server.managers.repo.cud:ERROR: (15189-51520) TypeError: coercing to Unicode: need string or buffer, NoneType found
pulp: pulp.server.webservices.middleware.exception:INFO: Pulp exception occurred: PulpExecutionException
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) Pulp exception occurred: PulpExecutionException
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) Traceback (most recent call last):
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) response = wrapped_callback(request, *callback_args, **callback_kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) return self.dispatch(request, *args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) return handler(request, *args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/decorators.py", line 237, in _auth_decorator
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/decorators.py", line 191, in _verify_auth
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) value = method(self, *args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/util.py", line 110, in wrapper
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) return func(*args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/repositories.py", line 187, in post
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) repo = repo_manager.create_and_configure_repo(*args, **kwargs)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/cud.py", line 175, in create_and_configure_repo
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) RepoManager.delete_repo(repo_id)
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/cud.py", line 261, in delete_repo
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) raise pe
pulp: pulp.server.webservices.middleware.exception:ERROR: (15189-51520) PulpExecutionException: Pulp exception occurred: PulpExecutionException

RPM Info -
python-pulp-repoauth-2.7.0-0.4.beta.el7.noarch
pulp-nodes-common-2.7.0-0.4.beta.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
pulp-docker-admin-extensions-1.0.2-0.2.beta.el7.noarch
pulp-puppet-plugins-2.7.0-0.4.beta.el7.noarch
python-pulp-python-common-1.0.1-0.1.beta.el7.noarch
pulp-ostree-plugins-1.0.0-0.2.alpha.el7.noarch
python-pulp-puppet-common-2.7.0-0.4.beta.el7.noarch
pulp-admin-client-2.7.0-0.4.beta.el7.noarch
pulp-rpm-admin-extensions-2.7.0-0.4.beta.el7.noarch
pulp-server-2.7.0-0.4.beta.el7.noarch
python-pulp-rpm-common-2.7.0-0.4.beta.el7.noarch
python-pulp-bindings-2.7.0-0.4.beta.el7.noarch
python-pulp-docker-common-1.0.2-0.2.beta.el7.noarch
pulp-ostree-admin-extensions-1.0.0-0.2.alpha.el7.noarch
pulp-puppet-admin-extensions-2.7.0-0.4.beta.el7.noarch
python-kombu-3.0.24-8.pulp.el7.noarch
rubygem-smart_proxy_pulp-1.0.1-2.el7.noarch
pulp-rpm-plugins-2.7.0-0.4.beta.el7.noarch
python-pulp-ostree-common-1.0.0-0.2.alpha.el7.noarch
pulp-docker-plugins-1.0.2-0.2.beta.el7.noarch
python-pulp-oid_validation-2.7.0-0.4.beta.el7.noarch
python-pulp-client-lib-2.7.0-0.4.beta.el7.noarch
pulp-nodes-admin-extensions-2.7.0-0.4.beta.el7.noarch
python-pulp-common-2.7.0-0.4.beta.el7.noarch
pulp-selinux-2.7.0-0.4.beta.el7.noarch
pulp-python-admin-extensions-1.0.1-0.1.beta.el7.noarch

Actions #1

Updated by paji@redhat.com over 8 years ago

  • Category set to 14
Actions #2

Updated by paji@redhat.com over 8 years ago

While the example input I gave uses ostree, I ve noticed this issue for yum type also

Actions #3

Updated by paji@redhat.com over 8 years ago

  • Status changed from NEW to CLOSED - NOTABUG

Sounds like I did not have pulp-nodes-parent rpm

Actions #4

Updated by paji@redhat.com over 8 years ago

  • Status changed from CLOSED - NOTABUG to NEW

Guess error handling could be improved. Reopening

Actions #5

Updated by ipanova@redhat.com over 8 years ago

Here actually two errors 1) repo creation failure 2) repo deletion failure
1st issue as you said is due to the fact that you did not have pulp-nodes-parent rpm installed.
2nd issue is fixed in this bug https://pulp.plan.io/issues/1096. So when this fix will be included in the next build, repo would be deleted without any issues in case something went wrong during repo creation.

Do you agree on closing this?

Actions #6

Updated by mhrivnak over 8 years ago

  • Subject changed from Http Nodes distributor not working to Error reporting is poor when distributor does not exist
  • Severity changed from 3. High to 2. Medium
  • Triaged changed from No to Yes
Actions #7

Updated by bmbouter almost 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #8

Updated by bmbouter almost 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #9

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #10

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