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

"Docker - Delete unused manifests and images" task fails with NPE due to OCI images

    Details

    • Notability:
      2
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      The "Docker - Delete unused manifests and images" fails to run with the following NPE as it does not handle "application/vnd.oci.image.index.v1+json" image types:

      2022-07-18 11:54:33,116+0200 DEBUG [quartz-26-thread-20] *SYSTEM org.sonatype.nexus.repository.docker.internal.orient.V2ManifestUtilImpl - Parsing manifest v2/submariner/nettest/manifests/devel of type application/vnd.oci.image.index.v1+json
      2022-07-18 11:54:33,133+0200 ERROR [quartz-26-thread-20] *SYSTEM org.sonatype.nexus.repository.docker.tasks.DockerGCTask - Failed to run task 'Docker - Delete unused manifests and images' on repository 'rlt-harc-docker-snapshot'java.lang.NullPointerException: Cannot get property 'digest' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:190) at org.codehaus.groovy.runtime.DefaultGroovyMethods.getAt(DefaultGroovyMethods.java:342) at org.codehaus.groovy.runtime.dgm$242.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:251) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:58) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) at org.sonatype.nexus.repository.docker.internal.V2Manifest.referencedDigests(V2Manifest.groovy:88) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.fetchDataForManifest(DockerGCFacetImpl.java:343) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.fetchDataForRepository(DockerGCFacetImpl.java:320) at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58) at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66) at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.getExternalUsedLayersDigests(DockerGCFacetImpl.java:232) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.checkForReferencesInOtherRepositories(DockerGCFacetImpl.java:209) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.handleV2Assets(DockerGCFacetImpl.java:188) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.processRepository(DockerGCFacetImpl.java:117) at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58) at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66) at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55) at org.sonatype.nexus.repository.docker.internal.orient.DockerGCFacetImpl.deleteUnusedManifestsAndImages(DockerGCFacetImpl.java:100) 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:54) at org.sonatype.nexus.repository.docker.tasks.DockerGCTask.execute(DockerGCTask.java:48) at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79) 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:145) 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:750)

      Expected:

      Repo 3 supports OCI images types including upload, cleanup and deletion.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hardeepn Hardeep Nagra
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Rich Seddon Rich Seddon
              Team:
              NXRM - Mad Max
              Owner:
              Maksym Kalachov [X] Maksym Kalachov [X] (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title