<commit_before># websequencediagrams.com
# http://cmrepo.zenoss.loc:1086/

title Snapshot Sequence for Simplest case

participant CLI
participant CLI_Agent
participant Zookeeper
participant LBAgent
participant Proxy


note left of Proxy: container starts proxy
LBAgent->Zookeeper: start watch for pause request
note left of LBAgent: block watch for pause request


CLI->CLI_Agent: snapshot request with SERVICE_ID
note right of CLI_Agent: traverse services tree and finds root service.
CLI_Agent->Zookeeper: place snapshot pause request as root service info into /snapshots
note right of CLI_Agent: block watch for pause result


Zookeeper->LBAgent: new pause request
LBAgent->Proxy: lxc-attach quiesce pause
note right of LBAgent: interprets exit status
LBAgent->Zookeeper: pause result ok or failure
note left of LBAgent: block watch for resume request

Zookeeper->CLI_Agent: pause result
note right of CLI_Agent: snapshot volume
CLI_Agent->Zookeeper: resume request
note right of CLI_Agent: block watch for resume result


Zookeeper->LBAgent: resume request
LBAgent->Proxy: lxc-attach quiesce resume
note right of LBAgent: interprets exit status
LBAgent->Zookeeper: resume result ok or failure


Zookeeper->CLI_Agent: resume result
CLI_Agent->CLI: snapshot result
<commit_msg>updated docs for Leader performs snapshot<commit_after># websequencediagrams.com
# http://cmrepo.zenoss.loc:1086/

title Snapshot Sequence for Simplest case


participant CLI
participant CLI_Agent
participant Zookeeper
participant Leader
participant Proxy


Leader->Zookeeper: start watch for pause request
note left of Leader: block watch for pause request


CLI->CLI_Agent: snapshot request with SERVICE_ID
note right of CLI_Agent: traverse services tree and finds root service.
CLI_Agent->Zookeeper: place snapshot pause request as root service info into /snapshots/requests
note right of CLI_Agent: block watch for snapshot result


Zookeeper->Leader: new pause request
Leader->Proxy: lxc-attach quiesce pause
note right of Leader: interpret exit status as ok or failure


Leader->Zookeeper: if pause failure, snapshot failed
Zookeeper->CLI_Agent: snapshot failed
CLI_Agent->CLI: snapshot failed


note right of Leader: snapshot volume
Leader->Proxy: deferred lxc-attach quiesce resume
note right of Leader: interpret exit status as ok or failure
Leader->Zookeeper: snapshot result ok or failure


Zookeeper->CLI_Agent: snapshot result
CLI_Agent->CLI: snapshot result
                                                                                  
{'fraction_non_alphanumeric': 0.049743387287801026, 'fraction_numerical': 0.0031583103039873666, 'mean_word_length': 4.593818984547461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6403632', 'n_tokens_mistral': 755, 'n_tokens_neox': 703, 'n_words': 294}