Improve node output messages (from pvchealthd)

1. Output startup "list" entries in cyan with s state
2. Add start of keepalive run message
This commit is contained in:
Joshua Boniface 2023-11-29 16:29:43 -05:00
parent 077dd8708f
commit 4a2eba0961
2 changed files with 18 additions and 14 deletions

View File

@ -386,8 +386,8 @@ def entrypoint():
node_list = new_node_list node_list = new_node_list
logger.out( logger.out(
f'{logger.fmt_blue}Node list:{logger.fmt_end} {" ".join(node_list)}', f'{logger.fmt_cyan}Node list:{logger.fmt_end} {" ".join(node_list)}',
state="i", state="s",
) )
# Update node objects lists # Update node objects lists
@ -554,8 +554,8 @@ def entrypoint():
# Update the new list # Update the new list
network_list = new_network_list network_list = new_network_list
logger.out( logger.out(
f'{logger.fmt_blue}Network list:{logger.fmt_end} {" ".join(network_list)}', f'{logger.fmt_cyan}Network list:{logger.fmt_end} {" ".join(network_list)}',
state="i", state="s",
) )
# Update node objects list # Update node objects list
@ -885,8 +885,8 @@ def entrypoint():
sriov_vf_list = sorted(new_sriov_vf_list) sriov_vf_list = sorted(new_sriov_vf_list)
logger.out( logger.out(
f'{logger.fmt_blue}SR-IOV VF list:{logger.fmt_end} {" ".join(sriov_vf_list)}', f'{logger.fmt_cyan}SR-IOV VF list:{logger.fmt_end} {" ".join(sriov_vf_list)}',
state="i", state="s",
) )
if config["enable_hypervisor"]: if config["enable_hypervisor"]:
@ -912,8 +912,8 @@ def entrypoint():
# Update the new list # Update the new list
domain_list = new_domain_list domain_list = new_domain_list
logger.out( logger.out(
f'{logger.fmt_blue}Domain list:{logger.fmt_end} {" ".join(domain_list)}', f'{logger.fmt_cyan}Domain list:{logger.fmt_end} {" ".join(domain_list)}',
state="i", state="s",
) )
# Update node objects' list # Update node objects' list
@ -939,8 +939,8 @@ def entrypoint():
# Update the new list # Update the new list
osd_list = new_osd_list osd_list = new_osd_list
logger.out( logger.out(
f'{logger.fmt_blue}OSD list:{logger.fmt_end} {" ".join(osd_list)}', f'{logger.fmt_cyan}OSD list:{logger.fmt_end} {" ".join(osd_list)}',
state="i", state="s",
) )
# Pool objects # Pool objects
@ -964,8 +964,8 @@ def entrypoint():
# Update the new list # Update the new list
pool_list = new_pool_list pool_list = new_pool_list
logger.out( logger.out(
f'{logger.fmt_blue}Pool list:{logger.fmt_end} {" ".join(pool_list)}', f'{logger.fmt_cyan}Pool list:{logger.fmt_end} {" ".join(pool_list)}',
state="i", state="s",
) )
# Volume objects (in each pool) # Volume objects (in each pool)
@ -996,8 +996,8 @@ def entrypoint():
# Update the new list # Update the new list
volume_list[pool] = new_volume_list volume_list[pool] = new_volume_list
logger.out( logger.out(
f'{logger.fmt_blue}Volume list [{pool}]:{logger.fmt_end} {" ".join(volume_list[pool])}', f'{logger.fmt_cyan}Volume list [{pool}]:{logger.fmt_end} {" ".join(volume_list[pool])}',
state="i", state="s",
) )
# Start keepalived thread # Start keepalived thread

View File

@ -700,6 +700,10 @@ def node_keepalive(logger, config, zkhandler, this_node):
active_coordinator_state = this_node.coordinator_state active_coordinator_state = this_node.coordinator_state
runtime_start = datetime.now() runtime_start = datetime.now()
logger.out(
"Starting node keepalive run",
state="t",
)
# Set the migration selector in Zookeeper for clients to read # Set the migration selector in Zookeeper for clients to read
if config["enable_hypervisor"]: if config["enable_hypervisor"]: