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

Upgrade never completes if source repository has zero length files in it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: Migration
    • Labels:
    • Story Points:
      1
    • Sprint:
      Sprint 88

      Description

      If a source repository has zero length files in it upgrade never completes, the "continue" button at the end of migration is never enabled.

      Zero length files can be created in a Nexus 2 repository if the disk fills up, or the process runs out of file handles.

      On the Nexus 3 side we see:

      2017-01-13 13:20:31,132-0600 WARN  [change-processing-9-thread-6] admin com.sonatype.nexus.migration.client.http.MigrationRequestMonitorImpl - Request failed: input contained no data
      2017-01-13 13:20:31,132-0600 INFO  [change-processing-9-thread-6] admin com.sonatype.nexus.migration.client.http.MigrationRequestMonitorImpl - Delaying until Fri Jan 13 13:20:36 CST 2017
      2017-01-13 13:20:32,657-0600 DEBUG [pool-47-thread-1] admin com.sonatype.nexus.migration.ui.ProgressComponent - read SYNC
      2017-01-13 13:20:33,366-0600 DEBUG [pool-47-thread-2] admin com.sonatype.nexus.migration.ui.ProgressComponent - read SYNC
      2017-01-13 13:20:35,362-0600 DEBUG [pool-47-thread-4] admin com.sonatype.nexus.migration.ui.ProgressComponent - read SYNC
      2017-01-13 13:20:36,156-0600 WARN  [change-processing-9-thread-6] admin com.sonatype.nexus.migration.client.http.MigrationRequestMonitorImpl - Leaving failure mode
      2017-01-13 13:20:36,162-0600 WARN  [change-processing-9-thread-6] admin com.sonatype.nexus.migration.client.http.MigrationRequestMonitorImpl - Request failed: input contained no data
      2017-01-13 13:20:36,162-0600 INFO  [change-processing-9-thread-6] admin com.sonatype.nexus.migration.client.http.MigrationRequestMonitorImpl - Delaying until Fri Jan 13 13:20:41 CST 2017
      

      On Nexus 2 the request log shows it is asking for the zero length file over and over again:

      127.0.0.1 - - [13/Jan/2017:13:18:30 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:18:35 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:18:40 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:18:45 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:18:50 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:18:55 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      127.0.0.1 - - [13/Jan/2017:13:19:00 -0600] "GET /nexus/service/siesta/migrationagent/repository-content/snapshots/org%2Fsonatype%2Fproject%2F1.1.1-SNAPSHOT%2Fproject-1.1.1-20170113.191359-2.pom HTTP/1.1" 200 0 2
      
      

      Deleting the zero length files from repository storage in Nexus 2 allows the upgrade to continue.

      Expected

      In most cases, a zero length file is not valid ( created due to out of disk for example, or some other error )

      However we cannot guess why a zero length file exists. Maybe it is a marker file of some sort.

      The consensus seems to be that zero length files should be migrated and Nexus 3 should handle them.

      Add a single INFO log message per migrated component/asset on the nexus 3 side stating the full path and repo being processed, and that that path was zero-length.

      Do not confuse a zero length file in nexus 2 with a failure to download all bytes from Nexus 2.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fmilens Frederick Milens
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title