How to user hot-restarter.py

1,030 views
Skip to first unread message

jfc...@gmail.com

unread,
Mar 17, 2018, 9:25:18 AM3/17/18
to envoy-users
Hi!

I'm trying to use this python script on the repo: https://github.com/envoyproxy/envoy/blob/master/restarter/hot-restarter.py to test how would the restarting process would work. As a test environment I'm using a docker-compose file, based on this docker-compose file: https://github.com/envoyproxy/envoy/blob/master/examples/front-proxy/docker-compose.yml. I've tried changing the envoy command to the following

command: /usr/local/bin/hot-restart.py /usr/local/bin/start_envoy.sh

The issue is that it starts perfecly but when I send a SIGHUP signal  (Following this link: https://www.envoyproxy.io/docs/envoy/latest/operations/hot_restarter) the process exits because envoy didn't start correctly.

I don't know if it's because my laptop is running windows, Should I open an issue? 

This is the output of the logs I'm seing (I don't see much difference by changing the level to trace) 

envoy_1   | [2018-03-17 13:24:16.315][5][info][main] source/server/server.cc:178] initializing epoch 0 (hot restart version=9.200.16384.127.options=capacity=16384, num_slots=8209 hash=228984379728933363)
envoy_1   | [2018-03-17 13:24:16.322][5][info][config] source/server/configuration_impl.cc:52] loading 1 listener(s)
envoy_1   | [2018-03-17 13:24:16.323][5][info][config] source/server/configuration_impl.cc:92] loading tracing configuration
envoy_1   | [2018-03-17 13:24:16.323][5][info][config] source/server/configuration_impl.cc:119] loading stats sink configuration
envoy_1   | [2018-03-17 13:24:16.324][5][info][main] source/server/server.cc:353] starting main dispatch loop
envoy_1   | [2018-03-17 13:24:16.326][5][info][upstream] source/common/upstream/cluster_manager_impl.cc:131] cm init: all clusters initialized
envoy_1   | [2018-03-17 13:24:16.326][5][info][main] source/server/server.cc:337] all clusters initialized. initializing init manager
envoy_1   | [2018-03-17 13:24:16.326][5][info][config] source/server/listener_manager_impl.cc:583] all dependencies initialized. starting workers
envoy_1   | starting hot-restarter with target: /usr/local/bin/start_envoy.sh
envoy_1   | forking and execing new child process at epoch 0
envoy_1   | forked new child process with PID=5
envoy_1   | got SIGHUP
envoy_1   | forking and execing new child process at epoch 1
envoy_1   | forked new child process with PID=18
envoy_1   | got SIGCHLD
envoy_1   | PID=18 exited with code=1
envoy_1   | Due to abnormal exit, force killing all child processes and exiting
envoy_1   | force killing PID=5
envoy_1   | exiting due to lack of child processes
envoytest_envoy_1 exited with code 1


Anything I'm missing? 

Thanks!




Stephan Zuercher

unread,
Mar 19, 2018, 1:55:57 PM3/19/18
to jfc...@gmail.com, envoy-users
I think it's worth creating an issue. I think more people will see it. Also seems to me that it might turn into a ticket for better docs around this.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users+unsubscribe@googlegroups.com.
To post to this group, send email to envoy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/cd8f546f-ef95-4531-a732-ede525546a0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joaquin Fernandez Campo

unread,
Mar 19, 2018, 2:06:11 PM3/19/18
to Stephan Zuercher, envoy-users
Yeah, I managed to fix the issue, it was because I wasn't passing the --restart-epoch flag. Docs could be improved in general, my impression is that it's hard to get a full picture from them. 

I've been setting up this repo: https://github.com/xocasdashdash/envoy-example as a full config example/learning exercise.

Regards,
Joaquín
--
---------------------------------------
Joaquín Fernández Campo
E-Mail: jfc...@gmail.com

Matt Klein

unread,
Mar 19, 2018, 2:12:13 PM3/19/18
to Joaquin Fernandez Campo, Stephan Zuercher, envoy-users
Would really appreciate doc PRs to clarify things that confused you.

Thanks,
Matt


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages