Description of problem: Beakerd fails to start succesfully on Fedora 17 (Python 2.7). Version-Release number of selected component (if applicable): Pulled form Git repository. How reproducible: Easy. Steps to Reproduce: 1. Follow the install guide from http://beaker-project.org/guide/Installation-Install_Beaker-Start_Beaker.html 2. Once the beaker server has been installed, run the beaker server in the foreground as 'apache' user. You should see the stacktrace. See below. Actual results: [root@fedora17 ~]# su -s /bin/sh apache -c "beakerd -f" Traceback (most recent call last): File "/usr/bin/beakerd", line 9, in <module> load_entry_point('bkr.server==0.9.3', 'console_scripts', 'beakerd')() File "/usr/lib/python2.7/site-packages/bkr/server/tools/beakerd.py", line 650, in main schedule() File "/usr/lib/python2.7/site-packages/bkr/server/tools/beakerd.py", line 524, in schedule reload_config() File "/usr/lib/python2.7/site-packages/bkr/server/tools/beakerd.py", line 599, in reload_config handler.flush() AttributeError: 'weakref' object has no attribute 'flush' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib64/python2.7/logging/__init__.py", line 1648, in shutdown h.release() File "/usr/lib/python2.7/site-packages/cloghandler.py", line 194, in release self.stream.flush() ValueError: I/O operation on closed file Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib64/python2.7/logging/__init__.py", line 1648, in shutdown h.release() File "/usr/lib/python2.7/site-packages/cloghandler.py", line 194, in release self.stream.flush() ValueError: I/O operation on closed file Expected results: Successful beakerd instance running. Additional info: The RPMs I used for installing was custom built for Fedora and is not available publicly at this moment.
Created attachment 613548 [details] Proposed patch for discussion Python 2.7 logging stores the logging handlers as weakref's whereas Python 2.6 logging stors the actual objects. Relevant source references: Python 2.6: http://hg.python.org/cpython/file/f130ce67387d/Lib/logging/__init__.py#l597 Python 2.7: http://hg.python.org/cpython/file/820032281f49/Lib/logging/__init__.py#l663 Hence, the above change is required to retrieve the handler object from the weak reference.
Submitted Gerrit patch review: http://gerrit.beaker-project.org/#/c/1352/
Beaker 0.9.4 has been released.