<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Partha,<br><br></div>schema_version field specified on Manifest model and on Tag model refers *just* to the V2 api content.<br>There is no concept of schema_version and manifest in general for V1 content. For V1 content you have concept of image and parent ids.<br><br></div>So when you are querying collections like units_docker_tag or units_docker_manifest these are related *just* to V2 content. Which consists of schema version 1 and schema version 2.<br><br></div>Back to your question about what changes have been made for Pulp data model.<br><br></div>Manifest model has a new field called 'confg_layer' . This layer appears in specs for  V2 content schema version 2.<br><br></div>Tag model has a new field 'schema_version'. Because there could be tags referencing V2 content schema version 2 and V2 content schema version 1 and we need to distinguish them.<br></div>This will also facilitate,for example, copy operation to avoid confusion. Same for tag removal operation.<br><br></div>If you take a look at specs for V1 and V2 content I think it will help you to understand more the concepts and clear the confusion.<br><br></div>V1 specs <a href="https://github.com/moby/moby/blob/master/image/spec/v1.md">https://github.com/moby/moby/blob/master/image/spec/v1.md</a><br></div>V2 specs <a href="https://docs.docker.com/registry/spec/manifest-v2-1/">https://docs.docker.com/registry/spec/manifest-v2-1/</a><br>               <a href="https://docs.docker.com/registry/spec/manifest-v2-2/">https://docs.docker.com/registry/spec/manifest-v2-2/</a><br><br></div>Since you say Katello uses just V2, the collections and models  you should care are - blobs, tags, manifests.<br><br><br>----> Yet when I synced busy box I see manifests with schema-verision = 1.  Shouldnt it be only showing stuff with schema-version=2 ??<br><br></div>With the support of schema version 2, when you sync busybox, Pulp will query Registry for manifests with tags which reference both schema version 1 and 2 and save those to DB<br></div>Again, these above stated concepts are related just to V2 content.<br><br><br></div>Let me know if you have further questions, I will be happy to answer those.<br><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><br>--------<br>Regards,<br><br>Ina Panova<br>Software Engineer| Pulp| Red Hat Inc.<br><br>"Do not go where the path may lead,<br> go instead where there is no path and leave a trail."<br></div></div></div>
<br><div class="gmail_quote">On Thu, May 4, 2017 at 11:58 PM, Partha Aji <span dir="ltr"><<a href="mailto:paji@redhat.com" target="_blank">paji@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I was trying to figure out pulp's data model changes with respect to DockerV2 Schema2. Looking at <a href="https://github.com/pulp/pulp_docker/commit/35dc19c8522f840d464bec2e93f45b4bb57b4f80#diff-6c740284d714e1a0349c86bed5617b76" target="_blank">https://github.com/pulp/pulp_<wbr>docker/commit/<wbr>35dc19c8522f840d464bec2e93f45b<wbr>4bb57b4f80#diff-<wbr>6c740284d714e1a0349c86bed5617b<wbr>76</a> I only see schema-version column added to tags and no changes in the manifest collection. But in the database I see the following<br>For manifests there is a schema_version column<br><br><blockquote>> db.units_docker_manifest.find(<wbr>)[0]<br>{<br>  "_id" : "582cb097-5c81-499a-adec-<wbr>5d18470014f5",<br>  "pulp_user_metadata" : {<br>    <br>  },<br>  "_last_updated" : 1487212925,<br>  "_storage_path" : "/var/lib/pulp/content/units/<wbr>docker_manifest/9e/<wbr>2aadfbd6d73d35bddbf2db29255030<wbr>47fc84fdcba439f4069c80ceaca37f<wbr>02/sha256:<wbr>b5dd2db609f090a39b65a39489eb3e<wbr>b670f559af40fc5d206b2a05451355<wbr>ba72",<br>  "downloaded" : true,<br>  "digest" : "sha256:<wbr>b5dd2db609f090a39b65a39489eb3e<wbr>b670f559af40fc5d206b2a05451355<wbr>ba72",<br>  "name" : "library/busybox",<br>  "tag" : "1-glibc",<br>  "schema_version" : 1,<br>  "fs_layers" : [<br>    {<br>      "blob_sum" : "sha256:<wbr>a3ed95caeb02ffe68cdd9fd8440668<wbr>0ae93d633cb16422d00e8a7c22955b<wbr>46d4"<br>    },<br>    {<br>      "blob_sum" : "sha256:<wbr>df74c0cea8ad6b25004db74b9829d5<wbr>13990ac7e219128594eb2b7df2d785<wbr>f961"<br>    }<br>  ],<br>  "_ns" : "units_docker_manifest",<br>  "_content_type_id" : "docker_manifest"<br>}<br></blockquote><br>And for tags there is one also.<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> db.units_docker_tag.find()[0]<br>{<br>  "_id" : "cc3d103d-f6ab-4efd-a936-<wbr>e99dfc43691d",<br>  "repo_id" : "dd8fa453-9923-4fc1-99b6-<wbr>8137a2bb5bf3",<br>  "manifest_digest" : "sha256:<wbr>3e00695ae65afe08d3cc4e1c0bc4ef<wbr>b335e9c158c9b5a5f7c045c9ec380c<wbr>731b",<br>  "_ns" : "units_docker_tag",<br>  "_last_updated" : 1487212925,<br>  "schema_version" : 1,<br>  "pulp_user_metadata" : {<br>    <br>  },<br>  "_content_type_id" : "docker_tag",<br>  "name" : "1.24.2-glibc"<br>}<br></blockquote><br><br>I am I assuming correctly when I say "schema-version" in "units_docker_manifest" refers to api version V1 vs V2 while  "schema-version" in "units_docker_tag" refers to schema-version1 vs schema-version 2 ?<br><br>If my assumption is correct then I have a diff issue. Katello typically says "use v2 only" when creating a repo. Yet when I synced busy box I see manifests with schema-verision = 1.  Shouldnt it be only showing stuff with schema-version=2 ??<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br></blockquote></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>