Hide Forgot
Description of problem: The task.dequeued event handler contains a TaskDequeued class that is added as a task callback associated with repo sync. Because of this, the event handler module is loaded. When this happens, the Task event handler is loaded. Rather than using a flag to track loading status, the logic in the EventDispatcher.load() just looked to see if the handlers collection was empty. Since the TaskEvent handler was already loaded by import into the repo sync manager, the EventHandler.load() was tricked into thinking ALL the handlers ere loaded. The net result is that only the TaskEvent handler is loaded so when events are enabled, manager layer methods decorated to raise events - result in event handler related traceback. How reproducible: always Steps to Reproduce: 1. Edit /etc/pulp/pulp.conf and set [event] send_enabled=true 2. bounce httpd 3. create a repo Actual results: 2011-12-09 08:54:21,421 22031:-1321227408: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last): File "/home/jortel/git/pulp/src/pulp/server/webservices/controllers/decorators.py", line 48, in report_error return method(self, *args, **kwargs) File "/home/jortel/git/pulp/src/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator value = method(self, *args, **kwargs) File "/home/jortel/git/pulp/src/pulp/server/webservices/controllers/repositories.py", line 253, in POST content_types=repo_data.get('content_types', 'yum')) File "/home/jortel/git/pulp/src/pulp/server/api/repo.py", line 322, in create self.__created(r) File "/home/jortel/git/pulp/src/pulp/server/event/dispatcher.py", line 82, in call EventDispatcher.handler(entity, outbound=action) File "/home/jortel/git/pulp/src/pulp/server/event/dispatcher.py", line 235, in handler 'handler for entity "%s", not found' % entity Exception: handler for entity "repo", not found Expected results: Happiness. Additional info:
Changed logic in EventHandler.load() to use a flag instead.
build: 0.254-5
verified [root@pulp-f16 ~]# rpm -q pulp pulp-0.0.254-6.fc16.noarch [root@pulp-f16 ~]# [root@pulp-f16 ~]# cat /etc/pulp/pulp.conf |grep send_enabled send_enabled: true [root@pulp-f16 ~]# pulp-admin -u admin -p admin repo create --id=pulp --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/ --relativepath=pulp Successfully created repository [ pulp ]
Pulp v1.0 is released Closed Current Release.