Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-3217

rhtap installation always failed at RHDH due to Migration table is already locked

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 1.3
    • 1.2, 1.2.1
    • Operator
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Before this update, after updating a config map or a secret, when pods where restarting to apply the changes, they might have tried to simultaneous lock the database.
      The situation ended with a dead lock.

      With this update, {product-short} handles simultaneous pod refreshing without a dead lock.
      Show
      Before this update, after updating a config map or a secret, when pods where restarting to apply the changes, they might have tried to simultaneous lock the database. The situation ended with a dead lock. With this update, {product-short} handles simultaneous pod refreshing without a dead lock.
    • Bug Fix
    • Done
    • RHDH Core Team 3260

      I tried installing RHTAP with rhtap-cli on clusterbot clusters, it always failed due to the following error

       

      {"level":"info","message":"Listening on :7007","service":"rootHttpRouter","timestamp":"2024-07-08 11:12:47"}
      {"level":"warn","message":"DEPRECATION WARNING: The backend.auth.keys config has been replaced by backend.auth.externalAccess, see https://backstage.io/docs/auth/service-to-service-auth","service":"backstage","timestamp":"2024-07-08 11:12:48"}
      {"level":"info","message":"Serving static app content from /opt/app-root/src/packages/app/dist","plugin":"app","service":"backstage","timestamp":"2024-07-08 11:12:52"}
      {"level":"warn","message":"DEPRECATION WARNING: The backend.auth.keys config has been replaced by backend.auth.externalAccess, see https://backstage.io/docs/auth/service-to-service-auth","service":"backstage","timestamp":"2024-07-08 11:12:52"}
      {"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","timestamp":"2024-07-08 11:12:52"}
      {"level":"info","message":"::ffff:10.217.0.1 - - [08/Jul/2024:11:12:53 +0000] \"GET /healthcheck HTTP/1.1\" 200 15 \"-\" \"kube-probe/1.27\"","service":"rootHttpRouter","timestamp":"2024-07-08 11:12:53","type":"incomingRequest"}
      Can't take lock to run migrations: Migration table is already locked
      If you are sure migrations are not running you can release the lock manually by running 'knex migrate:unlock'
      /opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1806
                throw new errors.ForwardedError(
                      ^
      
      MigrationLocked: Plugin 'catalog' startup failed; caused by MigrationLocked: Migration table is already locked
          at /opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1806:17
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async /opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1805:9
          ... 3 lines matching cause stack trace ...
          at async BackstageBackend.start (/opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1894:5) {
        cause: MigrationLocked: Migration table is already locked
            at /opt/app-root/src/node_modules/knex/lib/migrations/migrate/Migrator.js:343:13
            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
            at async Migrator._runBatch (/opt/app-root/src/node_modules/knex/lib/migrations/migrate/Migrator.js:359:7)
            at async applyDatabaseMigrations (/opt/app-root/src/node_modules/@backstage/plugin-catalog-backend/dist/cjs/CatalogBuilder-WfXI1o7H.cjs.js:1505:3)
            at async CatalogBuilder.build (/opt/app-root/src/node_modules/@backstage/plugin-catalog-backend/dist/cjs/CatalogBuilder-WfXI1o7H.cjs.js:7084:7)
            at async Object.init [as func] (/opt/app-root/src/node_modules/@backstage/plugin-catalog-backend/dist/alpha.cjs.js:241:46)
            at async /opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1805:9
            at async Promise.all (index 1)
            at async BackendInitializer.doStart_fn (/opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1766:3)
            at async BackendInitializer.start (/opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1626:5)
            at async BackstageBackend.start (/opt/app-root/src/node_modules/@backstage/backend-app-api/dist/index.cjs.js:1894:5)
      }
      
      Node.js v20.12.2 

       

       

            gazarenk-1 Gennady Azarenkov
            xjiang@redhat.com Xin Jiang
            Xin Jiang Xin Jiang
            RHIDP - Install
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: