[satellite 6] satellite-maintain content prepare failed on "Only one migration plan can run or be reset at a time"
Environment
Satellite 6
Issue
When migrating content to pulp3, satellite-maintain content prepare failed once with an unexpected error such as insufficient disk space. Re-run it failed again on "Only one migration plan can run or be reset at a time".
Resolution
This is a known bug This content is not included.BZ#2001410 that has been fixed in the Red Hat Satellite 6.9.8 release.
For more KB articles/solutions related to Red Hat Satellite 6.x Pulp 2.0 to Pulp 3.0 Migration Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Pulp 2.0 to Pulp 3.0 Migration Issues
Root Cause
- For more details please refer to This content is not included.BZ#2001410.
Diagnostic Steps
When hitting the error "Only one migration plan can run or be reset at a time", there are two things to check:
- Check if there is any zombie worker:
PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager shell <<EOF
from pulpcore.app.models import ReservedResource, Worker
worker_to_res = {}
for rr in ReservedResource.objects.all():
worker_to_res[rr.worker_id] = rr.pulp_id
workers = [w.pulp_id for w in Worker.objects.online_workers()]
for rwork in worker_to_res:
if rwork not in workers:
print(f'Worker {rwork} owns ReservedResource {worker_to_res[rwork]} and is not in online_workers!!')
EOF
- Check if there is any waiting task in pulp3 db:
su - postgres
psql pulpcore
select pulp_id, name, state, worker_id from core_task where state = 'waiting' and worker_id is not null;
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.