Bug 1134502 - Fix result.get() call per celery deprecation warning
Summary: Fix result.get() call per celery deprecation warning
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Elyézer Rezende
URL:
Whiteboard:
Depends On:
Blocks: sat6-pulp-future
TreeView+ depends on / blocked
 
Reported: 2014-08-27 15:52 UTC by Corey Welton
Modified: 2020-10-05 14:52 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:55:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Pulp Redmine 504 Normal CLOSED - CURRENTRELEASE Fix result.get() call per celery deprecation warning Never

Description Corey Welton 2014-08-27 15:52:20 UTC
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:

Comment 1 Brian Bouterse 2014-08-27 19:31:40 UTC
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.

Comment 2 Chris Duryee 2014-09-30 13:52:22 UTC
build: 2.5.0-0.6.beta

Comment 3 Preethi Thomas 2014-10-09 15:09:42 UTC
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]: -------------- resource_manager@cloud-qe-15.idmqe.lab.eng.bos.redhat.com v3.1.11 (Cipater)
Oct 09 10:54:43 cloud-qe-15.idmqe.lab.eng.bos.redhat.com celery[28633]: ---- **** -----

Comment 4 Randy Barlow 2014-10-09 19:30:58 UTC
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?

Comment 5 Preethi Thomas 2014-10-09 20:03:22 UTC
Sure that will work.

Moving to verified

Comment 6 Brian Bouterse 2014-10-13 14:31:52 UTC
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

Comment 7 Chris Duryee 2014-12-23 20:52:14 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 8 Preethi Thomas 2015-01-29 16:28:39 UTC
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

Comment 9 Brian Bouterse 2015-02-28 22:17:13 UTC
Moved to https://pulp.plan.io/issues/504

Comment 10 RHEL Program Management 2015-03-04 11:24:10 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 12 Elyézer Rezende 2015-03-06 19:51:39 UTC
Verified on: Satellite-6.1.0-RHEL-7-20150303.0 capsule

Steps to verify:

[root@sat6-capsule ~]# grep "result.get()" /var/log/messages
[root@sat6-capsule ~]#

Comment 13 pulp-infra@redhat.com 2015-04-23 16:40:27 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 14 Bryan Kearney 2015-08-11 13:18:14 UTC
This bug is slated to be released with Satellite 6.1.

Comment 15 Bryan Kearney 2015-08-12 13:55:15 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


Note You need to log in before you can comment on or make changes to this bug.