<div dir="ltr"><div>Unfortunately Ive seen it do that with EPEL and more recently with Scientific Linux because it gets the erratas from the yum repo.<br></div>It seems like when it gets erratas from a yum repo (which is a fairly new feature) it updates the errata every time. So it re-sends the alert email every time the Advisory Release number gets updated which seems to happen every time it does a sync. Ive been meaning to put an RFE in to fix it but havent gotten around to it yet. essentialy it should be comparing the version number to the version number in spacewalk and also syncing the version number when it first inserts it but its not. instead what its doing is treating the version numbers as separate and not using them for comparison.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 12, 2013 at 1:04 PM, Matthew Ceroni <span dir="ltr"><<a href="mailto:matthewceroni@gmail.com" target="_blank">matthewceroni@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 dir="ltr">Already done. Still not resolving it. Also performed a VACUUM ANALYZE like you said. That seems to have decreased the load a little, to 50% but it is still sending out alert emails. I figured eventually it would stop but it appears to maybe be repeating the alerts. </div>
<div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 12:38 PM, Paul Robert Marino <span dir="ltr"><<a href="mailto:prmarino1@gmail.com" target="_blank">prmarino1@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 dir="ltr">well then stop spacewalk and restart postgresql<br><br></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 3:17 PM, Matthew Ceroni <span dir="ltr"><<a href="mailto:matthewceroni@gmail.com" target="_blank">matthewceroni@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 dir="ltr">Paul:<div><br></div><div>The errata import script itself isn't still running. That completed in a few hours. I think in total it imported 800 errata. Spot checking them it appears to have loaded correctly (in the correct channel, with the correct packages linked).</div>



<div><br></div><div>What is currently using all the CPU is postgres itself. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Apr 11, 2013 at 11:30 AM, Paul Robert Marino <span dir="ltr"><<a href="mailto:prmarino1@gmail.com" target="_blank">prmarino1@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>please look at the email string that started yesterday on this list entitled  "<font><span>API calls for new hosts"</span></font> for the discussion we just had about PostgreSQL maintenance.<br>




</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 2:21 PM, Paul Robert Marino <span dir="ltr"><<a href="mailto:prmarino1@gmail.com" target="_blank">prmarino1@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 dir="ltr"><div><div><div>never mind I know the script<br></div>its a very different approach to the script I wrote <a href="https://github.com/prmarino1/Extravehicular-Activity-Admin/blob/master/errata-tools/eva-direct-errata-sync.pl" target="_blank">https://github.com/prmarino1/Extravehicular-Activity-Admin/blob/master/errata-tools/eva-direct-errata-sync.pl</a><br>





</div>and there is an other script which started as somewhat of hybrid of the two which was written by<span name="Franky Van Liedekerke"> Franky Van Liedekerke.<br><br></span></div><span name="Franky Van Liedekerke">I unfortunately don't have much experience with it but you should check if its still running in the background because that could explain the behavior you are describing.<br>





<br><br></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 2:10 PM, Paul Robert Marino <span dir="ltr"><<a href="mailto:prmarino1@gmail.com" target="_blank">prmarino1@gmail.com</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ceroni<br>Lol<br>We just had this conversation<br>Vacuum and analyze the table<br><br>Also what's the process that's eating the CPU and what tool are you using for syncing your errata, and is it still running in the background?<br>





<span style="font-family:Prelude,Verdana,san-serif"><br><br></span><span><div style="font-family:arial,sans-serif;font-size:12px;color:#999999">-- Sent from my HP Pre3</div><br></span><span style="color:navy;font-family:Prelude,Verdana,san-serif"><hr style="width:75%" align="left">





<div><div>On Apr 11, 2013 1:46 PM, Matthew Ceroni <<a href="mailto:matthewceroni@gmail.com" target="_blank">matthewceroni@gmail.com</a>> wrote: <br><br></div></div></span><div><div>
<div dir="ltr">About a week ago I loaded all of the CentOS errata for version 5 and 6 (up until April 4), using the following tool<div><br></div><div><a href="http://cefs.steve-meier.de/" target="_blank">http://cefs.steve-meier.de/</a><br>






</div><div><br></div><div>The errata loaded, however ever since (so almost a week) the CPU usage on my Spacewalk server hovers around 75% and I slowly get Spacewalk Errata Alert indicating that one ore more systems you have registered are impacted by said errata. </div>






<div><br></div><div>Looking at the pg Activity log for Postgres I see the following statement that is continually running:</div><div><br></div><div><div>SELECT DISTINCT snv.server_id AS server_id, S.name, S.release, SA.name as arch,</div>






<div>         urn.user_id</div><div>       FROM (</div><div> --</div><div> select rhnChannelErrata.errata_id, rhnChannelErrata.channel_id, rhnServerChannel.server_id, rhnErrataPackage.package_id</div><div> from rhnChannelErrata, rhnErrataPackage, rhnChannelNewestPackage, rhnPackageEVR,</div>






<div>         rhnServerChannel, rhnServerPackage, rhnPackageUpgradeArchCompat</div><div> where rhnChannelErrata.errata_id = rhnErrataPackage.errata_id</div><div> --</div><div>         and rhnChannelErrata.channel_id = rhnChannelNewestPackage.channel_id</div>






<div>         and rhnErrataPackage.package_id = rhnChannelNewestPackage.package_id</div><div> --</div><div>         and rhnChannelErrata.channel_id = rhnServerChannel.channel_id</div><div>         and rhnChannelNewestPackage.name_id = rhnServerPackage.name_id</div>






<div>         and rhnServerChannel.server_id = rhnServerPackage.server_id</div><div> --</div><div>         and rhnChannelNewestPackage.evr_id = rhnPackageEVR.id</div><div> --</div><div>         and rhnServerPackage.package_arch_id = rhnPackageUpgradeArchCompat.package_arch_id</div>






<div>         and rhnPackageUpgradeArchCompat.pack</div><div><br></div><div><br></div><div>I have about 175 systems registered. Is there a way to optimize the DB so that the searching of systems + applicable errata runs quicker. Or a way to terminate the current (going on a week now) process that has been running since I loaded all the Errata? I tried restarting Spacewalk but that didn't resolve anything. </div>






</div></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br></div></div>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>