Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-28048

After upgrade to 6.16 candlepin fails to start with MigrationFailedException

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • candlepin-4.4.16-1
    • 0
    • Phoenix, Platform
    • Fail
    • Sprint 139
    • Important
    • Yes

      Description of problem:

      Upgrade fails in post-upgrade checks with Candlepin refusing to start due to MigrationFailedException

       

      How reproducible:

      deterministic

       

      Is this issue a regression from an earlier version:

      yes

       

      Steps to Reproduce:

      1. Have a blank 6.15 satellite

      2. Run preupgrade-a4ebbfa1-106a-4962-9c7c-082833879ae8 test to create one yum and one file repo (with uploaded file) and publish them in a CV.

      3. Run upgrade to 6.16.0

       

      Actual behavior:
      The upgrade fails in post-upgarde checks, candlepin fails to start.

      Running Checks after upgrading
      ================================================================================
      Check number of fact names in database:                               [OK]
      --------------------------------------------------------------------------------
      Clean old Kernel and initramfs files from tftp-boot:                  [OK]
      --------------------------------------------------------------------------------
      Check for verifying syntax for ISP DHCP configurations:               [OK]
      --------------------------------------------------------------------------------
      Check whether all services are running:                               [OK]
      --------------------------------------------------------------------------------
      Check whether all services are running using the ping call:           [FAIL]
      Some components are failing: candlepin, candlepin_auth, candlepin_events
      --------------------------------------------------------------------------------
      Continue with step [Restart applicable services]? (assuming yes)
      Restart applicable services:                                                    

      Restarting the following service(s):
      postgresql, tomcat
      / All services restarted                                                        
      \ Try 1/5: checking status of hammer ping                                       
      Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events

      • Try 2/5: checking status of hammer ping                                       
        Some components are failing: candlepin, candlepin_auth, candlepin_events
        / Try 3/5: checking status of hammer ping                                       
        Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events
      • Try 4/5: checking status of hammer ping                                       
        Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events
        Try 5/5: checking status of hammer ping                             [FAIL]    
        Server response check failed!
        --------------------------------------------------------------------------------
        Rerunning the check after fix procedure
        Check whether all services are running using the ping call:           [FAIL]
        Some components are failing: candlepin, candlepin_auth, foreman_tasks, candlepin_events
        --------------------------------------------------------------------------------

       

      From candlepin.log:

      2024-09-17 09:31:43,904 [thread=main] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Candlepin initializing context.
      2024-09-17 09:31:43,905 [thread=main] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Candlepin reading configuration.
      2024-09-17 09:31:43,910 [thread=main] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Loading candlepin.conf configuration!
      2024-09-17 09:31:43,961 [thread=main] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Validating configurations.
      2024-09-17 09:31:43,969 [thread=main] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Candlepin will show support for the following capabilities: [instance_multiplier, derived_product, vcpu, cert_v3, hypervisors_heartbeat, remove_by_pool_id, syspurpose, storage_band, cores, multi_environment, hypervisors_async, org_level_content_access, typed_environments, guest_limit, ram, batch_bind]
      2024-09-17 09:31:43,973 [thread=main] [=, org=, csid=] INFO  org.candlepin.database.DatabaseConnectionManager - Attempt 1 out of 3 to connect to the database.
      2024-09-17 09:31:44,173 [thread=main] [=, org=, csid=] INFO  org.candlepin.database.MigrationManager - Liquibase startup management set to Manage
      2024-09-17 09:31:46,354 [thread=main] [=, org=, csid=] INFO  org.candlepin.database.MigrationManager - Calling liquibase to update the database
      2024-09-17 09:31:46,354 [thread=main] [=, org=, csid=] INFO  org.candlepin.database.MigrationManager - Database has 17 unrun changeset(s): 
        file: db/changelog/20231003113535-entity_layering_schema.xml, changeset: 20231003113535-11
        file: db/changelog/20231003113535-entity_layering_schema.xml, changeset: 20231003113535-12
        file: db/changelog/20231003163700-rename_pool_locked_field.xml, changeset: 20231003163700-1
        file: db/changelog/20231211101743-add-pool-dirty-product-column.xml, changeset: 20231211101743-1
        file: db/changelog/20240101162555-update-anon-cert-foreign-key.xml, changeset: 20240101162555-1
        file: db/changelog/20240101162555-update-anon-cert-foreign-key.xml, changeset: 20240101162555-2
        file: db/changelog/20240101162555-update-anon-cert-foreign-key.xml, changeset: 20240101162555-3
        file: db/changelog/20231024083400-hms-environment-changes.xml, changeset: 20231024083400-1
        file: db/changelog/20231024083400-hms-environment-changes.xml, changeset: 20231024083400-2
        file: db/changelog/202401081559-add-claimant-owner-column.xml, changeset: 202401081559-1
        file: db/changelog/20240329143555-add_environment_content_override_schema.xml, changeset: 20240329143555-1
        file: db/changelog/20240329143555-add_environment_content_override_schema.xml, changeset: 20240329143555-2
        file: db/changelog/20240329143555-add_environment_content_override_schema.xml, changeset: 20240329143555-3
        file: db/changelog/20240329143555-add_environment_content_override_schema.xml, changeset: 20240329143555-4
        file: db/changelog/20240329143555-add_environment_content_override_schema.xml, changeset: 20240329143555-5
        file: db/changelog/20240502145033-fix_entity_namespace_type.xml, changeset: 20240502145033-1
        file: db/changelog/20240502145033-fix_entity_namespace_type.xml, changeset: 20240502145033-2
      2024-09-17 09:31:47,604 [thread=main] [=, org=, csid=] ERROR org.candlepin.guice.CandlepinContextListener - Error initializing database: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset db/changelog/20231003113535-entity_layering_schema.xml::20231003113535-11::crog:
           Reason: liquibase.exception.DatabaseException: ERROR: value too long for type character varying(32) [Failed SQL: (0) – Copy over custom content
                  INSERT INTO cp_contents (uuid, created, updated, namespace, content_id, content_url, gpg_url, label, metadata_expire, name, release_ver, required_tags, type, vendor, arches)
                      SELECT acc.new_uuid, old_cont.updated, now(), owner.account, old_cont.content_id, old_cont.contenturl, old_cont.gpgurl, old_cont.label, old_cont.metadataexpire, old_cont.name, old_cont.releasever, old_cont.requiredtags, old_cont.type, old_cont.vendor, old_cont.arches
                          FROM tmp_active_custom_contents acc
                          JOIN cp_owner owner ON owner.id = acc.owner_id
                          JOIN cp2_content old_cont ON old_cont.uuid = acc.uuid
                          WHERE acc.best = true]

       

      Expected behavior:
      Successful upgrade

       

      Business Impact / Additional info:

      Reproducer available

            rh-ee-jalbrech Josh Albrecht
            vsedmik@redhat.com Vladimír Sedmík
            Christopher Rog
            Vladimír Sedmík Vladimír Sedmík
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: