[Spacewalk-list] rhn-search and spacewalk 1.7 with postgress

Musayev, Ilya imusayev at webmd.net
Thu Jun 21 15:18:11 UTC 2012


If someone would like to address this issue on their current stable 1.7, below is the script that will help you do so, pay to attention to line wrapping.

Step by step way to patch and address 1.7 below:
----
#!/bin/bash
mkdir /tmp/rhn.jar-fix/
cp /usr/share/lib/rhn/rhn.jar /tmp/rhn.jar-fix/
cd  /tmp/rhn.jar-fix/
unzip rhn.jar 

echo 'index 5be404f..f0d135c 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
@@ -38,7 +38,7 @@ ORDER BY  E.update_date DESC, E.id
 
 <mode name="relevant_errata_by_type" class="com.redhat.rhn.frontend.dto.ErrataOverview">
   <query params="user_id, type">
-SELECT E.id, E.update_date
+SELECT E.id, E.update_date, E.synopsis as advisory_synopsis
   FROM rhnErrata E,
        (SELECT SNEC.errata_id, COUNT(SNEC.server_id) C
           FROM rhnServerNeededPackageCache SNEC
@@ -54,7 +54,7 @@ ORDER BY  E.update_date DESC, E.id
 
 <mode name="relevant_errata_by_type_with_cves" class="com.redhat.rhn.frontend.dto.SecurityErrataOverview">
   <query params="user_id, type">
-SELECT E.id, E.update_date
+SELECT E.id, E.update_date, E.synopsis as advisory_synopsis
   FROM rhnErrata E,
        (SELECT SNEC.errata_id, COUNT(SNEC.server_id) C
           FROM rhnServerNeededPackageCache SNEC
@@ -104,7 +104,7 @@ SELECT DISTINCT E.id, E.update_date, E.synopsis AS ADVISORY_SYNOPSIS
 
 <mode name="all_errata_by_type_with_cves" class="com.redhat.rhn.frontend.dto.SecurityErrataOverview">
   <query params="org_id, type">
-SELECT DISTINCT E.id, E.update_date
+SELECT DISTINCT E.id, E.update_date, E.synopsis as advisory_synopsis
   FROM  rhnErrata E, rhnChannelErrata CE, rhnChannel C,
         rhnChannelFamilyMembers CFM,
         rhnOrgChannelFamilyPermissions OCF' | patch com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
mv rhn.jar ../
zip -r rhn.jar .
mv /usr/share/lib/rhn/rhn.jar /usr/share/lib/rhn/rhn.jar.orig
cp rhn.jar /usr/share/lib/rhn/rhn.jar
rm -rf /tmp/rhn.jar-fix
----

Restart spacewalk..


-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Musayev, Ilya
Sent: Thursday, June 21, 2012 11:00 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] rhn-search and spacewalk 1.7 with postgress

FYI: Just applied the patch to stable 1.7 release and confirmed that it address the issue.

Thanks
ilya

-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Musayev, Ilya
Sent: Thursday, June 21, 2012 7:06 AM
To: spacewalk-list at redhat.com
Cc: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] rhn-search and spacewalk 1.7 with postgress

I found it here:

http://miroslav.suchy.cz/spacewalk/gitstat/commit-detail.php?commit=302d2b7cb936dda85588d81765d4a22c60e44411

Looks like SQL select statement was incomplete. Thanks for the fix.


Regards
Ilya


On Jun 21, 2012, at 6:54 AM, "Musayev, Ilya" <imusayev at webmd.net> wrote:

> Tom
> 
> Thank you for your response, I have trouble locating the fix for this issue. I would like to apply the fix for my environment without upgrading to nightly - as I'm satisfied with current functionality except for this small issue.
> 
> Would you please point me to a source code patch on version control software spacewalk uses (assume it's online and publicly available - I can't find it just yet). 
> 
> Thank you
> Ilya
> 
> Sent from my iPhone
> 
> On Jun 21, 2012, at 4:39 AM, "Tomas Lestach" <tlestach at redhat.com> wrote:
> 
>> On Wednesday 20 of June 2012 18:58:22 Musayev, Ilya wrote:
>> 
>>> I have a weird issue where if I goto Errata and do a search under 
>>> “All
>> Errata”, the filter by synopsis functions well, the moment I move of 
>> to Bugfix Errata or any other subsection – the filter is no longer functional.
>> 
>> Right.
>> I fixed the issue in nightly. The feature shall work in the next 
>> Spacewalk release.
>> 
>>> I don’t see any errors in any of the logs, I checked rhn-search 
>>> logs,
>> catalina.out and others. I also tried to do “cleanindex”. None of the 
>> logs report any issue.
>> 
>> This is not rhn-search releated.
>> 
>> 
>> Thanks for reporting,
>> Tomas
>> --
>> Tomas Lestach
>> RHN Satellite Engineering, Red Hat
>> 
>> 
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list