<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 8, 2016 at 1:49 PM, Bihan Zhang <span dir="ltr"><<a href="mailto:bizhang@redhat.com" target="_blank">bizhang@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The changes made for #2186 [0] was pulled from the 2.11.0 release yesterday, and we should talk about how to implement it for 2.12</div><div><br></div><div>From what I can see there are 2 ways to move forward with #2186<br></div><div><br></div><div><b>1.</b> We can fix the pulp worker db record cleanup so that pulp_celerybeat exits cleanly (aka put this back: [1]) and make new changes to clean up pulp_workers with a SIGTERM handler in a 2.11.z release.</div><div>We can then re-revert the commit and put the feature back in 2.12 with little effort.<br></div></div></blockquote><div><br></div><div>We would also need a way for pulp-manage-db to know if a record in the Worker collection was created by a version of pulp that does not do full cleanup. As described in a previous email, one way would be to add some kind of new field to the Worker model, such as the version of pulp the worker was running.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>The original reason #2186 was implemented using the db records was so we can support a clustered pulp installation.</div><div>But this approach would make migration to 2.12 more difficult, since users now have to upgrade to the 2.11.z release first before going to 2.12</div><div><br></div></div></blockquote><div><br></div><div>Perhaps the original intent was lost. This feature was motivated primarily by katello deployments (all of which are single-system), where users either forgot to stop pulp services or didn't know that was a requirement before running pulp-manage-db. The normal upgrade process for them handles it automatically, but when manual intervention is required, that's where we've seen people running pulp-manage-db while pulp services are running.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><b>2. </b>We can rethinking our approach to #2186 and perform the check against the process list</div><div>Upgrade-wise implementing it this way is a lot easier for users, since they can do a straight upgrade to 2.12 without going through an intermediary release.</div><div>The downside is that in clustered environments this would not catch every potential error. But #2186 is a best effort story, and if this is the best effort I am ok with it.</div></div></blockquote><div><br></div><div>This is easy and effective. I think we should do it, and augment/replace it in the future with the worker checking.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Regardless of which option we go with I think we should get the pulp worker db cleanup in. </div><div>We should also have a --ignore-running-worker flag [2] to prevent automated upgrade problems. </div><div><br></div><div><br></div><div>[0] <a href="https://pulp.plan.io/issues/2186" target="_blank">https://pulp.plan.io/issue<wbr>s/2186</a></div><div>[1] <a href="https://github.com/werwty/pulp/commit/4f43a85dd568f4a0b50ae9b07bbec7138861e92b#diff-80e8b96df1f5da9a551bb6ff18dea352" target="_blank">https://github.com/werwty/<wbr>pulp/commit/4f43a85dd568f4a0b5<wbr>0ae9b07bbec7138861e92b#diff-80<wbr>e8b96df1f5da9a551bb6ff18dea352</a></div><div>[2] <a href="https://pulp.plan.io/issues/2469" target="_blank">https://pulp.plan.io/issue<wbr>s/2469</a></div></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div></div>