Conversation
|
Hello @bmbouter! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on May 14, 2018 at 16:57 Hours UTC |
This PR pairs with: pulp/pulp#3454
c5676d3
to
81d4c0d
Compare
This commit: * Removes rabbitMQ and Qpid installation * Installs, enables, and starts Redis * Updates the systemd assets to use the RQ worker syntax This PR should be tested against these core and pulp_file PRs: pulp/pulp#3454 pulp/pulp_file#72
This commit: * Removes rabbitMQ and Qpid installation * Installs, enables, and starts Redis * Updates the systemd assets to use the RQ worker syntax This PR modifies the environment for these changes: pulp/pulp#3454 pulp/pulp_file#72
The attribute name in the status API changed when RQ with Redis replaced AMQP brokers like RabbitMQ. This PR is meant to be used with these core and pulp_file PRs: pulp/pulp#3454 pulp/pulp_file#72
pulpcore/pulpcore/tasking/tasks.py
Outdated
| inner_task_id = str(uuid.uuid4()) | ||
| task_name = self.name | ||
| This method provides normal enqueue functionality, while also requesting necessary locks for | ||
| serialized urls No two tasks that claim the same resource can execute concurrently. It |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serialized urls No two tasks
missing a period
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty. fixed in next push.
pulpcore/pulpcore/tasking/worker.py
Outdated
|
|
||
| from pulpcore.app.models import Task | ||
|
|
||
| from .constants import TASKING_CONSTANTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolute imports are preferable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty fixed in next push.
|
|
||
| return super().perform_job(job, queue) | ||
|
|
||
| def handle_job_failure(self, job, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These next couple of methods need docstrings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in next push, ty.
The attribute name in the status API changed when RQ with Redis replaced AMQP brokers like RabbitMQ. This PR is meant to be used with these core and pulp_file PRs: pulp/pulp#3454 pulp/pulp_file#72
297feff
to
ae3e46d
Compare
|
This is definitely not an "issue", but an annoyance we may want to address at some point post-merge: When restarted, workers usually come up first and they immediately complain about the lack of a resource manager, just a fraction of a second before the resource manager comes online. It unnecessarily clutters the logs with warnings, but is otherwise innocuous. |
|
Restarting the workers during task execution causes the task to be forever in "waiting" state instead of "cancelled". Given how troublesome this is with Celery, I wouldn't consider it a blocker, but we should look into it later. Luckily, it does not block other work from going forwards, so it's still a net win... |
|
If you kill the redis server while a task is running, the workers go down (good!) and cancel the task (also good!). But if you continue to send tasks you will get no indication that anything is wrong, and these tasks will be lost forever because there is no queue or worker to put them on. When I did a Subsequent restarts did not resolve the situation. |
|
All in all, I don't see any hard blockers (except for maybe the last issue mentioned, where |
Codecov Report
@@ Coverage Diff @@
## 3.0-dev #3454 +/- ##
===========================================
+ Coverage 57.05% 57.33% +0.28%
===========================================
Files 59 59
Lines 2510 2426 -84
===========================================
- Hits 1432 1391 -41
+ Misses 1078 1035 -43
Continue to review full report at Codecov.
|
c9b10f8
to
aaa145c
Compare
.travis/script.sh
Outdated
| @@ -56,6 +58,9 @@ else | |||
| # upload coverage report to codecov | |||
| codecov | |||
| fi | |||
|
|
|||
| cat ~/resource_manager.log | |||
| cat ~/reserved_worker-1.log | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these lines are being called twice (although reserved_workers-1.log has changed to reserved_worker-1.log in your pr).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They were. It's fixed now ty.
|
@bmbouter please apply this patch https://paste.fedoraproject.org/paste/J8O7qyBpQOfAHlhI3QY0CA |
|
I applied the patch locally, and I added a breaking change release note. I am testing it now, and I will push all the rebased/patched/tested branches soon so Travis can try also. |
The attribute name in the status API changed when RQ with Redis replaced AMQP brokers like RabbitMQ. This PR is meant to be used with these core and pulp_file PRs: pulp/pulp#3454 pulp/pulp_file#72
This commit: * Removes rabbitMQ and Qpid installation * Installs, enables, and starts Redis * Updates the systemd assets to use the RQ worker syntax * Installs a specific commit of RQ to workaround a temporary RQ release issue This PR modifies the environment for these changes: pulp/pulp#3454 pulp/pulp_file#72
292f22b
to
2b8bfd8
Compare
This commit: * Removes rabbitMQ and Qpid installation * Installs, enables, and starts Redis * Updates the systemd assets to use the RQ worker syntax * Installs a specific commit of RQ to workaround a temporary RQ release issue This PR modifies the environment for these changes: pulp/pulp#3454 pulp/pulp_file#72
b91c0d4
to
8be2ae6
Compare
|
Here is the blog post draft that I plan to merge today or tomorrow ahead of the code being merged on May 15th. I will then use that link to replace the |
This PR does the following: * port travis to RQ * remove all celery references * install, systemd docs updates * create a custom RQ worker method for Pulp's needs * ports the status API to report on the Redis connection * port orphan cleanup tasks to work with RQ * port all pulp tasks to RQ * handle fatal error exception recording on tasks * replace apply_async_with_reservation to enqueue_with_reservation * task cancellation kills a running task correctly * work discovery, normal shutdown, and crash shutdown tested * adds settings for Redis connection to settings files * removes celery as a dependency * adds rq as a dependency There is a devel repo PR here to be used by `vagrant up` when testing this PR: pulp/devel#146 Required PR: pulp/pulp-smash#960 Required PR: pulp/pulp_file#72
The attribute name in the status API changed when RQ with Redis replaced AMQP brokers like RabbitMQ. This PR is meant to be used with these core and pulp_file PRs: pulp/pulp#3454 pulp/pulp_file#72
* Updates Travis to use RQ worker runners * Remove usage of Celery * port apply_async_with_reservation to enqueue_with_reservation Required PR: pulp/pulp-smash#960 Required PR: pulp/pulp#3454
This PR does the following:
There is a devel repo PR here to be used by
vagrant upwhen testingthis PR: pulp/devel#146
Required PR: pulp/pulp-smash#960
Required PR: pulp/pulp_file#72