When an operation fails, the exit code from pulp-admin should be non-zero. For a failed sync, it is 0 as seen below. [mhrivnak@dhcp-230-147 testing]$ pulp-admin rpm repo create --repo-id=foo --feed='http://kfhgksdghkerhglfd.com' Successfully created repository [foo] [mhrivnak@dhcp-230-147 testing]$ pulp-admin rpm repo sync run --repo-id=foo +----------------------------------------------------------------------+ Synchronizing Repository [foo] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [\] ... failed HTTPConnectionPool(host='khkdg.com', port=80): Max retries exceeded with url: /repodata/repomd.xml (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known) [mhrivnak@dhcp-230-147 testing]$ echo $? 0
https://github.com/pulp/pulp/pull/526
build: 2.3.0-0.10.alpha
[root@pulp-v2-server ~]# rpm -qa pulp-server pulp-server-2.3.0-0.14.alpha.el6.noarch [root@pulp-v2-server ~]# [root@pulp-v2-server ~]# pulp-admin rpm repo create --repo-id=foo --feed='http://kfhgksdghkerhglfd.com' Successfully created repository [foo] [root@pulp-v2-server ~]# pulp-admin rpm repo sync run --repo-id=foo +----------------------------------------------------------------------+ Synchronizing Repository [foo] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [\] ... failed [Errno -2] Name or service not known [root@pulp-v2-server ~]# echo $? 1 [root@pulp-v2-server ~]#
Pulp 2.3 released.