mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Fix the 'everything' group behavior
This commit is contained in:
parent
0d668e3f55
commit
530cb64402
@ -373,6 +373,11 @@ class ConfigManager(object):
|
||||
if 'main' not in _cfgstore:
|
||||
_cfgstore['main'] = {}
|
||||
self._cfgstore = _cfgstore['main']
|
||||
if 'groups' not in self._cfgstore:
|
||||
self._cfgstore['groups'] = {'everything': {'nodes': set()}}
|
||||
if 'nodes' not in self._cfgstore:
|
||||
self._cfgstore['nodes'] = {}
|
||||
self._bg_sync_to_file()
|
||||
return
|
||||
elif 'tenant' not in _cfgstore:
|
||||
_cfgstore['tenant'] = {tenant: {}}
|
||||
@ -386,6 +391,7 @@ class ConfigManager(object):
|
||||
self._cfgstore['groups'] = {'everything': {}}
|
||||
if 'nodes' not in self._cfgstore:
|
||||
self._cfgstore['nodes'] = {}
|
||||
self._bg_sync_to_file()
|
||||
|
||||
def watch_attributes(self, nodes, attributes, callback):
|
||||
"""
|
||||
@ -694,7 +700,7 @@ class ConfigManager(object):
|
||||
group = group.encode('utf-8')
|
||||
_mark_dirtykey('groups', group, self.tenant)
|
||||
if group not in self._cfgstore['groups']:
|
||||
self._cfgstore['groups'][group] = {'nodes': set([])}
|
||||
self._cfgstore['groups'][group] = {'nodes': set()}
|
||||
cfgobj = self._cfgstore['groups'][group]
|
||||
for attr in attribmap[group].iterkeys():
|
||||
newdict = {}
|
||||
|
Loading…
Reference in New Issue
Block a user