Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

#381 closed defect (fixed)

Specific error path that causes the slave to stop

Reported by: edgewall.org@… Owned by: cmlenz
Priority: minor Milestone: 0.6
Component: General Version: dev
Keywords: Cc:
Operating System: Linux

Description

One of my slaves stopped today with the following error:

  File "/usr/local/bin/bitten-slave", line 8, in <module>
    load_entry_point('Bitten==0.6dev-r567', 'console_scripts', 'bitten-slave')()
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 404, in main
    exit_code = slave.run()
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 160, in run
    job_done = self._create_build(url)
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 207, in _create_build
    self._initiate_build(resp.info().get('location'))
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 221, in _initiate_build
    self._execute_build(build_url, resp)
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 252, in _execute_build
    _rmtree(basedir)
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 47, in _rmtree  
    return shutil.rmtree(root, onerror=_handle_error)
  File "/usr/local/lib/python2.5/shutil.py", line 161, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py", line 45, in _handle_error
    os.chmod(path, 0666)
OSError: [Errno 2] No such file or directory: '/tmp/bitten3LnIGa/build_toolkit-release_2568'

No matter the error, it shouldn't have caused it to stop. I would suggest the following patch (but maybe there's a better one)

diff -u /usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py /usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py-original
--- /usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py 2009-04-02 09:59:50.000000000 -0700
+++ /usr/local/lib/python2.5/site-packages/Bitten-0.6dev_r567-py2.5.egg/bitten/slave.py-original        2009-03-12 11:33:43.000000000 -0700
@@ -44,8 +44,7 @@
     def _handle_error(fn, path, excinfo):
        os.chmod(path, 0666)
        fn(path)
-    if os.path.exists(root):
-       return shutil.rmtree(root, onerror=_handle_error)
+    return shutil.rmtree(root, onerror=_handle_error)

 class SaneHTTPErrorProcessor(urllib2.HTTPErrorProcessor):
     "The HTTPErrorProcessor defined in urllib needs some love."

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by anonymous

  • Version changed from 0.5.3 to dev

comment:2 Changed 12 years ago by dfraser

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, applied this with r623

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.