Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrepo: Remove temporary reposync config files before raising exceptions #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clayne
Copy link

@clayne clayne commented Jul 6, 2014

If a single file/fetch fails during a reposync, mrepo will raise an
exception over it (and continue) but will not cleanup the temporary
config.

Results in this:

$ ls -la /tmp/tmp* | tail
-rw------- 1 root root 133 Jun 29 23:15 /tmp/tmpzCRrbK
-rw------- 1 root root 133 Jun 26 22:45 /tmp/tmpzCdtxq
-rw------- 1 root root 133 Jul  6 04:15 /tmp/tmpzJ2rdp
-rw------- 1 root root 133 Jul  2 16:30 /tmp/tmpzKc_s5
-rw------- 1 root root 133 Jun 27 14:15 /tmp/tmpzW4E_h
-rw------- 1 root root 133 Jul  6 15:30 /tmp/tmpzhzBuJ
-rw------- 1 root root 133 Jun 27 07:45 /tmp/tmpziEzGo
-rw------- 1 root root 133 Jun 26 03:30 /tmp/tmpzkp3Ym
-rw------- 1 root root 133 Jun 26 19:30 /tmp/tmpztKB57
-rw------- 1 root root 133 Jul  5 12:15 /tmp/tmpztbK9i
$ ls -la /tmp/tmp* | wc -l
1039
$ sudo cat /tmp/tmpztbK9i
[EnterpriseLinux5-x86_64-percona]
name=EnterpriseLinux5-x86_64-percona
baseurl=http://repo.percona.com/centos/5/os/x86_64/
enabled=1

If a single file/fetch fails during a reposync, mrepo will raise an
exception over it (and continue) but will not cleanup the temporary
config.

Results in this:

$ ls -la /tmp/tmp* | tail
-rw------- 1 root root 133 Jun 29 23:15 /tmp/tmpzCRrbK
-rw------- 1 root root 133 Jun 26 22:45 /tmp/tmpzCdtxq
-rw------- 1 root root 133 Jul  6 04:15 /tmp/tmpzJ2rdp
-rw------- 1 root root 133 Jul  2 16:30 /tmp/tmpzKc_s5
-rw------- 1 root root 133 Jun 27 14:15 /tmp/tmpzW4E_h
-rw------- 1 root root 133 Jul  6 15:30 /tmp/tmpzhzBuJ
-rw------- 1 root root 133 Jun 27 07:45 /tmp/tmpziEzGo
-rw------- 1 root root 133 Jun 26 03:30 /tmp/tmpzkp3Ym
-rw------- 1 root root 133 Jun 26 19:30 /tmp/tmpztKB57
-rw------- 1 root root 133 Jul  5 12:15 /tmp/tmpztbK9i
$ ls -la /tmp/tmp* | wc -l
1039
$ sudo cat /tmp/tmpztbK9i
[EnterpriseLinux5-x86_64-percona]
name=EnterpriseLinux5-x86_64-percona
baseurl=http://repo.percona.com/centos/5/os/x86_64/
enabled=1
@clayne
Copy link
Author

clayne commented Feb 28, 2016

Any chance this can be merged? It's been sitting here for almost 2 years. We've already implemented the change in our own fork and there are zero issues. This fixes an actual bug in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant