Project

Profile

Help

Story #1684

Updated by bmbouter about 7 years ago

When publishing, Pulp doesn't keep old repodata files, when metadata is changed, Pulp generates additive or completely new content of “repodata” directory. In both cases with checksums enabled, any change to the metadata contents results in a completely new filename since the checksum is the first portion of the filename. 

 Yum as a client caches the repomd.xml for some period of time, which names these files in the repodata directory which have checksums on them. Upon republish, older publish metadata should be left in tact so they can be found by a cached repomd.xml file. Old repodata files are kept up to 6 hours 14 days by default on Yum, so Pulp should clean up old metadata files older than 6 hours. Yum has this configuration in yum.conf as the <code>metadata_expire</code> which is the time (in seconds) after which the metadata will expire. 

 14 days. This will should be a new option configurable on the "Yum Distributor":http://docs.pulpproject.org/plugins/pulp_rpm/tech-reference/yum-plugins.html#yum-distributor named <code>metadata_retention_hours</code> distributor as metadata_retention_days specifying how long an integer number of days metadata should be retained in hours. retained. This value may also be set to 0 which causes old repo metadata to be removed immediately on publish. This feature should default to 6 hours to align with the yum default. 

 Note that old metadata cannot be modified because its checksum would likely change which defeats the point of this feature. It should be left alone. 

 Because of this, no attempt shall be made to update old metadata if packages are not found. In that case the yum client will receive a 404 which it can handle. 

 Perhaps for backwards compatibility, the default for this feature should be 0 which was the old behavior.

Back