[Spacewalk-list] Status of Solaris support
Pierre Casenove
pcasenove at gmail.com
Tue Jun 26 07:48:24 UTC 2012
Hello,
Please find attached two proposed patches for the 2 ISEs.
For the NVL keyword, I think the patch is correct, for the other
issue... well , I founf the solution using this thread
http://web.archiveorange.com/archive/v/zd19irdQ7ak6NBhBn9sF
Pierre
2012/6/26 Pierre Casenove <pcasenove at gmail.com>:
> Hello list,
> 1) I've applied the suggested patches, and nos, it works: the client
> is registered, and the package list is refreshed!*
>
> 2) i've played a bit with the WEBUI to track down ISE , to help
> improve pgsql support:
>
> When navigating to System --> Software -> Patches --> Install, I get one ISE:
> The following exception occurred while executing this request:
> GET /rhn/systems/details/packages/patches/PatchInstall.do
> Caused by: org.postgresql.util.PSQLException: ERROR: column "nvre"
> does not exist
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
> at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
> at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:138)
> ... 53 more
>
> I've configured PGSQl to log and here is what I get:
> LOG: execute <unnamed>: update PXTSessions set value=$1,
> web_user_id=$2, expires=$3 where id=$4
> DETAIL: parameters: $1 =
> 'BAcIMTIzNDU2NzgECAgIGQAEAAAAFzUvbmV0d29yay9zb2Z0d2FyZS9jaGFubmVscy9tYW5hZ2Uv
> cGF0Y2hzZXRzL2luZGV4LnB4dAIcAAAAbWFuYWdlX2NoYW5uZWxfbmF2aV9sb2NhdGlvbhcnL25l
> dHdvcmsvc3lzdGVtcy9kZXRhaWxzL2FjdGl2YXRpb24ucHh0AhsAAABzeXN0ZW1fZGV0YWlsX25h
> dmlfbG9jYXRpb24XOy9uZXR3b3JrL3NvZnR3YXJlL3BhY2thZ2VzL3RhcmdldF9zeXN0ZW1fbGlz
> dF9mb3JfcGF0Y2gucHh0AhwAAABwYWNrYWdlX2RldGFpbF9uYXZpX2xvY2F0aW9uFxovcmhuL3N5
> c3RlbXMvU3lzdGVtTGlzdC5kbwIVAAAAc2l0ZW5hdl9uYXZpX2xvY2F0aW9u
> ', $2 = '1', $3 = '1340695348', $4 = '5843'
> ERROR: column "nvre" does not exist at character 1601
> STATEMENT: SELECT pn.name AS NAME,
> pn.name || '-' || evr_t_as_vre_simple(full_list.evr) AS NVRE,
> pn.id || '|' || lookup_evr((full_list.evr).epoch,
> (full_list.evr).version, (full_list.evr).release) AS ID_COMBO,
> full_list.id,
> full_list.PATCH_TYPE
> FROM (
> SELECT p.name_id name_id, max(pe.evr) evr, p.id,
> pt.name AS PATCH_TYPE
> FROM rhnPackageEVR PE, rhnPackage P,
> rhnChannelPackage CP, rhnServerChannel SC,
> rhnSolarisPatch SSP, rhnSolarisPatchType PT
> WHERE sc.server_id = $1
> AND sc.channel_id = cp.channel_id
> AND cp.package_id = p.id
> AND ssp.package_id = p.id
> AND p.evr_id = pe.id
> AND pt.id = ssp.patch_type
> GROUP BY p.name_id, p.id, pt.name
> ) full_list,
> rhnPackageName pn
> WHERE full_list.name_id = pn.id
> AND EXISTS (SELECT 1
> FROM rhnPackageNEVRA PNEVRA,
> rhnSolarisPatchPackages SPP,
> rhnServerPackage SP
> WHERE SP.server_id = $2
> AND SPP.patch_id = full_list.id
> AND PNEVRA.id = SPP.package_nevra_id
> AND PNEVRA.name_id = SP.name_id
> AND ((PNEVRA.package_arch_id IS NULL AND
> SP.package_arch_id IS NULL) OR PNEVRA.package_arch_id =
> SP.package_arch_id)
> AND NOT EXISTS (SELECT 1
> FROM rhnSolarisPatchedPackage SPdP
> WHERE SPdP.server_id = $3
> AND SPdP.patch_id = full_list.id
> AND SPdP.package_nevra_id = PNEVRA.id))
> ORDER BY UPPER(NVRE)
> WARNING: nonstandard use of \\ in a string literal at character 99
> HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING: nonstandard use of \\ in a string literal at character 1247
> HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
>
>
>
> And I found a second ISE when going into a patch description page and
> then page "Patched Systems":
> The traceback:
> The following exception occurred while executing this request:
> GET /network/software/packages/system_list_for_patch.pxt?pid=9786
> HTTP/1.1 (from browser) /errors/500.pxt (from Apache)
> Error message:
> RHN::Exception: DBD::Pg::st execute failed: ERROR: current
> transaction is aborted, commands ignored until end of transaction
> block
>
> RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 121
> RHN::Exception::DB::throw
> RHN::DB::User /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/User.pm 1579
> RHN::DB::handle_error
> RHN::Access /usr/lib/perl5/vendor_perl/5.8.8/RHN/Access.pm 72
> RHN::DB::User::satellite_has_users
> PXT::ACL /usr/lib/perl5/vendor_perl/5.8.8/PXT/ACL.pm 93
> RHN::Access::need_first_user
> Sniglets::Navi::Node
> /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Navi/Node.pm 195
> PXT::ACL::eval_acl
> Sniglets::Navi /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Navi.pm 202
> Sniglets::Navi::Node::visible
> Sniglets::Navi /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Navi.pm 168
> Sniglets::Navi::render_nav
> Sniglets::Navi /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Navi.pm 128
> Sniglets::Navi::format_nav
> PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 141
> Sniglets::Navi::navi_nav
> PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72
> PXT::Parser::expand_tag
> PXT::ApacheHandler
> /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 489
> PXT::Parser::expand_tags
> PXT::Request /usr/lib/perl5/vendor_perl/5.8.8/PXT/Request.pm 561
> PXT::ApacheHandler::pxt_parse_data
> Grail::Frame /usr/lib/perl5/vendor_perl/5.8.8/Grail/Frame.pm 77
> PXT::Request::include
> PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 160
> Grail::Frame::canvas_template_handler
> PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72
> PXT::Parser::expand_tag
> PXT::ApacheHandler
> /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 489
> PXT::Parser::expand_tags
> PXT::ApacheHandler
> /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 103
> PXT::ApacheHandler::pxt_parse_data
> PXT::ApacheHandler
> /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 103 (eval)
> main -e 0 PXT::ApacheHandler::handler
> main -e 0 (eval)
>
>
> And the postgresql log:
> ERROR: function nvl(integer, integer) does not exist at character 68
> HINT: No function matches the given name and argument types. You
> might need to add explicit type casts.
> STATEMENT:
> SELECT
> DISTINCT S.id,
> S.name AS SERVER_NAME,
> NVL((SELECT 1
> FROM rhnServerFeaturesView SFV
> WHERE SFV.server_id = S.id
> AND SFV.label = 'ftr_system_grouping'), 0) AS
> SELECTABLE
> FROM rhnServer S,
> rhnUserServerPerms USP,
> rhnSolarisPatchedPackage SPP
> WHERE SPP.patch_id = $1
> AND S.id = SPP.server_id
> AND USP.user_id = $2
> AND USP.server_id = S.id
> ORDER BY S.name, S.id
>
> Which correspond to the classic NVL error, I'll try to get a patch soon.
>
>
> I hope this helps. Could you please give me some help on the first
> one, I don't know where to look at. I'm on Spacewalk 1.7 with PGSQL
> 8.4 on a RHEL 5 box.
>
> Pierre
-------------- next part --------------
From 43a5ab1a5cdd3e2cee8baec980419c62258a9175 Mon Sep 17 00:00:00 2001
From: root <root at tu-spa-d15.cst.cnes.fr>
Date: Tue, 26 Jun 2012 07:42:51 +0000
Subject: [PATCH] Correcting two ISE on postgresql:
---
.../rhn/RHN/DB/DataSource/xml/System_queries.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/System_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/System_queries.xml
index ebf799d..ef75f53 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/System_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/System_queries.xml
@@ -1270,7 +1270,7 @@ SELECT S.id,
SELECT
DISTINCT S.id,
S.name AS SERVER_NAME,
- NVL((SELECT 1
+ COALESCE((SELECT 1
FROM rhnServerFeaturesView SFV
WHERE SFV.server_id = S.id
AND SFV.label = 'ftr_system_grouping'), 0) AS SELECTABLE
--
1.7.4.1
-------------- next part --------------
From 43a5ab1a5cdd3e2cee8baec980419c62258a9175 Mon Sep 17 00:00:00 2001
From: root <root at tu-spa-d15.cst.cnes.fr>
Date: Tue, 26 Jun 2012 07:42:51 +0000
Subject: [PATCH] Correcting two ISE on postgresql:
NVL keyword
NVRE not found
---
.../common/db/datasource/xml/Package_queries.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
index 74c779d..4da2f65 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
@@ -1007,7 +1007,7 @@ SELECT pn.name AS NAME,
WHERE SPdP.server_id = :sid
AND SPdP.patch_id = full_list.id
AND SPdP.package_nevra_id = PNEVRA.id))
-ORDER BY UPPER(NVRE)
+ORDER BY UPPER(evr_t_as_vre_simple(full_list.evr))
</query>
<elaborator params="sid" multiple="t">
SELECT DISTINCT PN.name AS NAME,
1.7.4.1
More information about the Spacewalk-list
mailing list