Skip to content

Commit

Permalink
cooker: Ensure BB_CONSOLE remains correct over server resets
Browse files Browse the repository at this point in the history
The console log data is written to is created at console initialisation
time and does not change over reset events. This ensures the
BB_CONSOLELOG value is correct over such resets by preserving it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
rpurdie committed Oct 29, 2015
1 parent 021f2eb commit 335eb2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/bb/cooker.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ def initConfigurationData(self):
self.state = state.initial
self.caches_array = []

# Need to preserve BB_CONSOLELOG over resets
consolelog = None
if hasattr(self, "data"):
consolelog = self.data.getVar("BB_CONSOLELOG", True)

if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.enableDataTracking()

Expand All @@ -281,6 +286,8 @@ def initConfigurationData(self):
self.data = self.databuilder.data
self.data_hash = self.databuilder.data_hash

if consolelog:
self.data.setVar("BB_CONSOLELOG", consolelog)

# we log all events to a file if so directed
if self.configuration.writeeventlog:
Expand Down

0 comments on commit 335eb2d

Please sign in to comment.