-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When i use reload command in consul agent, is that will clean up I've created session? #693
Comments
Can you clarify this a bit more? Details about the session creation, associated health checks, etc would be useful. |
1.I register a service in consul agent: curl -X PUT -d '{"Name":"innosql","Tags":["master"],"Port":3306,"Check":{"Script":"/root/mysqlcheck.sh","Interval":"10s"}}' http://192.168.2.64:8500/v1/agent/service/register And, I exam the result use [
{
"Node": {
"Node": "consul-agent4",
"Address": "192.168.2.64"
},
"Service": {
"ID": "innosql",
"Service": "innosql",
"Tags": [
"master"
],
"Port": 3306
},
"Checks": [
{
"Node": "consul-agent4",
"CheckID": "service:innosql",
"Name": "Service 'innosql' check",
"Status": "passing",
"Notes": "",
"Output": "",
"ServiceID": "innosql",
"ServiceName": "innosql"
},
{
"Node": "consul-agent4",
"CheckID": "serfHealth",
"Name": "Serf Health Status",
"Status": "passing",
"Notes": "",
"Output": "Agent alive and reachable",
"ServiceID": "",
"ServiceName": ""
}
]
}
] 2.I create a session like this: curl -X PUT -d '{"LockDelay":"15s","Name":"innosql","Node":"consul-agent4","Checks":["serfHealth","service:innosql"]}' http://192.168.2.71:8500/v1/session/create result is: {
"ID": "fa9599ae-f4e4-8015-6325-cc9e1c83581e"
} and use session/info api: [
{
"CreateIndex": 106383,
"ID": "fa9599ae-f4e4-8015-6325-cc9e1c83581e",
"Name": "innosql",
"Node": "consul-agent4",
"Checks": [
"serfHealth",
"service:innosql"
],
"LockDelay": 15000000000,
"Behavior": "release",
"TTL": ""
}
] 3.I reload the consul agent. [root@consul-agent4 ~]# consul reload -rpc-addr=192.168.2.64:8400
Configuration reload triggered 4.Use session/info api: Is that normal? Thank you for your answer!@armon |
@ahjdzx Thanks for the detailed report! I see the issue, it is not expected behavior. Tagged as bug. Thanks! |
agent: Snapshot and restore health state on reload. Fixes #693
Should be fixed in master! |
I've created a session in consul agent, but when I executed the reload command, I found the session is not exists. Is that normal?
The text was updated successfully, but these errors were encountered: