Project

Profile

Help

Issue #1426

closed

Unable to bind consumers to rpm repositories after the mongoengine conversion

Added by jcline@redhat.com over 8 years ago. Updated about 5 years ago.

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

Description

Attempting to bind a consumer to a repository after creating a fix for #1399:

pulp.server.managers.repo.distributor:ERROR: (19957-73024) Exception raised from distributor [yum_distributor] generating consumer payload
pulp.server.managers.repo.distributor:ERROR: (19957-73024) Traceback (most recent call last): 
pulp.server.managers.repo.distributor:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/distributor.py", line 350, in create_bind_payload
pulp.server.managers.repo.distributor:ERROR: (19957-73024)     binding_config)
pulp.server.managers.repo.distributor:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/distributors/yum/distributor.py", line 210, in create_consumer_payload
pulp.server.managers.repo.distributor:ERROR: (19957-73024)     payload['server_name'] = pulp_server_config.config.get('server', 'server_name')
pulp.server.managers.repo.distributor:ERROR: (19957-73024) AttributeError: LazyConfigParser instance has no attribute 'config'
pulp.server.webservices.middleware.exception:INFO: Pulp exception occurred: PulpExecutionException
pulp.server.webservices.middleware.exception:ERROR: (19957-73024) Pulp exception occurred: PulpExecutionException
pulp.server.webservices.middleware.exception:ERROR: (19957-73024) Traceback (most recent call last):
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     response = wrapped_callback(request, *callback_args, **callback_kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     return self.dispatch(request, *args, **kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     return handler(request, *args, **kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 240, in _auth_decorator
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 194, in _verify_auth
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     value = method(self, *args, **kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/util.py", line 111, in wrapper
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     return func(*args, **kwargs)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/consumers.py", line 417, in post
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     consumer_id, repo_id, distributor_id, notify_agent, binding_config, options)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/controllers/consumer.py", line 39, in bind
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     task = agent_manager.bind(consumer_id, repo_id, distributor_id, agent_options)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/consumer/agent.py", line 95, in bind
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     agent_bindings = AgentManager._bindings([binding])
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/consumer/agent.py", line 384, in _bindings
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     binding['binding_config'])
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/distributor.py", line 350, in create_bind_payload
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     binding_config)
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)   File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/distributors/yum/distributor.py", line 210, in create_consumer_payload
pulp.server.webservices.middleware.exception:ERROR: (19957-73024)     payload['server_name'] = pulp_server_config.config.get('server', 'server_name')
pulp.server.webservices.middleware.exception:ERROR: (19957-73024) PulpExecutionException: Pulp exception occurred: PulpExecutionException

The offending line appears to be https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/distributors/yum/distributor.py#L7 combined with https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/distributors/yum/distributor.py#L210 - there are too many `.config`s happening.

Actions #1

Updated by jcline@redhat.com over 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jcline@redhat.com
Actions #2

Updated by jcline@redhat.com over 8 years ago

  • Status changed from ASSIGNED to POST
Actions #3

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes

Added by Jeremy Cline over 8 years ago

Revision ed86c476 | View on GitHub

Fix consumer binding to RPM repositories.

This addresses two separate issues. The first is the the Pulp server config was used incorrectly when creating the consumer bind payload. The second is that it was previously impossible to find a repository if it did not have a 'name', which is not a requirement for creating a repository in Pulp.

closes #1426

Actions #4

Updated by rbarlow about 8 years ago

  • Status changed from POST to 5
  • Platform Release set to 2.8.0
Actions #5

Updated by dkliban@redhat.com about 8 years ago

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

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF