[Spacewalk-list] [SOLVED] Current packages in 1.6-nightly repo breaks Spacewalk

Scott Worthington scott.c.worthington at gmail.com
Mon Oct 17 19:09:16 UTC 2011


On Mon, Oct 17, 2011 at 1:43 PM, Jan Pazdziora <jpazdziora at redhat.com> wrote:
> On Mon, Oct 17, 2011 at 12:55:16PM -0400, Scott Worthington wrote:
>> Hello, the current packages in 1.6-nightly (2011-10-17) breaks
>> Spacewalk due to a Postgresql table column not existing.
>>
>> >Caused by: org.postgresql.util.PSQLException: ERROR: column networks0_.ip6addr does not exist Position: 168
>>
>> This is Spacewalk 1.6-nightly on CentOS 6.0 x86_64:
>>
>> The nightlys version updates had versions of 1.6.31-1.el6.noarch.  The
>> spacewalk-schema file had version 1.6.21-1.el6.noarch.
>>
>> I have run spacewalk-schema-upgrade:
>>
>> # spacewalk-schema-upgrade
>> Schema upgrade: [spacewalk-schema-1.6.19-1.el6] ->
>> [spacewalk-schema-1.6.21-1.el6]
>> Searching for upgrade path: [spacewalk-schema-1.6.19-1] ->
>> [spacewalk-schema-1.6.21-1]
>> Searching for upgrade path: [spacewalk-schema-1.6.19] ->
>> [spacewalk-schema-1.6.21]
>> Your database schema already matches the schema package version
>> [spacewalk-schema-1.6].
>
> The issue is -- we do not support rolling upgrades of Spacewalk schema
> in nightly. The spacewalk-schema-upgrade tells you that you are on the
> 1.6 version because there is lower-granularity upgrade path, say from
> spacewalk-schema-1.6.19 to spacewalk-schema-1.6.21.
>
> You might want to pick the rpm for 1.6.19 and 1.6.21 and diff their
> content and apply the changes manually.
>
> Or just rerun spacewalk-schema, clear the database schema and start
> with fresh one.
>
> --
> Jan Pazdziora
> Principal Software Engineer, Satellite Engineering, Red Hat
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>

[SOLVED]

Hello,

Yes, the schema changed in 1.6-nightly, but, as you said,
spacewalk-schema-upgrade only upgrades MAJOR updates (that is, 1.5 to
1.6, not within 1.6 -- nightly -- as changes are being developed on
nightly).

This was my process to add the "ip6addr" fields that was missing :

# cd /etc/sysconfig/rhn/schema-upgrade/
# grep "ip6addr" * -R
spacewalk-schema-1.5-to-spacewalk-schema-1.6/096-add_rhnServerNetwor.sql.postgresql:alter
table rhnServerNetwork add column ip6addr varchar(45);
spacewalk-schema-1.5-to-spacewalk-schema-1.6/096-add_rhnServerNetwor.sql.oracle:alter
table rhnServerNetwork add ip6addr varchar2(45);

The change was in the file 096-add_rhnServerNetwor.sql.postgresql.

This is what I did to add the schema change to postgresql:

1. Change to root
sudo  -
2. Change to user postgresql
su postgresql
3. Launch psql specifying your Spacewalk db (mine is spaceschmea)
psql -d spaceschmea
4. cut-and-paste the command in 096-add_rhnServerNetwor.sql.postgresql
$ psql -d spaceschema
psql (8.4.7)
Type "help" for help.

spaceschema=# alter table rhnServerNetwork add column ip6addr varchar(45);
ALTER TABLE
spaceschema-# ^\Quit

You may know how to do this all from the command line importing the
096-add_rhnServerNetwor.sql.postgresql content, but this got my
1.6-nightly back up and running by manually running the commands.

I hope that helps someone else tracking 1.6-nightly.

Enjoy!
ScottW




More information about the Spacewalk-list mailing list