From 3064e7bef63a70e5557e562d9b548617698a5d6e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 8 Aug 2018 18:05:45 -0400 Subject: [PATCH] Ensure path is made prior to creating transactioncount Fresh install will be missing /etc/confluent/cfg. Advance the _mkpath call to fix this problem. --- confluent_server/confluent/config/configmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 2111ecde..34972394 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -2065,6 +2065,7 @@ class ConfigManager(object): with _synclock: if statelessmode: return + _mkpath(cls._cfgdir) with open(os.path.join(cls._cfgdir, 'transactioncount'), 'w') as f: f.write(struct.pack('!Q', _txcount)) if fullsync or 'dirtyglobals' in _cfgstore: @@ -2074,7 +2075,6 @@ class ConfigManager(object): with _dirtylock: dirtyglobals = copy.deepcopy(_cfgstore['dirtyglobals']) del _cfgstore['dirtyglobals'] - _mkpath(cls._cfgdir) globalf = dbm.open(os.path.join(cls._cfgdir, "globals"), 'c', 384) # 0600 try: for globalkey in dirtyglobals: