Project

Profile

Help

Issue #3162

Updated by daviddavis about 7 years ago

We had an issue where a reference in an updateinfo.xml file didn't have an href attribute: 

 <pre> 
   <reference type="other" id="ref_0" title="other_reference_0" /> 
 </pre> 

 Pulp simply threw an "Importer indicated a failed response" error and wasn't able to sync the repository. The backtrace wasn't particularly helpful either (<code> File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 88, in _parse_reference 
     'href': element.attrib['href'], 
 KeyError: 'href' 
  </code>). 

 First, maybe we can make Pulp more resilient so that if an attribute is undefined, it won't fail. I'm a bit ambivalent about this solution since release engineering is going to fix it on their end by ensuring href is defined. 

 Second, we probably need better logging. Particularly, it would be helpful in our parsing code to know where in the file our code is choking. It took us a couple hours to figure out the particular erratum in this case that caused the problem. 

 Related BZs: 
 * https://bugzilla.redhat.com/show_bug.cgi?id=1519564 
 * https://bugzilla.redhat.com/show_bug.cgi?id=1503916

Back