Actions
Issue #8333
closedDates on the repo and units are updated in inconsistent way among plugins during sync operation
Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Sync file repo with on_demand policy https://fixtures.pulpproject.org/file2/
> db.repos.find({"repo_id":"file2"})
{ "_id" : ObjectId("603fbb43c998ac46756c73a6"), "repo_id" : "file2", "notes" : { "_repo-type" : "iso-repo" }, "scratchpad" : { }, "content_unit_counts" : { "iso" : 3 }, "_ns" : "repos", "last_unit_added" : ISODate("2021-03-03T16:37:27.306Z") }
> db.repo_content_units.find({"repo_id":"file2"})
{ "_id" : ObjectId("603fbb472f2c962e7cb81ecd"), "repo_id" : "file2", "unit_id" : "6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa", "unit_type_id" : "iso", "updated" : "2021-03-03T16:37:27Z", "created" : "2021-03-03T16:37:27Z" }
{ "_id" : ObjectId("603fbb472f2c962e7cb81ec1"), "repo_id" : "file2", "unit_id" : "b8ba2c18-5245-4768-a83d-3b1deed731d2", "unit_type_id" : "iso", "updated" : "2021-03-03T16:37:27Z", "created" : "2021-03-03T16:37:27Z" }
{ "_id" : ObjectId("603fbb472f2c962e7cb81eb2"), "repo_id" : "file2", "unit_id" : "fb1b22be-80d6-4300-b132-64a3bed598f0", "unit_type_id" : "iso", "updated" : "2021-03-03T16:37:27Z", "created" : "2021-03-03T16:37:27Z" }
> db.units_iso.find({'_id':'6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa'})[0]
{
"_id" : "6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa",
"pulp_user_metadata" : {
},
"_last_updated" : 1614789447,
"_storage_path" : "/var/lib/pulp/content/units/iso/8e/70eee79a97f7ed85f1d020dfcfb520b5b08fb0605f6a51b88645f6bee37e2f",
"downloaded" : false,
"name" : "2.iso",
"checksum" : "ef1845a0afeb51fb147d41c2494044e15db09c13d3ba096713b0ef1ee5896b29",
"size" : 1024,
"_ns" : "units_iso",
"_content_type_id" : "iso"
}
> ^C
Change policy to immediate and sync
> db.repos.find({"repo_id":"file2"})
{ "_id" : ObjectId("603fbb43c998ac46756c73a6"), "repo_id" : "file2", "notes" : { "_repo-type" : "iso-repo" }, "scratchpad" : { }, "content_unit_counts" : { "iso" : 3 }, "_ns" : "repos", "last_unit_added" : ISODate("2021-03-03T16:48:57.995Z"), "last_unit_removed" : ISODate("2021-03-03T16:48:57.073Z") }
db.repo_content_units.find({'repo_id':'file2'})
{ "_id" : ObjectId("603fbdf82f2c962e7cb83e79"), "repo_id" : "file2", "unit_id" : "6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa", "unit_type_id" : "iso", "updated" : "2021-03-03T16:48:56Z", "created" : "2021-03-03T16:48:56Z" }
{ "_id" : ObjectId("603fbdf92f2c962e7cb83e9f"), "repo_id" : "file2", "unit_id" : "b8ba2c18-5245-4768-a83d-3b1deed731d2", "unit_type_id" : "iso", "updated" : "2021-03-03T16:48:57Z", "created" : "2021-03-03T16:48:57Z" }
{ "_id" : ObjectId("603fbdf92f2c962e7cb83e90"), "repo_id" : "file2", "unit_id" : "fb1b22be-80d6-4300-b132-64a3bed598f0", "unit_type_id" : "iso", "updated" : "2021-03-03T16:48:57Z", "created" : "2021-03-03T16:48:57Z" }
>
> db.units_iso.find({'_id':'6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa'})[0]
{
"_id" : "6ba4ab8f-23fc-41bb-bc33-0aa9a7e0d5fa",
"pulp_user_metadata" : {
},
"_last_updated" : 1614789447,
"_storage_path" : "/var/lib/pulp/content/units/iso/8e/70eee79a97f7ed85f1d020dfcfb520b5b08fb0605f6a51b88645f6bee37e2f",
"downloaded" : false,
"name" : "2.iso",
"checksum" : "ef1845a0afeb51fb147d41c2494044e15db09c13d3ba096713b0ef1ee5896b29",
"size" : 1024,
"_ns" : "units_iso",
"_content_type_id" : "iso"
}
>
Note couple of things after second sync
-
last_unit_added
andlast_unit_removed
has been updated in the second sync on the repo - updated and
created
dates have been updated on the repo_content_units table - the
iso_unit
itself did not change, downloaded flag was not flipped,_last_updated
stays the same.
If comparing this behaviour with rpm_plugin, here are the results before and after policy switch.
> db.repos.find()
{ "_id" : ObjectId("603f9919c998ac29566e3f59"), "repo_id" : "rpm_unsigned", "notes" : { "_repo-type" : "rpm-repo" }, "scratchpad" : { "checksum_type" : "sha256" }, "content_unit_counts" : { "package_group" : 2, "package_langpacks" : 1, "package_category" : 1, "rpm" : 35, "erratum" : 4 }, "_ns" : "repos", "last_unit_added" : ISODate("2021-03-03T14:11:53.632Z") }
> db.repo_content_units.find({'repo_id':'rpm_unsigned'})[10]
{
"_id" : ObjectId("603f99252f2c962e7cb70834"),
"repo_id" : "rpm_unsigned",
"unit_id" : "0bd85d0c-f9be-4a53-9fc7-8c21821682ea",
"unit_type_id" : "rpm",
"updated" : "2021-03-03T14:11:49Z",
"created" : "2021-03-03T14:11:49Z"
}
>
db.units_rpm.find({'_id':'0bd85d0c-f9be-4a53-9fc7-8c21821682ea'} )
{ "_id" : "0bd85d0c-f9be-4a53-9fc7-8c21821682ea", "pulp_user_metadata" : { }, "_last_updated" : 1614780713, "_storage_path" : "/var/lib/pulp/content/units/rpm/7e/9414f1ed6776df9e89bb322002169d89aa678c7a5d947ff762056954a2c6a7/duck-0.6-1.noarch.rpm", "downloaded" : false, "checksum" : "96f37877518a1fe6ea2e17f4ce1fc81b40908043bcbed76744b3d7d38a774bc7", "checksumtype" : "sha256", "checksums" : { "sha256" : "96f37877518a1fe6ea2e17f4ce1fc81b40908043bcbed76744b3d7d38a774bc7" }, "version_sort_index" : "01-0.01-6", "release_sort_index" : "01-1", "name" : "duck", "epoch" : "0", "version" : "0.6", "release" : "1", "arch" : "noarch", "build_time" : 1331831373, "buildhost" : "smqe-ws15", "size" : 1871, "filename" : "duck-0.6-1.noarch.rpm", "relativepath" : "duck-0.6-1.noarch.rpm", "group" : "Internet/Applications", "provides" : [ { "release" : "1", "epoch" : "0", "version" : "0.6", "flags" : "EQ", "name" : "duck" } ], "files" : { "file" : [ "/tmp/duck.txt" ], "dir" : [ ] }, "repodata" : { "filelists" : BinData(0,"eJwtTUsOgyAQ3XOKyTuA025cAXchOFWCAqG0aWK8e8V29X4z7+nifHSzkKt+MUi5Iyi5TQyml4+gEucwGez7j9FxwCoi/Zb6DDmRlNxfb6Aqq8EddCanHkYQX5ePsIrlthXujUP7NM2XpzT/9636AiWFK4M="), "other" : BinData(0,"eJwtjT0OgCAYQ3dO0fQA/ixOwF0IfkGDAsHoYry7Gp3al+alujgfXRC46ifDlN8kklvFcNx9JEoM82h4nl/DddEqQB9StzknSMmv2hFVFsOeeJaHm4FordLtf2HVDbuEIfI="), "primary" : BinData(0,"eJx1U01v2zAMvfdXCLoniuMsyQrbQA/FMGCHDjvtqMm0LUS2VErOkBX976P8MXtbe7L49PhIPsqZk+oia2Dh5iDn6Fpe3DGWdbKFouzVJRPDMWISVVN0Nn4yMQQRvQJ6bTsGzqom5zvOEEzOE87ohuLtkTMxMFUD6uL7lrlLrcucf3/8xqe6Ly9svo0Ae33lxQqjOBNzMGjRt5V4Kx5YSacbm8ewFRu7ngmRXIJXqF2gNt9PWJNi0kTAqfkeTdGE4O6FCD6gVI0NcltBaVE6sM7A1mKdiciL/KBbYD96bWjQJE2Tc5qkp5SzShuaNzkmh/1xlx5Oszle/wIWTdVXut9/JNd054M0BkjhsOdzx5R8PiVzmrFKxpZZg1Dl/GnkeFGKONWG3N8k23Fn27jcMauy2MoQjxQQfG+0gs5D8enpy3WfiTW0kK7Q0bRj4Qmq0fau+NwFwA6CeHCO0oaG/KgyEpaEwZHG+lD49hk2P33yYSQuFwvZ2x4V0KlYDeNRxUnGrIWxZDUgS8ANyo7WSy2TYac9GUZmYiBrzzv+1wwO7VXT9kdoAqELeFu96crI2uf88Stn8X/Ieezo3adOIuJ/6UEY4bnX+Ga1UVhZWmEAMH+03iAZcvifWmvhTMwbzsT0bIq736CBPYc=") }, "description" : "A dummy package of duck", "header_range" : { "start" : 280, "end" : 1721 }, "sourcerpm" : "duck-0.6-1.src.rpm", "license" : "GPLv2", "changelog" : [ ], "url" : "http://tstrachota.fedorapeople.org", "summary" : "A dummy package of duck", "time" : 1614260347, "requires" : [ { "release" : null, "epoch" : null, "version" : null, "flags" : null, "name" : "cockateel" }, { "release" : null, "epoch" : null, "version" : null, "flags" : null, "name" : "lion" } ], "recommends" : [ ], "_ns" : "units_rpm", "_content_type_id" : "rpm", "is_modular" : false }
After 2nd sync
> db.repos.find()
{ "_id" : ObjectId("603f9919c998ac29566e3f59"), "repo_id" : "rpm_unsigned", "notes" : { "_repo-type" : "rpm-repo" }, "scratchpad" : { "checksum_type" : "sha256" }, "content_unit_counts" : { "package_group" : 2, "package_langpacks" : 1, "package_category" : 1, "rpm" : 35, "erratum" : 4 }, "_ns" : "repos", "last_unit_added" : ISODate("2021-03-03T14:11:53.632Z") }
> db.repo_content_units.find({'repo_id':'rpm_unsigned'})[10]
{
"_id" : ObjectId("603f99252f2c962e7cb70834"),
"repo_id" : "rpm_unsigned",
"unit_id" : "0bd85d0c-f9be-4a53-9fc7-8c21821682ea",
"unit_type_id" : "rpm",
"updated" : "2021-03-03T14:17:04Z",
"created" : "2021-03-03T14:11:49Z"
}
{ "_id" : "0bd85d0c-f9be-4a53-9fc7-8c21821682ea", "pulp_user_metadata" : { }, "_last_updated" : 1614781024, "_storage_path" : "/var/lib/pulp/content/units/rpm/7e/9414f1ed6776df9e89bb322002169d89aa678c7a5d947ff762056954a2c6a7/duck-0.6-1.noarch.rpm", "downloaded" : true, "checksum" : "96f37877518a1fe6ea2e17f4ce1fc81b40908043bcbed76744b3d7d38a774bc7", "checksumtype" : "sha256", "checksums" : { "sha256" : "96f37877518a1fe6ea2e17f4ce1fc81b40908043bcbed76744b3d7d38a774bc7" }, "version_sort_index" : "01-0.01-6", "release_sort_index" : "01-1", "name" : "duck", "epoch" : "0", "version" : "0.6", "release" : "1", "arch" : "noarch", "build_time" : 1331831373, "buildhost" : "smqe-ws15", "size" : 1871, "filename" : "duck-0.6-1.noarch.rpm", "relativepath" : "duck-0.6-1.noarch.rpm", "group" : "Internet/Applications", "provides" : [ { "release" : "1", "epoch" : "0", "version" : "0.6", "flags" : "EQ", "name" : "duck" } ], "files" : { "file" : [ "/tmp/duck.txt" ], "dir" : [ ] }, "repodata" : { "filelists" : BinData(0,"eJwtTUsOgyAQ3XOKyTuA025cAXchOFWCAqG0aWK8e8V29X4z7+nifHSzkKt+MUi5Iyi5TQyml4+gEucwGez7j9FxwCoi/Zb6DDmRlNxfb6Aqq8EddCanHkYQX5ePsIrlthXujUP7NM2XpzT/9636AiWFK4M="), "other" : BinData(0,"eJwtjT0OgCAYQ3dO0fQA/ixOwF0IfkGDAsHoYry7Gp3al+alujgfXRC46ifDlN8kklvFcNx9JEoM82h4nl/DddEqQB9StzknSMmv2hFVFsOeeJaHm4FordLtf2HVDbuEIfI="), "primary" : BinData(0,"eJx1U01v2zAMvfdXCLoniuMsyQrbQA/FMGCHDjvtqMm0LUS2VErOkBX976P8MXtbe7L49PhIPsqZk+oia2Dh5iDn6Fpe3DGWdbKFouzVJRPDMWISVVN0Nn4yMQQRvQJ6bTsGzqom5zvOEEzOE87ohuLtkTMxMFUD6uL7lrlLrcucf3/8xqe6Ly9svo0Ae33lxQqjOBNzMGjRt5V4Kx5YSacbm8ewFRu7ngmRXIJXqF2gNt9PWJNi0kTAqfkeTdGE4O6FCD6gVI0NcltBaVE6sM7A1mKdiciL/KBbYD96bWjQJE2Tc5qkp5SzShuaNzkmh/1xlx5Oszle/wIWTdVXut9/JNd054M0BkjhsOdzx5R8PiVzmrFKxpZZg1Dl/GnkeFGKONWG3N8k23Fn27jcMauy2MoQjxQQfG+0gs5D8enpy3WfiTW0kK7Q0bRj4Qmq0fau+NwFwA6CeHCO0oaG/KgyEpaEwZHG+lD49hk2P33yYSQuFwvZ2x4V0KlYDeNRxUnGrIWxZDUgS8ANyo7WSy2TYac9GUZmYiBrzzv+1wwO7VXT9kdoAqELeFu96crI2uf88Stn8X/Ieezo3adOIuJ/6UEY4bnX+Ga1UVhZWmEAMH+03iAZcvifWmvhTMwbzsT0bIq736CBPYc=") }, "description" : "A dummy package of duck", "header_range" : { "start" : 280, "end" : 1721 }, "sourcerpm" : "duck-0.6-1.src.rpm", "license" : "GPLv2", "changelog" : [ ], "url" : "http://tstrachota.fedorapeople.org", "summary" : "A dummy package of duck", "time" : 1614260347, "requires" : [ { "release" : null, "epoch" : null, "version" : null, "flags" : null, "name" : "cockateel" }, { "release" : null, "epoch" : null, "version" : null, "flags" : null, "name" : "lion" } ], "recommends" : [ ], "_ns" : "units_rpm", "_content_type_id" : "rpm", "is_modular" : false }
Note couple of things after second sync
-
last_unit_added/removed
has NOT been updated in the second sync on the repo - updated only date have been updated on the repo_content_units table
- the
rpm_unit
itself did change, downloaded flag was flipped,_last_updated
changed
Updated by dalley about 3 years ago
- Status changed from NEW to CLOSED - WONTFIX
- Triaged changed from No to Yes
Actions