Created
April 30, 2019 17:30
-
-
Save b4ldr/a1428f508c2847c3d23759218b548324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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