Skip to content

Instantly share code, notes, and snippets.

@b4ldr
Created April 30, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b4ldr/a1428f508c2847c3d23759218b548324 to your computer and use it in GitHub Desktop.
Save b4ldr/a1428f508c2847c3d23759218b548324 to your computer and use it in GitHub Desktop.
class RollingRestart():
def depool():
def check depool()
def restart()
supprted_damons = {
'apache': RollingRestartApache,
'hhvm': RollingRestartHhvm
}
def run():
daemons = [supprted_damons[i] for i in args.damons if supprted_damons.get(i,None)]
# set host icinga down time
# possibly host depool
for daemon in daemons:
damons.depool()
while damon.check_depool():
sleep
daemons.restart()
damons.repool()
RollingRestartApache(RollingRestart):
def check_depool():
#apache depool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment