Description of problem: /usr/bin/spacewalk-schema-upgrade returns "Upgrade failed, please see log in [/var/log/spacewalk/schema-upgrade/]". The file /var/log/spacewalk/schema-upgrade/20090119-074852-to-spacewalk-schema-0.4.log ends as follows: 4199 SQL> alter TABLE rhnPackage MODIFY (compat number(1)); 4200 alter TABLE rhnPackage MODIFY (compat number(1)) 4201 * 4202 ERROR at line 1: 4203 ORA-01440: column to be modified must be empty to decrease precision or scale 4204 4205 Version-Release number of selected component (if applicable): Spacewalk 0.4 How reproducible: Do not know -- probably Additional info: This appears towards the end of the script: 3586 alter TABLE rhnPackage MODIFY (compat number(1)); 3587 show errors 3588 commit; 3589 spool /var/log/spacewalk/schema-upgrade/20090119-074852-end.log append 3590 whenever sqlerror exit sql.sqlcode 3591 3592 insert into rhnVersionInfo 3593 ( label, name_id, evr_id, created, modified ) 3594 values ('schema', lookup_package_name('spacewalk-schema'), 3595 lookup_evr(null, '0.4.17' , '1.el5' ), 3596 sysdate, sysdate ); 3597 commit; 3598 quit; As the remaining SQL code doesn't appear to rely on the rhnPackage table I ran those statements manually. The column in question is in-use but doesn't seem to be storing anything of value: SQL> select compat from rhnPackage group by compat; COMPAT ---------- 0 SQL> select count(compat) from rhnPackage; COUNT(COMPAT) ------------- 12444 SQL> desc rhnPackage; Name Null? Type ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER [...] PAYLOAD_FORMAT VARCHAR2(32) COMPAT NUMBER(38) PATH VARCHAR2(1000) [...] HEADER_END NOT NULL NUMBER
This problem was fixed in spacewalk-0.4 branch: http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=76c6badd7ea8f3191513138cd46bc350d9c01cf4
Fix should go out for Spacewalk 0.4 in spacewalk-schema-0.4.18-1 Alternatively, you can update /etc/sysconfig/rhn/schema-upgrade/spacewalk-0.3-spacewalk-0.4/156-rhnPackage-compat-number.sql with the fix from the commit above.
That fixed the issue with that column. Thank you!
I can see that spacewalk-schema-0.4.18-1.el5.noarch.rpm is now available on http://spacewalk.redhat.com/yum/0.4/rhel/5Server/i386/. Proposing moving to ON_QA, and as Brian confirms that it fixes the problem, maybe directly to VERIFIED and CLOSED.