Issue #1891
closedDistribution of 'import_uploaded_unit' tasks is unbalanced on Pulp workers
Description
How reproducible:
100%
Builds:
pulp-server-2.7.1-1.el6.noarch
pulp-rpm-plugins-2.7.1-1.el6.noarch
Steps:
1. Prepare 10 uploaded rpms in /var/lib/pulp/uploads/
2. Run 10 'POST /pulp/api/v2/repositories/{REPO_ID}/actions/import_upload/' requests in threads (thread_number=5) by attached script
3. Check pulp task status from db client
Actual result:
There were 4 running workers. But all 'import_uploaded_unit' tasks were allocated to the same pulp worker - reserved_resource_worker-3.
[root@dhcp-136-194 tmp]# service pulp_workers status
celery init v10.0.
Using config script: /etc/default/pulp_workers
node reserved_resource_worker-0 (pid 845) is running...
node reserved_resource_worker-1 (pid 870) is running...
node reserved_resource_worker-2 (pid 899) is running...
node reserved_resource_worker-3 (pid 927) is running...
db.task_status.find({task_type:"pulp.server.managers.content.upload.import_uploaded_unit"}).count()
10
db.task_status.find({task_type:"pulp.server.managers.content.upload.import_uploaded_unit", worker_name:"reserved_resource_worker-3@dhcp-136-194***"}).count()
10
Expected result:
Distribution of 10 tasks should be balanced on 4 workers. Otherwise, tasks can not be run in parallel.
Files