Project

Profile

Help

Issue #1255

e-mail notifier not working

Added by dkliban@redhat.com about 6 years ago. Updated over 2 years ago.

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

Description

Steps to reproduce:

1. Enable notification in /etc/pulp/server.conf
2. Create email notifier for all events

pulp-admin event listener email create --event-type '*' --subject yo --addresses dkliban@redhat.com

3. Sync a repo
4. Watch the logs blow up with something like this

Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp_rpm.plugins.importers.yum.sync:INFO: Sync complete.
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952) Exception from notifier of type [email]
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952) Traceback (most recent call last):
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/event/fire.py", line 76, in _do_fire
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     f(l['notifier_config'], event)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib/python2.7/site-packages/pulp/server/event/mail.py", line 35, in handle_event
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     body = json.dumps(event.data(), indent=2, default=json_util.default)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/json/__init__.py", line 250, in dumps
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     sort_keys=sort_keys, **kw).encode(obj)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/json/encoder.py", line 209, in encode
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     chunks = list(chunks)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/json/encoder.py", line 434, in _iterencode
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     for chunk in _iterencode_dict(o, _current_indent_level):
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/json/encoder.py", line 408, in _iterencode_dict
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     for chunk in chunks:
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/json/encoder.py", line 442, in _iterencode
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     o = _default(o)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)   File "/usr/lib64/python2.7/site-packages/bson/json_util.py", line 256, in default
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952)     raise TypeError("%%r is not JSON serializable" %% obj)
Sep 16 21:46:02 f22-pulp.os1.phx2.redhat.com pulp[13777]: pulp.server.managers.event.fire:ERROR: (13777-77952) TypeError: <TaskStatus: TaskStatus object> is not JSON serializable

Associated revisions

Revision ed8f654b View on GitHub
Added by Austin Macdonald about 6 years ago

serialize tasks for emails

closes #1255

Revision ed8f654b View on GitHub
Added by Austin Macdonald about 6 years ago

serialize tasks for emails

closes #1255

History

#1 Updated by mhrivnak about 6 years ago

  • Status changed from NEW to ASSIGNED
  • Platform Release set to 2.7.0
  • Triaged changed from No to Yes

#2 Updated by mhrivnak about 6 years ago

  • Related to Issue #1259: call reports that contain mongoengine documents are not serialized correctly added

#3 Updated by mhrivnak about 6 years ago

  • Related to deleted (Issue #1259: call reports that contain mongoengine documents are not serialized correctly)

#4 Updated by dkliban@redhat.com about 6 years ago

  • Assignee changed from dkliban@redhat.com to amacdona@redhat.com

#5 Updated by amacdona@redhat.com about 6 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by Anonymous about 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#7 Updated by dkliban@redhat.com about 6 years ago

  • Status changed from MODIFIED to 5

#8 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF