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

Deploying docker manifest which has unknown properties causes an entire docker package to become unusable.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.1
    • Component/s: Docker
    • Labels:
    • Story Points:
      0.5
    • Sprint:
      Sprint 85

      Description

      An end user uploaded some docker images using docker 1.13.0 RC which had manifests containing unsupported tags.

      Now they can't seem to get out of the bad state, seems that deleting the bad manifests doesn't fix it, and they can't deploy new versions of this image using Docker 1.12.

      2016-12-15 14:51:06,613-0600 INFO [qtp252865835-11141] snikifor org.sonatype.nexus.repository.storage.SingleAssetComponentMaintenance - Deleting component: Component{metadata=AttachedEntityMetadata{document=component#10:33165{bucket:#9:9,format:docker,last_updated:Thu Dec 15 14:49:20 CST 2016,attributes:[1],group:null,name:dock2box/centos7.2.1511,version:fb8c651} v1}, name=dock2box/centos7.2.1511, version=fb8c651, group=null}

      2016-12-15 15:08:52,271-0600 WARN [qtp252865835-11186] registry_svc org.sonatype.nexus.repository.docker.internal.V2Handlers - Error: HEAD /v2/stampede/centos7.2.1511/blobs/sha256:00e4abfa9a21665df632d0eaa741ba6dced8e8a3cf79722f85115d9d761125a9: 404 - org.sonatype.nexus.repository.docker.internal.V2Exception$BlobNotFound: blob unknown to registry
      2016-12-15 15:09:05,293-0600 WARN [qtp252865835-11201] snikifor org.sonatype.nexus.repository.docker.internal.V2Handlers - Error: GET /v2/stampede/centos7.2.1511/manifests/fb8c651
      com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "comment" (class org.sonatype.nexus.repository.docker.internal.V2ManifestConfig), not marked as ignorable (11 known properties: "container_config", "container", "config", "architecture", "os", "created", "docker_version", "author", "rootfs", "metaClass", "history"])
      at [Source: java.io.BufferedInputStream@12f67dcc; line: 1, column: 36] (through reference chain: org.sonatype.nexus.repository.docker.internal.V2ManifestConfig["comment"])
      at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:855) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1083) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1389) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1367) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:266) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3788) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2849) [com.fasterxml.jackson.core.jackson-databind:2.7.1]
      at com.fasterxml.jackson.databind.ObjectMapper$readValue$1.call(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.docker.internal.V2ManifestUtilImpl.loadConfigurationFile(V2ManifestUtilImpl.groovy:209) [na:na]
      at org.sonatype.nexus.repository.docker.internal.V2ManifestUtilImpl$loadConfigurationFile$16.callStatic(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.docker.internal.V2ManifestUtilImpl.mayDowngrade(V2ManifestUtilImpl.groovy:127) [na:na]
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:44) [org.sonatype.nexus.transaction:3.0.2.02]
      at org.sonatype.nexus.repository.docker.internal.DockerHostedFacetImpl.getManifestByTag(DockerHostedFacetImpl.java:728) [na:na]
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:54) [org.sonatype.nexus.transaction:3.0.2.02]
      at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:53) [org.sonatype.nexus.transaction:3.0.2.02]
      at org.sonatype.nexus.repository.docker.internal.DockerHostedFacet$getManifestByTag.call(Unknown Source) [na:na]
      at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure14.doCall(V2Handlers.groovy:240) [na:na]
      at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) [na:na]

        Issue Links

          Activity

          Hide
          rseddon Rich Seddon added a comment -

          Related to NEXUS-11698... possibly the fix for that will fix this also?

          Show
          rseddon Rich Seddon added a comment - Related to NEXUS-11698 ... possibly the fix for that will fix this also?
          Hide
          jtom Joe Tom added a comment - - edited

          Moving forward all unrecognized properties from NXRM should be ignored and not cause errors. If there is a property that is ignored and you think should be functioning, feel free to raise a distinct ticket but keep in mind previously it'd be erroring and causing errors/bad behavior similar to this so thanks in advance for your patience.

          Show
          jtom Joe Tom added a comment - - edited Moving forward all unrecognized properties from NXRM should be ignored and not cause errors. If there is a property that is ignored and you think should be functioning, feel free to raise a distinct ticket but keep in mind previously it'd be erroring and causing errors/bad behavior similar to this so thanks in advance for your patience.

            People

            • Assignee:
              jtom Joe Tom
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Joe Tom
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response:

                Agile