New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch status API to RQ #960
Conversation
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
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
|
This PR should be renamed and the scope expanded a bit, I think. The |
|
@dralley , please, can you file an smash issue providing more details, and outlining the requested changes? |
|
@kersommoura #965 |
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
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
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
Required PR: pulp/pulp-smash#960 Required PR: pulp/pulp_file#72
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
Required PR: pulp/pulp-smash#960 Required PR: pulp/pulp_file#72
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
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
|
As @dralley correctly points out, some changes to the config file and CLI are in order. The issue that was filed is helpful. In the mean time, this particular test case does need to be updated. I've refactored the test case targeted by this PR, making this PR out of date. See 7f8daac. Sorry about that. I made the refactor before seeing this. Thankfully, this PR can still be quite simple. Here's all that this PR needs to consist of: diff --git a/pulp_smash/tests/pulp3/pulpcore/api_v3/test_status.py b/pulp_smash/tests/pulp3/pulpcore/api_v3/test_status.py
index 9204e73..512336d 100644
--- a/pulp_smash/tests/pulp3/pulpcore/api_v3/test_status.py
+++ b/pulp_smash/tests/pulp3/pulpcore/api_v3/test_status.py
@@ -21,7 +21,7 @@ STATUS = {
'type': 'object',
'properties': {'connected': {'type': 'boolean'}},
},
- 'messaging_connection': {
+ 'redis_connection': {
'type': 'object',
'properties': {'connected': {'type': 'boolean'}},
},
@@ -92,7 +92,7 @@ class StatusTestCase(unittest.TestCase, utils.SmokeTest):
"""
validate(status, STATUS)
self.assertTrue(status['database_connection']['connected'])
- self.assertTrue(status['messaging_connection']['connected'])
+ self.assertTrue(status['redis_connection']['connected'])
self.assertEqual(status['missing_workers'], [])
self.assertNotEqual(status['online_workers'], [])
self.assertNotEqual(status['versions'], [])
|
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.
Deal with refactored test case.
|
No problem at all I can rebase. I'll do that soon. Thank you @Ichimonji10. I'm also considering relabeling it back to 'tasking_connection' or something like that which was a feedback point from another PR. The thinking is that RQ can support other backends (at some point for instance etcd is on their roadmap). I'll make that change with my rebase too. |
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
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
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
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
|
@Ichimonji10 I pushed a rebased change. What else needs to be done in this PR to make it ready for merging? |
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.
LGTM. I assume that the changes were tested against a modified Pulp application. When this is merged, make sure to merge the corresponding Pulp PRs at the same time, as this change breaks currently passing tests.
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 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
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
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
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
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
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
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
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
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
* 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
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