Issue #504
closed
Fix result.get() call per celery deprecation warning
Status:
CLOSED - CURRENTRELEASE
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 +
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 +
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]: ---- ** -----
+ This comment was cloned from Bugzilla #1134502 comment 3 +
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 +
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 +
- Status changed from 6 to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF