Hi,

Thanks for the info, but we were not even able to remove/unlink the package 
from the channel. I just solved it by using the perl API and removing the 
package using packages.removePackage. The weird thing is: this works …
So it seems some checks are in place in the web interface that are not being 
executed in the API (good or bad?). Of course this behavior might already been 
fixed in a newer version, but for now I have a manual workaround.

Franky

From: [email protected] 
[mailto:[email protected]] On Behalf Of Rick van der Linde
Sent: Monday 9 January 2012 14:20
To: [email protected]
Subject: Re: [Spacewalk-list] package removal problem in 1.4


 Hi,



Were you aware that when removing a package from a channel in fact the packages 
gets unlinked from it;s channel.

If you meant to really remove the package from spacewalk. First remove it from 
its channel and then find the pacakge

in the list of packages not related to a channe (manage software packages) l 
and remove it there again. Then the

package will be completely removed from spacewalk. After that you will be able 
to load the newly created package.



The second way is to increase the version/build number of the new package 
(instead of identical version) Typically a

new build should have a increased version level. This will circumvents your 
issue.



Rick

Hi all,



I seem to have a problem removing a package from a channel. Let me describe the 
situation:

-          We have some custom packages in a separate channel in spacewalk

-          It seems that a colleague of mine created a new version of a 
package, ran reposync; updated the package again (keeping the version the same) 
and ran reposync again



The result is that in /var/satellite/redhat/, I now have 2 occurrences of the 
same package name (since the md5sum differs), but in spacewalk only the 
“oldest” one is being used.

I wanted to clean up the situation by removing the package from spacewalk, but 
it seems that even though spacewalk uses only one package, the 2 are somehow 
present in the database resulting in an error when trying to remove the package 
(see below). So I was wondering if there’s any method of forcibly removing the 
problem entries from the database?



The tomcat catalina error:



2012-01-09 11:17:21,802 [TP-Processor8] WARN  
org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class 
com.redhat.rhn.common.db.ConstraintViolationException

2012-01-09 11:17:21,803 [TP-Processor8] ERROR 
com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. 
Rolling back

javax.servlet.ServletException: ORA-00001: unique constraint 
(SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated

ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087

ORA-06512: at line 1



        at 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)

        at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)

        at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)

        at 
com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)

        at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at 
com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:101)

…

<snip>

…

Caused by: com.redhat.rhn.common.db.ConstraintViolationException: ORA-00001: 
unique constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated

ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087

ORA-06512: at line 1



       at 
com.redhat.rhn.common.translation.SqlExceptionTranslator.oracleSQLException(SqlExceptionTranslator.java:77)

        at 
com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:42)

        at 
com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:118)

        at 
com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:511)

        at 
com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)

        at 
com.redhat.rhn.domain.channel.ChannelFactory.refreshNewestPackageCache(ChannelFactory.java:610)

        at 
com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:179)

        at 
com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:166)

        at 
com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesRemoveAction.removePackages(ChannelPackagesRemoveAction.java:117)

        at 
com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesRemoveAction.execute(ChannelPackagesRemoveAction.java:92)

        at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

        ... 40 more

Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique 
constraint (SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated

ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087

ORA-06512: at line 1



        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:759)

        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:661)

        at 
oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:544)

        at 
oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:727)

        at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)

        at 
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)

        at 
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)

        at 
oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)

        at 
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)

        at 
com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)

        at 
com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:115)

        ... 48 more

2012-01-09 11:17:21,817 [TP-Processor8] ERROR 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - 
Servlet.service() for servlet action threw exception

java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint 
(SPACEWALK_MAIN.RHN_CNP_CID_NID_UQ) violated

ORA-06512: at "SPACEWALK_MAIN.RHN_CHANNEL", line 1087

ORA-06512: at line 1



        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:759)

        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:661)

        at 
oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:544)

        at 
oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:727)

        at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)

        at 
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)

        at 
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)

        at 
oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)

        at 
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)

        at 
com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)



With friendly regards,



Franky



________________________________

Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg
- 1130 Brussels - Belgium
RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872
Bankrekening-Compte Bancaire-Bank Account 310-0269424-44
BIC BBRUBEBB - IBAN BE55 3100 2694 2444

"The information contained in this e-mail and any attachment thereto is 
confidential and may contain information which is protected by intellectual 
property rights.
This information is intended for the exclusive use of the recipient(s) named 
above.
This e-mail does not constitute any binding relationship or offer toward any of 
the addressees.
If you are not one of the addressees , one of their employees or a proxy holder 
entitled to hand over this message to the addressee(s), any use of the 
information contained herein (e.g. reproduction, divulgation, communication or 
distribution,...) is prohibited.
If you have received this message in error, please notify the sender and 
destroy it immediately after.
The integrity and security of this message cannot be guaranteed and it may be 
subject to data corruption, interception and unauthorized amendment, for which 
we accept no liability."
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to