Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-10171

failed bulk promote operation can leave some staging repositories in transition and not editable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.13
    • Fix Version/s: None
    • Component/s: Staging
    • Labels:

      Description

      Perform a staging bulk promote operation (multiple staging repositories) - if one of these promoted members is internally marked as "in transition" from another staging operation, then the independent bulk promote operation can leave some of the staging repository members in transition and not editable in the UI from then on. A restart is required to get out of this state.

      2016-04-30 05:12:13 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.rest.repository.RepositoryResource - Fetching: jboss_releases_staging_profile-8163
      2016-04-30 05:12:13 DEBUG [qtp2124695070-30823] admin com.sonatype.nexus.staging.rest.repository.RepositoryListResource - Listing repositories
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.rest.bulk.BulkPromoteResource - Preforming staging action: PROMOTE on repositories: [fusesource_releases_internal-1406, fusesource_releases_external-2336, fusesource_releases_external-2337, fusesource_releases_external-2341, fusesource_releases_external-2342, jboss_releases_staging_profile-8163]
      2016-04-30 05:12:21 INFO  [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Promoting staging repositories [fusesource_releases_internal-1406, fusesource_releases_external-2336, fusesource_releases_external-2337, fusesource_releases_external-2341, fusesource_releases_external-2342, jboss_releases_staging_profile-8163] to group profile 5992e1cc22908
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Preparing background task: com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask@4f50d46e
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_internal-1406
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2336
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2337
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2341
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2342
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: jboss_releases_staging_profile-8163
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - 6 members:
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=fusesource_releases_internal-1406, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=fusesource_releases_external-2336, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=fusesource_releases_external-2337, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=fusesource_releases_external-2341, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=fusesource_releases_external-2342, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask -   PromoteItem{id=jboss_releases_staging_profile-8163, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.persist.StagingConfigurationSource - Saving configuration: /services/nexus/sonatype-work/nexus/conf/staging.xml
      2016-04-30 05:12:21 INFO  [qtp2124695070-30852] admin org.sonatype.nexus.configuration.ModelUtils - Saving model /services/nexus/sonatype-work/nexus/conf/staging.xml
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_internal-1406, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2336, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2337, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2341, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2342, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=jboss_releases_staging_profile-8163, state=closed, group=false}
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_internal-1406
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2336
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2337
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2341
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2342
      2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Staging repository is already transitioning: fusesource_releases_external-2342; repositories in transition: [fusesource_releases_internal-1406, fusesource_releases_external-2317, fusesource_releases_external-2329, fusesource_releases_external-2319, fusesource_releases_external-2318, fusesource_releases_internal-1402, fusesource_releases_internal-1401, fusesource_releases_external-2342, fusesource_releases_external-2333, fusesource_releases_external-2341, fusesource_releases_external-2332, fusesource_releases_external-2322, fusesource_releases_external-2321, fusesource_releases_external-2337, fusesource_releases_external-2336, jboss_releases_staging_profile-8099, jboss_releases_staging_profile-8108]
      2016-04-30 05:12:21 WARN  [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Abort background; task preparations failed
      java.lang.IllegalStateException: Staging repository is already transitioning: fusesource_releases_external-2342
          at com.google.common.base.Preconditions.checkState(Preconditions.java:200) ~[guava-16.0.1.jar:na]
          at com.sonatype.nexus.staging.internal.DefaultStagingManager.ensureCompatibleTransition(DefaultStagingManager.java:171) [nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.DefaultStagingManager.setTransitioning(DefaultStagingManager.java:180) [nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.transitioning(OperationTaskSupport.java:217) ~[nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.transitioning(OperationTaskSupport.java:212) ~[nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.task.OperationTaskSupport.prepare(OperationTaskSupport.java:393) ~[nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask.prepare(RepositoryPromoteTask.java:363) ~[nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.DefaultStagingManager.prepareBackgroundTask(DefaultStagingManager.java:196) [nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.internal.DefaultStagingManager.promoteToGroupStagingRepositories(DefaultStagingManager.java:342) [nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.rest.bulk.BulkPromoteResource.doPost(BulkPromoteResource.java:78) [nexus-staging-plugin-2.13.0-01/:na]
          at com.sonatype.nexus.staging.rest.bulk.BulkResourceSupport.post(BulkResourceSupport.java:84) [nexus-staging-plugin-2.13.0-01/:na]
          at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:262) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.restlet.resource.Resource.handlePost(Resource.java:537) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.restlet.Finder.handle(Finder.java:357) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.13.0-01/:na]
          at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.13.0-01/:na]
      

      In the above example fusesource_releases_external-2336, fusesource_releases_external-2337,fusesource_releases_external-2341 are all left internally marked as in transition and when viewed from the staging UI after this operation, cannot be promoted, dropped, or released until Nexus is restarted.

      Expected:

      • Nexus should keep track of transition state more carefully inside of transactions and unwind any set transition states if the enclosing operation fails
      • should not have to restart Nexus to get out of this state

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title