Project

Profile

Help

Issue #833

Updated by cduryee almost 9 years ago

During testing of a different patch, Justin Sherrill discovered that some errata were not being applied to systems. This was only occurring for errata on older Pulp installations (i.e., with package lists that did repos synced from awhile back, not contain an epoch. Example metadata: necessarily older versions of Pulp). 

 <pre><code class="xml"> 
 <package arch="noarch" name="foo-package" release="8.el7ev" src="foo-package.src.rpm" version="1.0.9"> 
   <filename>foo-package.noarch.rpm</filename> 
 </package> 
 </code></pre> 

 Note It turns out that some older Pulp installations have incorrect information for previously synced errata. Specifically the lack of "epoch" field on packages in the package XML attributes. erratum's pkglist is set to 'null'. This could possibly be from a bug in createrepo_c that was fixed by https://github.com/Tojaj/createrepo_c/commit/d1cfae956a4cf. 

 The 'null' epoch causes Pulp should default to use '0' when not be able to find a packages listed in the epoch does not exist. erratum since it searches in its RPM units collection using the full NVREA. 

 Note that this bug can be difficult to reproduce since most repos are made using a newer createrepo_c nowadays. I will create a testing repo that can reproduce this issue once I verify that the cause was indeed the older createrepo_c. 

 Update with additional info: errata are occasionally repushed with new metadata, keeping the same erratum ID. We need to compare the 'updated' date in the erratum against what we have stored in the DB. If it is newer, we need to update the erratum's metadata. This may cause issues with pkglist concatenation so we may need to be smart about what gets updated vs what gets appended.

Back