[RTFACT-14023] Docker image replication fails if one of the labels include the character ":" Created: 30/Mar/17  Updated: 21/Nov/18  Resolved: 03/Oct/17

Status: Resolved
Project: Artifactory Binary Repository
Component/s: Replication
Affects Version/s: 4.14.3, 4.16.0, 5.2.0
Fix Version/s: 5.5.2

Type: Bug Priority: Normal
Reporter: Yehuda Hadad Assignee: Rotem Kfir
Resolution: Fixed Votes: 4
Labels: None

Issue Links:
Duplicate
is duplicated by RTFACT-13957 Replicating a Docker repository betwe... Resolved
Relationship

 Description   

Docker image replication fails if one of the labels include the character ":" .

from the logs, we can see the following error:
2017-03-30 18:16:51,416 [http-nio-8083-exec-4] [WARN ] (o.a.r.ArtifactoryResponseBase:107) - Sending HTTP error code 409: Failed to deploy properties :
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.io.StreamException
cause-message :
class : org.artifactory.model.xstream.fs.PropertiesImpl
required-type : org.artifactory.model.xstream.fs.PropertiesImpl
converter-type : org.artifactory.factory.xstream.PropertiesConverter
path : /properties
line number : 7
version : not available
------------------------------- on path docker-test1:yuda-test1/latest/manifest.json:properties

steps to reproduce:
1. create Docker image with label for example: LABEL "a:b"="c"
2.push this image to Artifactory.
3.create replication to another Artifactory server and start it.



 Comments   
Comment by Guillaume Michaud [ 25/Jul/17 ]

Any planned implementation?

Comment by benjamin Mack [ 08/Sep/17 ]

facing the sam eissue wehn importing a backup.
-------------------------
error for example:
2017-09-08 09:24:36,587 [art-exec-4] [ERROR] (o.a.r.d.i.DbRepoImportHandler:533) - Failed to import metadata of /var/backup/current/repositories/docker-rel/it-services/infrastructure/fnt-jdk/1.8/manifest.json into 'docker-rel:it-services/infrastructure/fnt-jdk/1.8/manifest.json'.:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.io.StreamException
cause-message :
class : org.artifactory.model.xstream.fs.PropertiesImpl
required-type : org.artifactory.model.xstream.fs.PropertiesImpl
converter-type : org.artifactory.factory.xstream.PropertiesConverter
path : /properties
line number : 4
version : not available

------ manifest.json:
<?xml version='1.0' encoding='UTF-8'?>
<artifactory-file>
<repoPath>
<repoKey>docker-rel</repoKey>
<path>it-services/infrastructure/fnt-jdk/1.8/manifest.json</path>
<folder>false</folder>
</repoPath>
<name>manifest.json</name>
<created>1503914425909</created>
<lastModified>1503914425900</lastModified>
<size>2198</size>
<additionalInfo>
<createdBy>ci-user</createdBy>
<modifiedBy>ci-user</modifiedBy>
<lastUpdated>1503914425900</lastUpdated>
<checksumsInfo>
<checksums>
<checksum>
<type>sha1</type>
<original>NO_ORIG</original>
<actual>38b23fb29401072dd922a0b6c0eb8412cb20517a</actual>
</checksum>
<checksum>
<type>md5</type>
<original>NO_ORIG</original>
<actual>0cd23d1ccf4551df6fea716fb6241bf1</actual>
</checksum>
</checksums>
</checksumsInfo>
</additionalInfo>
</artifactory-file>

— properties.xml
<properties>
<docker.label.maintainer>FNT GmbH </docker.label.maintainer>
<docker.label.fnt-jdk:1.8.GIT_AUTHOR>benjamin.mack@fntsoftware.com</docker.label.fnt-jdk:1.8.GIT_AUTHOR>
<docker.label.fnt-ubuntu-base.GIT_AUTHOR>---@fntsoftware.com</docker.label.fnt-ubuntu-base.GIT_AUTHOR>
<docker.label.fnt-jdk:1.8.GIT_COMMIT>ebbd7f3</docker.label.fnt-jdk:1.8.GIT_COMMIT>
<docker.label.fnt-ubuntu-base.GIT_COMMIT>d74f437</docker.label.fnt-ubuntu-base.GIT_COMMIT>
<docker.label.fnt-jdk:1.8.GIT_REPO>ssh://git@bitbucket.ci-services:7999/ITS/fnt-jdk.git</docker.label.fnt-jdk:1.8.GIT_REPO>
<docker.manifest.type>application/vnd.docker.distribution.manifest.v2+json</docker.manifest.type>
<docker.repoName>it-services/infrastructure/fnt-jdk</docker.repoName>
<docker.manifest>1.8</docker.manifest>
<sha256>e622bd1ff47cf4c566cbdb4866bce3605f3b488f467708a3f2b92faf4d7e5dfb</sha256>
</properties>r

Comment by Rotem Kfir [ 27/Sep/17 ]

The colon caused a namespace problem. I have fixed both issues (replication as well as system import).

Comment by Guillaume Michaud [ 01/Oct/17 ]

Comment by Krzysztof Malinowski [ 20/Dec/17 ]

Does the solution fix only colons? The same problem happens if the property starts from a dot, like .config.

Generated at Tue Sep 29 11:19:11 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.