<div dir="ltr"><div>You can stop pulp_resource_manager, pulp_workers, and qpidd. Then start qpidd, pulp_resource_manager, and pulp_workers. The workers will mark the tasks as canceled in the database when they start and qpid should drain the queue when it is restarted.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 10, 2017 at 6:33 PM, Dustin McNabb <span dir="ltr"><<a href="mailto:dustin.mcnabb@gmail.com" target="_blank">dustin.mcnabb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">Anyone ever encountered anything like this? I found 67K pulp tasks pending on one of my pulp servers today. I’m running pulp 2.10.3-1 (I know I know I’m fixing that) with mongoDB 2.6 on RHEL7 with a couple hundred yum repos and one python repo. We recently developed a config mgmt. state to manage the pulp repos on all our pulp servers, and that appears to have caused this issue by submitting a large number of pulp tasks in a short period and then trying again 30 minutes later. My question now, is how can I kill so many pulp tasks in a more efficient manner than the for loop I’m using?<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><u></u><font style="font-size:14px" face="Calibri"> </font><u></u></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri"># A whole lotta pulp tasks<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">[root@pulp-server :~]# pulp-admin tasks list |grep 'Task Id' |wc -l<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">67016<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><u></u><font style="font-size:14px" face="Calibri"> </font><u></u></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri"># A for loop to generate a list of the task IDs and cancel one at a time.<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">for n in `pulp-admin tasks list |grep 'Task Id' |awk '{print $NF}'`; do echo $n; pulp-admin tasks cancel --task-id $n; done<u></u><u></u></font></div><div style="margin:0in 0in 0.0001pt"><u></u><font style="font-size:14px" face="Calibri"> </font><u></u></div><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">Thanks<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></font></div><span class="HOEnZb"><font color="#888888"><div style="margin:0in 0in 0.0001pt"><font style="font-size:14px" face="Calibri">Dustin</font></div></font></span></div><br>______________________________<wbr>_________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-list</a><br></blockquote></div><br></div>