| Summary: | upgrade fails for candlepin-0.9.54.13-1 if manual patch was applied | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Barnaby Court <bcourt> | |
| Component: | Candlepin | Assignee: | Barnaby Court <bcourt> | |
| Status: | CLOSED ERRATA | QA Contact: | jcallaha | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 6.2.4 | CC: | bcourt, bkearney, ehelms, jcallaha, ohadlevy, omaciel, vrjain | |
| Target Milestone: | Unspecified | |||
| Target Release: | Unused | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | candlepin-0.9.54.14-1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1392098 (view as bug list) | Environment: | ||
| Last Closed: | 2016-11-10 16:00:49 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | 1392098 | |||
| Bug Blocks: | ||||
sadly the workaround suggest doesnt work either: alter table cp_content drop constraint cp_content_label_key; ERROR: constraint "cp_content_label_key" of relation "cp_content" does not exist candlepin=# create unique index cp_content_label_key on cp_content (label); ERROR: relation "cp_content_label_key" already exists Verified in Satellite 6.2.4 Snap 3. Applied the manual changes outlined in the original bug, then had a flawless upgrade.
[root@ibm-x3550m3-07 ~]# sudo su - postgres
-bash-4.2$ psql
psql (9.2.18)
Type "help" for help.
postgres=# \connect candlepin
You are now connected to database "candlepin" as user "postgres".
candlepin=# alter table cp_content drop constraint cp_content_label_key;
ALTER TABLE
candlepin=# create index cp_content_label_key on cp_content (label);
CREATE INDEX
candlepin=# \q
-bash-4.2$ exit
logout
[root@ibm-x3550m3-07 ~]# yum clean all && yum repolist enabled
repo id repo name status
rhel-7-server-rpms/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 13,361
rhel-7-server-satellite-6.2-rpms/x86_64 Red Hat Satellite 6.2 (for RHEL 7 Server) (RPMs) 460
rhel-server-rhscl-7-rpms/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server 6,338
sat6 Satellite 6 302
[root@ibm-x3550m3-07 ~]# yum update
==============================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================
Updating:
candlepin noarch 0.9.54.14-1.el7 sat6 28 M
candlepin-selinux noarch 0.9.54.14-1.el7 sat6 312 k
foreman-discovery-image noarch 1:3.1.1-17.el7sat sat6 183 M
foreman-installer-katello noarch 3.0.0.63-2.el7sat sat6 46 k
katello-installer-base noarch 3.0.0.63-2.el7sat sat6 1.2 M
libqpid-dispatch x86_64 0.4-19.el7sat sat6 268 k
pulp-rpm-plugins noarch 2.8.7.4-1.el7sat sat6 298 k
pulp-selinux noarch 2.8.7.3-1.el7sat sat6 79 k
pulp-server noarch 2.8.7.3-1.el7sat sat6 729 k
python-pulp-common noarch 2.8.7.3-1.el7sat sat6 123 k
python-pulp-oid_validation noarch 2.8.7.3-1.el7sat sat6 65 k
python-pulp-repoauth noarch 2.8.7.3-1.el7sat sat6 77 k
python-pulp-rpm-common noarch 2.8.7.4-1.el7sat sat6 66 k
python-pulp-streamer noarch 2.8.7.3-1.el7sat sat6 80 k
qpid-dispatch-router x86_64 0.4-19.el7sat sat6 22 k
satellite noarch 6.2.4-1.0.el7sat sat6 7.6 k
satellite-cli noarch 6.2.4-1.0.el7sat sat6 6.2 k
tfm-rubygem-foreman_theme_satellite noarch 0.1.33-1.el7sat sat6 159 k
tfm-rubygem-katello noarch 3.0.0.82-1.el7sat sat6 4.8 M
tfm-rubygem-katello_ostree noarch 3.0.0.82-1.el7sat sat6 102 k
Transaction Summary
==============================================================================================================================================================================================
Upgrade 20 Packages
Total download size: 219 M
Is this ok [y/d/N]: y
No Presto metadata available for sat6
Updated:
candlepin.noarch 0:0.9.54.14-1.el7 candlepin-selinux.noarch 0:0.9.54.14-1.el7 foreman-discovery-image.noarch 1:3.1.1-17.el7sat
foreman-installer-katello.noarch 0:3.0.0.63-2.el7sat katello-installer-base.noarch 0:3.0.0.63-2.el7sat libqpid-dispatch.x86_64 0:0.4-19.el7sat
pulp-rpm-plugins.noarch 0:2.8.7.4-1.el7sat pulp-selinux.noarch 0:2.8.7.3-1.el7sat pulp-server.noarch 0:2.8.7.3-1.el7sat
python-pulp-common.noarch 0:2.8.7.3-1.el7sat python-pulp-oid_validation.noarch 0:2.8.7.3-1.el7sat python-pulp-repoauth.noarch 0:2.8.7.3-1.el7sat
python-pulp-rpm-common.noarch 0:2.8.7.4-1.el7sat python-pulp-streamer.noarch 0:2.8.7.3-1.el7sat qpid-dispatch-router.x86_64 0:0.4-19.el7sat
satellite.noarch 0:6.2.4-1.0.el7sat satellite-cli.noarch 0:6.2.4-1.0.el7sat tfm-rubygem-foreman_theme_satellite.noarch 0:0.1.33-1.el7sat
tfm-rubygem-katello.noarch 0:3.0.0.82-1.el7sat tfm-rubygem-katello_ostree.noarch 0:3.0.0.82-1.el7sat
[root@ibm-x3550m3-07 ~]# satellite-installer --upgrade
Upgrading...
Upgrade Step: stop_services...
Redirecting to /bin/systemctl stop foreman-tasks.service
Redirecting to /bin/systemctl stop httpd.service
Redirecting to /bin/systemctl stop pulp_workers.service
Redirecting to /bin/systemctl stop foreman-proxy.service
Redirecting to /bin/systemctl stop pulp_streamer.service
Redirecting to /bin/systemctl stop pulp_resource_manager.service
Redirecting to /bin/systemctl stop pulp_celerybeat.service
Redirecting to /bin/systemctl stop smart_proxy_dynflow_core.service
Redirecting to /bin/systemctl stop tomcat.service
Redirecting to /bin/systemctl stop squid.service
Redirecting to /bin/systemctl stop qdrouterd.service
Redirecting to /bin/systemctl stop qpidd.service
Success!
Upgrade Step: start_databases...
Redirecting to /bin/systemctl start mongod.service
Redirecting to /bin/systemctl start postgresql.service
Success!
Upgrade Step: update_http_conf...
Upgrade Step: migrate_pulp...
6680
Attempting to connect to localhost:27017
Attempting to connect to localhost:27017
Write concern for Mongo connection: {}
Loading content types.
Loading type descriptors []
Parsing type descriptors
Validating type descriptor syntactic integrity
Validating type descriptor semantic integrity
Loading unit model: docker_blob = pulp_docker.plugins.models:Blob
Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest
Loading unit model: docker_image = pulp_docker.plugins.models:Image
Loading unit model: docker_tag = pulp_docker.plugins.models:Tag
Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module
Loading unit model: ostree = pulp_ostree.plugins.db.model:Branch
Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
Updating the database with types []
Found the following type definitions that were not present in the update collection [puppet_module, drpm, docker_manifest, docker_blob, erratum, yum_repo_metadata_file, package_group, package_category, iso, package_environment, docker_tag, srpm, rpm, distribution, docker_image]
Updating the database with types [puppet_module, drpm, ostree, docker_manifest, docker_blob, erratum, yum_repo_metadata_file, package_group, package_category, iso, package_environment, docker_tag, distribution, rpm, srpm, docker_image]
Content types loaded.
Ensuring the admin role and user are in place.
Admin role and user are in place.
Beginning database migrations.
Migration package pulp.server.db.migrations is up to date at version 23
Migration package pulp_docker.plugins.migrations is up to date at version 2
Migration package pulp_puppet.plugins.migrations is up to date at version 5
Migration package pulp_rpm.plugins.migrations is up to date at version 32
Loading unit model: docker_blob = pulp_docker.plugins.models:Blob
Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest
Loading unit model: docker_image = pulp_docker.plugins.models:Image
Loading unit model: docker_tag = pulp_docker.plugins.models:Tag
Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module
Loading unit model: ostree = pulp_ostree.plugins.db.model:Branch
Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
Database migrations complete.
Upgrade Step: fix_pulp_httpd_conf...
Upgrade Step: start_httpd...
Redirecting to /bin/systemctl start httpd.service
Success!
Upgrade Step: start_qpidd...
Redirecting to /bin/systemctl start qpidd.service
Redirecting to /bin/systemctl start qdrouterd.service
Success!
Upgrade Step: start_pulp...
Redirecting to /bin/systemctl start pulp_celerybeat.service
Redirecting to /bin/systemctl start pulp_resource_manager.service
Redirecting to /bin/systemctl start pulp_workers.service
Success!
Upgrade Step: migrate_candlepin...
Migrating candlepin database
Liquibase Update Successful
Upgrade Step: remove_event_queue...
Upgrade Step: start_tomcat...
Redirecting to /bin/systemctl start tomcat.service
Success!
Upgrade Step: fix_katello_settings_file...
Upgrade Step: migrate_foreman...
true
false
Upgrade Step: remove_nodes_distributors...
MongoDB shell version: 2.6.11
connecting to: pulp_database
WriteResult({ "nRemoved" : 0 })
Upgrade Step: Running installer...
Installing Done [100%] [..........................................................................................................]
The full log is at /var/log/foreman-installer/satellite.log
Upgrade Step: restart_services...
Redirecting to /bin/systemctl stop foreman-tasks.service
Redirecting to /bin/systemctl stop httpd.service
Redirecting to /bin/systemctl stop pulp_workers.service
Redirecting to /bin/systemctl stop foreman-proxy.service
Redirecting to /bin/systemctl stop pulp_streamer.service
Redirecting to /bin/systemctl stop pulp_resource_manager.service
Redirecting to /bin/systemctl stop pulp_celerybeat.service
Redirecting to /bin/systemctl stop smart_proxy_dynflow_core.service
Redirecting to /bin/systemctl stop tomcat.service
Redirecting to /bin/systemctl stop squid.service
Redirecting to /bin/systemctl stop qdrouterd.service
Redirecting to /bin/systemctl stop qpidd.service
Redirecting to /bin/systemctl stop postgresql.service
Redirecting to /bin/systemctl stop mongod.service
Success!
Redirecting to /bin/systemctl start mongod.service
Redirecting to /bin/systemctl start postgresql.service
Redirecting to /bin/systemctl start qpidd.service
Redirecting to /bin/systemctl start qdrouterd.service
Redirecting to /bin/systemctl start squid.service
Redirecting to /bin/systemctl start tomcat.service
Redirecting to /bin/systemctl start smart_proxy_dynflow_core.service
Redirecting to /bin/systemctl start pulp_celerybeat.service
Redirecting to /bin/systemctl start pulp_resource_manager.service
Redirecting to /bin/systemctl start pulp_streamer.service
Redirecting to /bin/systemctl start foreman-proxy.service
Redirecting to /bin/systemctl start pulp_workers.service
Redirecting to /bin/systemctl start httpd.service
Redirecting to /bin/systemctl start foreman-tasks.service
Success!
Upgrade Step: db_seed...
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/101-locations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/102-organizations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/103-provisioning_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/104-proxy.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/106-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/107-enable_dynflow.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/108-ensure_sync_notification.rb
Seeding /usr/share/foreman/db/seeds.d/11-smart_proxy_features.rb
Seeding /usr/share/foreman/db/seeds.d/13-compute_profiles.rb
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb
Seeding /usr/share/foreman/db/seeds.d/16-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.9/db/seeds.d/20-foreman_tasks_permissions.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.13/db/seeds.d/200-update-insights-roles.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0.3/db/seeds.d/50-bootdisk_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/50_discovery_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.9/db/seeds.d/60-dynflow_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/60-ssh_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/db/seeds.d/60_discovery_proxy_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.9/db/seeds.d/61-foreman_tasks_bookmarks.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/70-job_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.82/db/seeds.d/75-job_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.12/db/seeds.d/90-bookmarks.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.33/db/seeds.d/990 - provisioning_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.18/db/seeds.d/openscap_feature.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.18/db/seeds.d/openscap_policy_notification.rb
All seed files executed
Upgrade Step: import_package_groups (this may take a while) ...
Importing Package Groups
Upgrade Step: import_rpms (this may take a while) ...
Importing Rpms
Upgrade Step: import_distributions (this may take a while) ...
Importing distribution data into repositories
Upgrade Step: import_puppet_modules (this may take a while) ...
Importing Puppet Modules
Upgrade Step: import_subscriptions (this may take a while) ...
Importing Subscriptions
Upgrade Step: elasticsearch_message...
package elasticsearch is not installed
Upgrade Step: add_export_distributor (this may take a while) ...
Refreshing existing repositories to add export distributor
Upgrade Step: remove_docker_v1_content (this may take a while) ...
Deleting repositories that only contain Docker v1 content....Done
Orphaned content deletion started in background.
Upgrade Step: update_puppet_repository_distributors (this may take a while) ...
Updating Puppet Repository Distributors
Updating Content View Puppet Environment Distributors
Upgrade Step: update_subscription_facet_backend_data (this may take a while) ...
Updating backend data for subscription facets
Upgrade Step: remove_gutterball...
package gutterball is not installed
Upgrade completed!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:2699 |
follow up question: I've applied the workaround, but now the upgrade procedure does not work: Upgrade Step: migrate_candlepin... [ INFO 2016-11-03 14:04:29 verbose] Upgrade Step: migrate_candlepin... ########## ERROR ############ Error running command: liquibase --driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-update.xml --url=jdbc:postgresql:candlepin --username=candlepin --password=UwAUXGvbHF3xAQcDeNsXSLah5bo5DoSb migrate -Dcommunity=False Status code: 65280 Command output: Liquibase update Failed: Migration failed for change set db/changelog/20161025100925-remove-unique-content-name-constraint.xml::20161025100925-1::awood: Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE public.cp_content DROP CONSTRAINT cp_content_label_key: ERROR: constraint "cp_content_label_key" of relation "cp_content" does not exist Migrating candlepin database Traceback (most recent call last): File "/usr/share/candlepin/cpdb", line 245, in <module> dbsetup.update() File "/usr/share/candlepin/cpdb", line 69, in update self._run_liquibase("db/changelog/changelog-update.xml") File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase self.community)) File "/usr/share/candlepin/cpdb", line 38, in run_command error_out(command, status, output) File "/usr/share/candlepin/cpdb", line 46, in error_out raise Exception("Error running command") Exception: Error running command [ERROR 2016-11-03 14:04:38 verbose] ########## ERROR ############ Error running command: liquibase --driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-update.xml --url=jdbc:postgresql:candlepin --username=candlepin --password=UwAUXGvbHF3xAQcDeNsXSLah5bo5DoSb migrate -Dcommunity=False Status code: 65280 Command output: Liquibase update Failed: Migration failed for change set db/changelog/20161025100925-remove-unique-content-name-constraint.xml::20161025100925-1::awood: Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE public.cp_content DROP CONSTRAINT cp_content_label_key: ERROR: constraint "cp_content_label_key" of relation "cp_content" does not exist Migrating candlepin database Traceback (most recent call last): File "/usr/share/candlepin/cpdb", line 245, in <module> dbsetup.update() File "/usr/share/candlepin/cpdb", line 69, in update self._run_liquibase("db/changelog/changelog-update.xml") File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase self.community)) File "/usr/share/candlepin/cpdb", line 38, in run_command error_out(command, status, output) File "/usr/share/candlepin/cpdb", line 46, in error_out raise Exception("Error running command") Exception: Error running command Upgrade step migrate_candlepin failed. Check logs for more information. what is the recommended approach to resolve it?