History | View | Annotate | Download (12.1 kB)
Unify SetupDaemon/SetupLogging
The 'old-style' info, error, debug logs do not make much sense. Thispatch unifies the SetupLogging and SetupDaemon functions. As a result,all the commands logs to a 'commands.log' file.
The patch also changes the log setup to keep going if there's an error...
Move watcher's LockFile function to utils
Reviewed-by: iustinp
Fix some issues with the watcher
This patch fixes two bugs: - the state file is not saved because we use the method for checking for udpated data - in two places 'Error' was used instead of 'Exception', which breaks error handling
Additionally:...
Add custom logging setup for daemons
It's better for daemons if: - they log only to one log file - the log level is included - for debug runs, the filename/line number is included
This patch moves the custom formatter from the watcher to the logging...
ganeti-watcher: Replace custom exceptions with ganeti.error.*
ganeti-watcher: Don't write file if data didn't change
This is the safest way to detect changes and the amount of datais small, so keeping a copy around is cheap enough.
ganeti-watcher: Rename WatcherState.data to WatcherState._data
Cleanup: _data is private and should not be modified from outsideof this class.
Don't log SystemExit exception in ganeti-watcher
Replace watcher state file atomically
- Lock it before renaming- Code cleanup; close() automatically unlocks it
Write ganeti-watcher status file even if something failed
Use ganeti.serializer module in ganeti-watcher
Reviewed-by: ultrotter
Replace custom logging code in watcher with logging module
- Log timestamp for all messages- Write everything to logfile and optionally to stderr- Log messages are no longer buffered, allowing a user to see progress
Watcher: do not activate disks for started instances
Currently the watcher runs first the instance startup and then theboot-id method of disk reactivation. However, irrelevant of the factthat a node has rebooted or not, if we just started an instance, there's...
Watcher: do not activate disks for admin_down
Currently the watcher does activate disks (via bootid mechanisms) evenfor admin_down instances. This patch logs and skips over theseinstances.
Modify ‘ganeti-watcher’ to run verify-disks
This patch modifies the watcher to run the ‘gnt-cluster verify-disks’command and to log its output (if any).
Reviewed-by: imsnah
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Small changes and fixes in ganeti-watcher.
- Use constants for keys.- Fix bug through which automatic instance restarts wouldn't be limited
Exit ganeti-watcher cleanly when there's no configuration.
Detect node restarts and reactivate disks.
- Change format of watcher state file to JSON.- Move log path for watcher script to constants.py.
Remove requirement that host names are FQDN
We currently require that hostnames are FQDN not short names(node1.example.com instead of node1). We can allow short names as longas: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver...
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Comment formatting updates.
Make the ganeti-watcher exit gracefully if it's not run on the master.
Initial commit.