Modify

Ticket #1159 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

server: decisions: empty decision lists

Reported by: https://www.google.com/accounts/o8/id?id=AItOawkfHvWdYf7g8kSZA32s7dhK0Xig9JKo_CA Owned by: desai
Priority: major Milestone: Bcfg2 1.4.0 Release
Component: bcfg2-server Version: 1.0
Keywords: decisions Cc:

Description

In 1.4.0pre1, two issues actually.

  1. Decision files never got read from disk with Pseudo FAM. This made decision lists always empty, obviously.

I'm unable to test the fix on Linux - will the files be read twice when using INotify?

  1. A typo, which led to exceptions and empty decision lists.
--- a/src/lib/Bcfg2/Server/Plugins/Decisions.py
+++ b/src/lib/Bcfg2/Server/Plugins/Decisions.py
@@ -27,8 +27,8 @@
     def __init__(self, core):
         Bcfg2.Server.Plugin.Plugin.__init__(self, core)
         Bcfg2.Server.Plugin.Decision.__init__(self)
-        self.whitelist = DecisionFile(os.path.join(self.data, "whitelist.xml"))
-        self.blacklist = DecisionFile(os.path.join(self.data, "blacklist.xml"))
+        self.whitelist = DecisionFile(os.path.join(self.data, "whitelist.xml"), should_monitor=True)
+        self.blacklist = DecisionFile(os.path.join(self.data, "blacklist.xml"), should_monitor=True)

     def GetDecisions(self, metadata, mode):
-        return getattr(self, mode).get_decision(metadata)
+        return getattr(self, mode).get_decisions(metadata)

/mkd

Attachments

Change History

comment:1 Changed 6 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.