Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Push to public does not handle failed rsyncs #28

Closed
jness opened this issue Nov 20, 2012 · 0 comments
Closed

Push to public does not handle failed rsyncs #28

jness opened this issue Nov 20, 2012 · 0 comments

Comments

@jness
Copy link

jness commented Nov 20, 2012

Noticed a failed rsync on our Jenkins server, however the job was marked as success.

This is do to the push to public functionality not checking for a successful rsync:

 2012-11-19 22:52:17,142 (INFO) iustools.controllers.admin : pushing changes to      dl.iuscommunity.org:/exports/pub/
 ssh: connect to host dl.iuscommunity.org port 22: No route to host
 rsync: connection unexpectedly closed (0 bytes received so far) [sender]
 rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]
 2012-11-19 22:52:17,783 (INFO) iustools.controllers.admin : appending archive to      exclude list

The code uses os.system to perform its rsync:

https://github.com/rackspace/ius-tools/blob/master/src/iustools.admin/iustools/controllers/admin.py#L130-L140

Python will return the Linux return status code on os.system,
we should check the return is a successful 0 status:

http://docs.python.org/2/library/os.html#os.system

@jness jness closed this as completed in 9676289 Nov 20, 2012
jness pushed a commit that referenced this issue Dec 10, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant