From a3469cba7aa2911e05dc2d0b98b2e56e73c10415 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 24 Jan 2013 04:41:56 +0100 Subject: Client: always actions do not modify hosts Actions that are executed always, does not set the host statistics to modified. (One always action would lead to always modified hosts) --- debian/changelog | 6 ++++++ src/lib/Client/Frame.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8863987a8..d06347378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +bcfg2 (1.2.3-4) unstable; urgency=low + + * Client: always actions do not modify hosts + + -- Alexander Sulfrian Thu, 24 Jan 2013 04:42:06 +0100 + bcfg2 (1.2.3-3) unstable; urgency=low * Client: allow pre-Actions and important-Paths to enable installs diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py index 5826b36e8..78b1dd1d9 100644 --- a/src/lib/Client/Frame.py +++ b/src/lib/Client/Frame.py @@ -445,7 +445,8 @@ class Frame: stats.set('state', 'dirty') # List bad elements of the configuration - for (data, ename) in [(self.modified, 'Modified'), (self.extra, "Extra"), \ + mods = [m for m in self.modified if m.tag != 'Action' or m.get('when') != 'always'] + for (data, ename) in [(mods, 'Modified'), (self.extra, "Extra"), \ ([entry for entry in self.states if not \ self.states[entry]], "Bad")]: container = Bcfg2.Client.XML.SubElement(stats, ename) -- cgit v1.2.3-1-g7c22