2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 03:48:35 +00:00

Ensure path is made prior to creating transactioncount

Fresh install will be missing /etc/confluent/cfg.  Advance the
_mkpath call to fix this problem.
This commit is contained in:
Jarrod Johnson 2018-08-08 18:05:45 -04:00
parent 1d4df8af3a
commit 3064e7bef6

View File

@ -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: