Project

Profile

Help

Issue #504

closed

Fix result.get() call per celery deprecation warning

Added by cwelton@redhat.com over 9 years ago. Updated over 5 years ago.

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

Description

Description of problem:

Upon initializing pulp/celery/whatever, a strongly-worded deprecation error is thrown. Assuming pulp will eventually move to the next version of celery this needs to be fixed.

Version-Release number of selected component (if applicable):
pulp-katello-0.3-3.el7sat.noarch
pulp-nodes-child-2.4.0-0.30.beta.el7sat.noarch
pulp-nodes-common-2.4.0-0.30.beta.el7sat.noarch
pulp-nodes-parent-2.4.0-0.30.beta.el7sat.noarch
pulp-puppet-plugins-2.4.0-0.30.beta.el7sat.noarch
pulp-rpm-handlers-2.4.0-0.30.beta.el7sat.noarch
pulp-rpm-plugins-2.4.0-0.30.beta.el7sat.noarch
pulp-selinux-2.4.0-0.30.beta.el7sat.noarch
pulp-server-2.4.0-0.30.beta.el7sat.noarch
python-isodate-0.5.0-1.pulp.el7sat.noarch
python-kombu-3.0.15-12.pulp.el7sat.noarch
python-pulp-agent-lib-2.4.0-0.30.beta.el7sat.noarch
python-pulp-bindings-2.4.0-0.30.beta.el7sat.noarch
python-pulp-common-2.4.0-0.30.beta.el7sat.noarch
python-pulp-puppet-common-2.4.0-0.30.beta.el7sat.noarch
python-pulp-rpm-common-2.4.0-0.30.beta.el7sat.noarch
rubygem-smart_proxy_pulp-1.0.1-1.1.el7sat.noarch

How reproducible:

Steps to Reproduce:
1. Install satellite capsule and kick it off.
2. View logs

Actual results:
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING: /usr/lib/python2.7/site-packages/celery/result.py:45: RuntimeWarning: Never call result.get() within a task!
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING: See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING:
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING: In Celery 3.2 this will result in an exception being
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING: raised instead of just being a warning.
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING:
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING: warnings.warn(RuntimeWarning(E_WOULDBLOCK))
Aug 27 17:13:57 ibm-x3550m3-13 pulp: py.warnings:WARNING:

Expected results:

Additional info:

+ This bug was cloned from Bugzilla Bug #1134502 +

Actions #1

Updated by bmbouter over 9 years ago

Thanks for reporting this. There are some changes around the queue workflow planned for a future major release that will remove the code causing the warning. Fixing that is the most effective way to resolve this bug.

The next planned minor release is 2.5.0, so I'm setting it to 2.5.0 and ON_QA. QA should verify that these warning now longer show with the new functionality.

As a note for our developers, the feature referred to above is called the "black friday sale" queueing model also known as the "pre-queue" model. This design change will cause the resource manager to dispatch the celery tasks itself, which stops the need to synchronously request a task while running an existing task, which is the situation that causes this warning.

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

Actions #2

Updated by cduryee over 9 years ago

build: 2.5.0-0.6.beta

+ This comment was cloned from Bugzilla #1134502 comment 2 +

Actions #3

Updated by pthomas@redhat.com over 9 years ago

failing-qa
still seeing these warnings

[root@cloud-qe-15 ~]# rpm -qa pulp-server
pulp-server-2.5.0-0.7.beta.el7.noarch

Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: /usr/lib/python2.7/site-packages/celery/apps/worker.py:161: CDeprecationWarning:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: Starting from version 3.2 Celery will refuse to accept pickle by default.
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: The pickle serializer is a security concern as it may give attackers
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: the ability to execute any command. It's important to secure
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: your broker from unauthorized access when using pickle, so we think
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: that enabling pickle should require a deliberate action and not be
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: the default choice.
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: If you depend on pickle then you should set a setting to disable this
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: warning and to be sure that everything will continue working
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: when you upgrade to Celery 3.2::
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: You must only enable the serializers that you will actually use.
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING: warnings.warn(CDeprecationWarning(W_PICKLE_DEPRECATED))
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com pulp[28633]: py.warnings:WARNING:
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com celery[28633]: -------------- v3.1.11 (Cipater)
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com celery[28633]: ---- ** -----

+ This comment was cloned from Bugzilla #1134502 comment 3 +

Actions #4

Updated by rbarlow over 9 years ago

Hi Preethi,

The warning you noted is a different warning than this BZ is about. I think we can file that separately, but as for this BZ it should be OK to mark it VERIFIED. What do you think?

+ This comment was cloned from Bugzilla #1134502 comment 4 +

Actions #5

Updated by pthomas@redhat.com over 9 years ago

Sure that will work.

Moving to verified

+ This comment was cloned from Bugzilla #1134502 comment 5 +

Actions #6

Updated by bmbouter over 9 years ago

Regarding the actual warning of interest "Never call result.get() within a task!", that was fixed along with this BZ [0] which was not fixed until 2.5.1. I'm moving the target release to 2.5.1 to align with the bugfix of the issue.

[0]: https://bugzilla.redhat.com/show_bug.cgi?id=1124570

+ This comment was cloned from Bugzilla #1134502 comment 6 +

Actions #7

Updated by cduryee over 9 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1134502 comment 7 +

Actions #8

Updated by pthomas@redhat.com over 9 years ago

verified
[root@cloud-qe-4 ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 ~]#
No warnings

+ This comment was cloned from Bugzilla #1134502 comment 8 +

Actions #10

Updated by rbarlow over 9 years ago

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

Updated by bmbouter over 8 years ago

  • Severity set to 1. Low
Actions #13

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF