<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi</p>
<p><br>
</p>
<p>working with my colleague we have now found the issue with the schema-upgrade.</p>
<p><br>
</p>
<p>In the 2.1 -> 2.2 schema-upgrade support for aarch64-redhat-linux was introduced to the db table <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">rhnServerPackageArchCompat</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Now in 2.2. -> 2.3/4 when I run the schema-upgrade package it is trying to add the same functionality to the above table:</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">2.2 upgrade from 2.1</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">schema-upgrade contains the following sql script: /etc/sysconfig/rhn/schema-upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">005-support-for-aarch64.sql.postgresql<br>
</span></p>
<div><br>
</div>
2.3/4 upgrade from 2.2 
<div>schema-upgrade contains this script: /etc/sysconfig/rhn/schema-upgrade/spacewalk-schema-2.2-to-spacewalk-schema-2.3
<div><br>
</div>
<div>012-rhnServerPackageArchCompat.sql.postgresql<br>
<br>
This causes the <span style="font-family: Calibri, sans-serif; font-size: 14.6667px;">duplicate key value violates unique constraint "rhn_pkey_keyid_uq" error because support for the arch is already in the db from the previous upgrade.</span></div>
<div><font face="Calibri, sans-serif"><span style="font-size: 14.6667px;"><br>
</span></font></div>
<div><font face="Calibri, sans-serif"><span style="font-size: 14.6667px;">rgds</span></font></div>
<div><font face="Calibri, sans-serif"><span style="font-size: 14.6667px;">Darren Glynn<br>
</span></font>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> father ted <fted.crilley@hotmail.com><br>
<b>Sent:</b> 09 February 2016 11:31<br>
<b>To:</b> spacewalk-list@redhat.com<br>
<b>Subject:</b> Failed schema upgrade from 2.2 to 2.3/4, ERROR: duplicate key value violates unique constraint "rhn_pkey_keyid_uq"</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<p>I am seeing this issue when trying to upgrade our current spacewalk server 2.2 release using either 2.3 or 2.4 repos.</p>
<p><br>
</p>
<p>(snip)</p>
<p><span style="font-size:12pt">-----------------------------------------------------------------------------------------</span><br>
</p>
<p></p>
<div> spacewalk-schema-2.2-to-spacewalk-schema-2.3/010-rhnDistChannelMap_index.sql.postgresql</div>
<div>(1 row)</div>
<div><br>
</div>
<div>ALTER TABLE</div>
<div>CREATE INDEX</div>
<div>CREATE INDEX</div>
<div>COMMIT</div>
<div>                                       ?column?                                       </div>
<div>--------------------------------------------------------------------------------------</div>
<div> spacewalk-schema-2.2-to-spacewalk-schema-2.3/011-rhnWebContactEnabled.sql.postgresql</div>
<div>(1 row)</div>
<div><br>
</div>
<div>CREATE VIEW</div>
<div>COMMIT</div>
<div>                                          ?column?                                          </div>
<div>--------------------------------------------------------------------------------------------</div>
<div> spacewalk-schema-2.2-to-spacewalk-schema-2.3/012-rhnServerPackageArchCompat.sql.postgresql</div>
<div>(1 row)</div>
<div><br>
</div>
<div>psql:/var/log/spacewalk/schema-upgrade/20160209-104250-script.sql:1620: ERROR:  duplicate key value violates unique constraint "rhn_sp_ac_said_paid_uq"</div>
<p><br>
</p>
<p>I have tried one option about manually running the commands but get an error below following this message <a href="http://www.redhat.com/archives/spacewalk-list/2014-March/msg00040.html" id="LPlnk897596" title="http://www.redhat.com/archives/spacewalk-list/2014-March/msg00040.html
Ctrl+Click or tap to follow the link">http://www.redhat.com/archives/spacewalk-list/2014-March/msg00040.html</a>:</p>
<br>
<p></p>
<div><span style="font-size:12pt">su - postgres</span><br>
</div>
<div>psql spaceschema</div>
<div>psql: FATAL:  no pg_hba.conf entry for host "[local]", user "postgres", database "spaceschema", SSL off</div>
<div><br>
</div>
<div>If i re-run the schema upgrade I now see this.</div>
<div><br>
</div>
<p></p>
<p></p>
<div>/usr/bin/spacewalk-schema-upgrade</div>
<div>Unknown schema name [(0 rows)] found.</div>
<div><br>
</div>
<div>Any help would be great thanks, there is mention in one for the previous list to manually run the sql statements in the dd but I cant login to even do this.</div>
<div><br>
</div>
<div>regards</div>
<div>Darren</div>
<br>
<p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>