Bug 1403389

Summary: when cdn-sync fails because of "21:18:45 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: .... Please verify its path and try again" it returns 0
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: Satellite SynchronizationAssignee: Gennadii Altukhov <galtukho>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 580CC: galtukho, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-13 16:23:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1340444    

Description Jan Hutař 2016-12-09 22:40:50 UTC
Description of problem:
When cdn-sync fails because of "21:18:45 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: .... Please verify its path and try again" it returns exit code 0. IMO this can be a problem for automated scripts whose logic might depend on exit code of the cdn-sync.


Version-Release number of selected component (if applicable):
spacewalk-backend-cdn-2.5.3-34.el6sat.noarch


How reproducible:
rarely


Steps to Reproduce:
1. Run cdn-sync and make it return that error (maybe by setting wrong IP for cd.redhat.com in /etc/hosts?)


Actual results:
# cdn-sync -c rhel-x86_64-server-7
21:18:46 ======================================
21:18:46 | Channel: rhel-x86_64-server-7
21:18:46 ======================================
21:18:46 Sync of channel started.
21:18:46 Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os
21:18:46 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-7-server-rpms__7Server__x86_64. Please verify its path and try again
21:18:46 Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/kickstart
21:18:46 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: ks-rhel-x86_64-server-7-7.1. Please verify its path and try again
21:18:46 Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/7.2/x86_64/kickstart
21:18:46 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: ks-rhel-x86_64-server-7-7.2. Please verify its path and try again
21:18:46 Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/7.0/x86_64/kickstart
21:18:46 ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: ks-rhel-x86_64-server-7-7.0. Please verify its path and try again
21:18:46 Sync of channel completed in 0:00:00.
21:18:46 Total time: 0:00:00
# echo $?
0


Expected results:
Should return non-0 exit code

Comment 2 Gennadii Altukhov 2016-12-13 16:23:55 UTC

*** This bug has been marked as a duplicate of bug 1397427 ***