Bug 1305384 - Spacewalk schema upgrade error while upgrading to nightly build from 2.4
Summary: Spacewalk schema upgrade error while upgrading to nightly build from 2.4
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2016-02-07 22:11 UTC by dimatha
Modified: 2017-09-28 18:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 07:33:20 UTC
Embargoed:


Attachments (Terms of Use)

Description dimatha 2016-02-07 22:11:46 UTC
Description of problem:

Spacewalk schema upgrade failed:
------------------------------------------------------------------------------------------------------
 spacewalk-schema-2.4-to-spacewalk-schema-2.5/126-drop-columns-rhnPrivateChannelFamily.sql.postgresql
(1 row)

psql:/var/log/spacewalk/schema-upgrade/20160207-220710-script.sql:2221: ERROR:  cannot drop table rhnprivatechannelfamily column max_members because other objects depend on it
DETAIL:  view rhnorgchannelfamilypermissions depends on table rhnprivatechannelfamily column max_members
view rhnorgchanneltreeview depends on view rhnorgchannelfamilypermissions
view rhnavailablechannels depends on view rhnorgchanneltreeview
view rhnorgerrata depends on view rhnavailablechannels
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

Version-Release number of selected component (if applicable):
spacewalk-backend-libs-2.5.18-1.el6.noarch
spacewalk-backend-config-files-common-2.5.18-1.el6.noarch
spacewalk-base-2.5.7-1.el6.noarch
spacewalk-search-2.5.2-1.el6.noarch
spacewalk-backend-package-push-server-2.5.18-1.el6.noarch
spacewalk-postgresql-2.4.2-1.el6.noarch
spacewalk-backend-xmlrpc-2.5.18-1.el6.noarch
spacewalk-schema-2.5.10-1.el6.noarch
spacewalk-reports-2.5.1-1.el6.noarch
spacewalk-backend-iss-export-2.5.18-1.el6.noarch
spacewalk-slf4j-1.6.1-6.el6.noarch
spacewalk-certs-tools-2.5.1-1.el6.noarch
spacewalk-java-postgresql-2.5.49-1.el6.noarch
spacewalk-backend-2.5.18-1.el6.noarch
spacewalk-backend-sql-2.5.18-1.el6.noarch
spacewalk-backend-app-2.5.18-1.el6.noarch
spacewalk-base-minimal-2.5.7-1.el6.noarch
spacewalk-backend-tools-2.5.18-1.el6.noarch
spacewalk-setup-jabberd-2.3.2-1.el6.noarch
spacewalk-doc-indexes-2.5.1-1.el6.noarch
spacewalk-branding-2.5.2-1.el6.noarch
spacewalk-html-2.5.7-1.el6.noarch
spacewalk-backend-applet-2.5.18-1.el6.noarch
spacewalk-setup-postgresql-2.3.1-1.el6.noarch
spacewalk-oscap-0.0.23-1.el6.noarch
spacewalk-config-2.5.2-1.el6.noarch
spacewalk-backend-xml-export-libs-2.5.18-1.el6.noarch
spacewalk-admin-2.5.1-1.el6.noarch
spacewalk-java-2.5.49-1.el6.noarch
spacewalk-backend-config-files-2.5.18-1.el6.noarch
spacewalk-client-repo-2.5-3.el6.noarch
spacewalk-java-lib-2.5.49-1.el6.noarch
spacewalk-setup-2.5.3-1.el6.noarch
spacewalk-utils-2.5.6-1.el6.noarch
spacewalk-backend-config-files-tool-2.5.18-1.el6.noarch
spacewalk-repo-2.5-3.el6.noarch
spacewalk-java-config-2.5.49-1.el6.noarch
spacewalk-backend-sql-postgresql-2.5.18-1.el6.noarch
spacewalk-selinux-2.3.2-1.el6.noarch
spacewalk-backend-server-2.5.18-1.el6.noarch
spacewalk-base-minimal-config-2.5.7-1.el6.noarch
spacewalk-backend-iss-2.5.18-1.el6.noarch
spacewalk-taskomatic-2.5.49-1.el6.noarch
spacewalk-common-2.4.2-1.el6.noarch
spacewalk-jpp-workaround-2.3.5-1.el6.noarch

How reproducible:

Upgrade to nightly build and run spacewalk-schema-upgrade

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 dimatha 2016-02-07 22:15:32 UTC
Not sure where it comes from. I can't find any adjustments in this view in the early schema versions

- View: rhnorgchannelfamilypermissions

-- DROP VIEW rhnorgchannelfamilypermissions;

CREATE OR REPLACE VIEW rhnorgchannelfamilypermissions AS 
         SELECT pcf.channel_family_id, u.org_id, to_number(NULL::text, NULL::text) AS max_members, 0 AS current_members, to_number(NULL::text, NULL::text) AS fve_max_members, 0 AS fve_current_members, pcf.created, pcf.modified
           FROM rhnpublicchannelfamily pcf, web_contact u
UNION 
         SELECT rhnprivatechannelfamily.channel_family_id, rhnprivatechannelfamily.org_id, rhnprivatechannelfamily.max_members, rhnprivatechannelfamily.current_members, rhnprivatechannelfamily.fve_max_members, rhnprivatechannelfamily.fve_current_members, rhnprivatechannelfamily.created, rhnprivatechannelfamily.modified
           FROM rhnprivatechannelfamily;

ALTER TABLE rhnorgchannelfamilypermissions
  OWNER TO spacewalk;

Comment 2 Jiri Precechtel 2016-06-03 15:15:24 UTC
Already fixed in spacewalk-git-commit: 0b81000684156e903e4be787f7e05f5789d825a4

Comment 4 Tomáš Kašpárek 2016-06-16 07:33:20 UTC
Spacewalk 2.5 was released.

Comment 5 Eric Herget 2017-09-28 18:11:31 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


Note You need to log in before you can comment on or make changes to this bug.