Open oberstet opened 2 years ago
also, when placements are detected "ok", the log noise should be reduced:
2022-05-09T09:46:49+0000 [Container 685] <crossbar.master.arealm.arealm.ApplicationRealmMonitor._apply_routercluster_placements> Applying router cluster worker group placement:
crossbar_master | {'changed': 1652088614185236600,
crossbar_master | 'cluster_oid': '8fd53798-3550-4f10-9689-966ef29ea4d9',
crossbar_master | 'node_oid': '2458dfb0-ff92-42da-a698-9859e829e723',
crossbar_master | 'oid': '2b49dc44-b3b4-46bf-9e84-b9c5a4da0a5c',
crossbar_master | 'status': 'RUNNING',
crossbar_master | 'tcp_listening_port': 10000,
crossbar_master | 'worker_group_oid': '62459e38-8fd9-432e-bf1c-962b638e8717',
crossbar_master | 'worker_name': 'group1_1'}
crossbar_master | 2022-05-09T09:46:49+0000 [Container 685] <crossbar.master.arealm.arealm.ApplicationRealmMonitor._check_and_apply> check & apply run started for application realm 928fba9a-41cb-4539-86de-735a5d903114 ..
crossbar_master | 2022-05-09T09:46:49+0000 [Container 685] <crossbar.master.arealm.arealm.ApplicationRealmMonitor._check_and_apply> Applying 1 worker placements for router cluster worker group 62459e38-8fd9-432e-bf1c-962b638e8717, arealm 928fba9a-41cb-4539-86de-735a5d903114
crossbar_master | 2022-05-09T09:46:49+0000 [Container 685] <crossbar.master.arealm.arealm.ApplicationRealmMonitor._apply_routercluster_placements> Applying router cluster worker group placement:
crossbar_master | {'changed': 1652088614185236600,
crossbar_master | 'cluster_oid': '8fd53798-3550-4f10-9689-966ef29ea4d9',
crossbar_master | 'node_oid': '2458dfb0-ff92-42da-a698-9859e829e723',
crossbar_master | 'oid': '2b49dc44-b3b4-46bf-9e84-b9c5a4da0a5c',
crossbar_master | 'status': 'RUNNING',
crossbar_master | 'tcp_listening_port': 10000,
crossbar_master | 'worker_group_oid': '62459e38-8fd9-432e-bf1c-962b638e8717',
crossbar_master | 'worker_name': 'group1_1'}
The dynamic placement and replacement logic of the master node should be reworked and improved
https://github.com/crossbario/crossbar/blob/95b30b1a03e9596191887af2738f04b9624ff11b/crossbar/master/arealm/arealm.py#L147 https://github.com/crossbario/crossbar/blob/95b30b1a03e9596191887af2738f04b9624ff11b/crossbar/master/cluster/routercluster.py#L1150
Test: It should possible to add a router cluster group without any nodes present in the router cluster.
Trying the above the master node fails with: