pacemaker/crm_history_10_d21f988a419c.patch

39 lines
1.4 KiB
Diff
Raw Normal View History

- Upgrade to 1.1.6. - PE: Demote from Master does not clear previous errors - crmd: Prevent secondary DC fencing resulting from CIB updates that are lost due to elections - crmd: Log duplicate DC detection as a WARNING not ERROR - crmd: Bug lf#2632 - Correctly handle nodes that return faster than stonith - Core: Treat GNUTLS_E_UNEXPECTED_PACKET_LENGTH as normal termination of a TLS session - cib: Call gnutls_bye() and shutdown() when disconnecting from remote TLS connections - cib: Remove disconnected remote connections from mainloop - cib: Attempt a graceful sign-off for remote TLS connections - Core: Ensure there is sufficient space for EOS when building short-form option strings (prevents segfault) - Core: Fix variable expansion in pkg-config files - PE: Resolve memory leak reported by valgrind - PE: Fix memory leak for re-allocated resources reported by valgrind - PE: Improve the merging with template's operations - crmd: Allow nodes to fence themselves if they're the last one standing (lf#2584) - stonith: Add an API call for listing installed agents - stonith: Allow the fencing history to be queried - stonith: Ensure completed operations are recorded as such in the history - stonith: Support --quiet to display just the seconds since epoch at which a node was last shot - stonith: Serialize actions for a given device - stonith: Add missing entries to stonith_error2string() (missing OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=18
2011-09-20 16:36:23 +02:00
# HG changeset patch
# User Dejan Muhamedagic <dejan@hello-penguin.com>
# Date 1314279513 -7200
# Node ID d21f988a419c0c7fa349c4e26f6b500944d91370
# Parent 709ef91cfada2822aca53dcef085ddb6952393c5
Low: Shell: look for log segments with more care and don't throw exception on seek (bnc#713939)
diff --git a/shell/modules/report.py b/shell/modules/report.py
--- a/shell/modules/report.py
+++ b/shell/modules/report.py
@@ -72,8 +72,15 @@ def seek_to_edge(f, ts, to_end):
Linear search, but should be short.
'''
if not to_end:
+ beg = 0
while ts == get_timestamp(f):
- f.seek(-1000, 1) # go back 10 or so lines
+ if f.tell() < 1000:
+ f.seek(0) # otherwise, the seek below throws an exception
+ if beg > 0: # avoid infinite loop
+ return # goes all the way to the top
+ beg += 1
+ else:
+ f.seek(-1000, 1) # go back 10 or so lines
while True:
pos = f.tell()
s = f.readline()
@@ -86,8 +93,8 @@ def seek_to_edge(f, ts, to_end):
def log_seek(f, ts, to_end = False):
'''
f is an open log. Do binary search for the timestamp.
- Return the position of the (more or less) first line with a
- newer time.
+ Return the position of the (more or less) first line with an
+ earlier (or later) time.
'''
first = 0
f.seek(0,2)