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

`Docker - Delete incomplete uploads` task will stop if it errors reading a single asset

    XMLWordPrintable

    Details

    • Notability:
      3

      Description

      A repository.docker.upload-purge task can fail when it encounters an error reading a single asset.

      Example which caused the task to fail when reading a single blob properties file
      2020-03-05 14:33:16,864+0000 INFO  [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask - Task information:
      2020-03-05 14:33:16,867+0000 INFO  [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask -  ID: ab813db0-9d86-4ddd-ba46-bba43b8e00d7
      2020-03-05 14:33:16,867+0000 INFO  [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask -  Type: repository.docker.upload-purge
      2020-03-05 14:33:16,867+0000 INFO  [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask -  Name: docker-delete-incomplete-uploads
      2020-03-05 14:33:16,867+0000 INFO  [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask -  Description: Delete incomplete docker uploads
      
      2020-03-05 14:58:42,168+0000 ERROR [quartz-5-thread-1]  *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask - Failed to run task 'Delete incomplete docker uploads'
      java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
      	at java.util.Properties.loadConvert(Properties.java:574)
      	at java.util.Properties.load0(Properties.java:391)
      	at java.util.Properties.load(Properties.java:341)
      	at org.sonatype.nexus.blobstore.s3.internal.S3PropertiesFile.load(S3PropertiesFile.java:58)
      	at org.sonatype.nexus.blobstore.s3.internal.S3BlobAttributes.load(S3BlobAttributes.java:47)
      	at org.sonatype.nexus.blobstore.s3.internal.S3BlobStore.get(S3BlobStore.java:325)
      	at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:26)
      	at org.sonatype.nexus.blobstore.s3.internal.S3BlobStore.get(S3BlobStore.java:309)
      	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      	at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      	at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at org.sonatype.nexus.repository.docker.internal.UploadManagerImpl.purgeUploads(UploadManagerImpl.java:143)
      	at org.sonatype.nexus.repository.docker.internal.DockerHostedFacetImpl.purgeUploads(DockerHostedFacetImpl.java:641)
      	at org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask.lambda$1(DockerUploadPurgeTask.java:54)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      	at org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask.execute(DockerUploadPurgeTask.java:54)
      	at org.sonatype.nexus.repository.docker.tasks.DockerUploadPurgeTask.execute(DockerUploadPurgeTask.java:1)
      	at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      	at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:143)
      	at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Expected

      1) The entire task should not fail if it encounters an error parsing a single properties file.
      2) Always log the full path location to the blob asset if parsing that asset fails such that using the logged information one could know how to get the properties file from the S3 blobstore and examine it for problems

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iudovika Igor Udovika
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Michael Prescott Michael Prescott
              Team:
              NXRM - Rocket Raccoon
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title