I had thought about trying to use LoggerFileObject in swift-init, but of course the exec'd processes had their own agenda for sys.stdout. I hadn't thought about modifying the daemon.run and run_wsgi code to be more aggressive about closing stdio (althought maybe they should flush?)...
Hrmm... doing a fork and exec with out closing stdout... leaving child processes open to spewing errors out and about your console after swift-init has terminated...
You may be right that's it's better than getting blackholed, but I hadn't thought of that. Or maybe I'm misinterpreting your comment?
Another idea I had was to setup a default root logger if there's a problem with the conf and log errors on that instead of printing?
Another error that seemed to get lost was in validate_configuration - it was calling sys.exit("error message") after stderr redirection, but it didn't show up in syslog? Changing to print "error message"; sys.exit(1) seems to work just fine. I'm not really sure why it didn't get logged before...
I had thought about trying to use LoggerFileObject in swift-init, but of course the exec'd processes had their own agenda for sys.stdout. I hadn't thought about modifying the daemon.run and run_wsgi code to be more aggressive about closing stdio (althought maybe they should flush?)...
Hrmm... doing a fork and exec with out closing stdout... leaving child processes open to spewing errors out and about your console after swift-init has terminated...
clayg@swift:~$ swift-init object start server. ..(1269 - /etc/swift/ object- server/ 1.conf) server. ..(1270 - /etc/swift/ object- server/ 2.conf) server. ..(1271 - /etc/swift/ object- server/ 3.conf) server. ..(1272 - /etc/swift/ object- server/ 4.conf) object- server/ 1.conf: File contains no section headers. object- server/ 1.conf, line: 1
WARNING: Unable to increase file descriptor limit. Running as non-root?
Starting object-
Starting object-
Starting object-
Starting object-
clayg@swift:~$
clayg@swift:~$
clayg@swift:~$ Error trying to load config /etc/swift/
file: /etc/swift/
'DEFAULT]\n'
clayg@swift:~$
You may be right that's it's better than getting blackholed, but I hadn't thought of that. Or maybe I'm misinterpreting your comment?
Another idea I had was to setup a default root logger if there's a problem with the conf and log errors on that instead of printing?
Another error that seemed to get lost was in validate_ configuration - it was calling sys.exit("error message") after stderr redirection, but it didn't show up in syslog? Changing to print "error message"; sys.exit(1) seems to work just fine. I'm not really sure why it didn't get logged before...