Commit 2a18d29b authored by Sigmund Augdal's avatar Sigmund Augdal

Write a marker file when clean stale completes. Useful for debugging and monitoring

parent 4750389f
......@@ -10,6 +10,7 @@ try:
from configparser import SafeConfigParser # pylint: disable=F0401
except ImportError:
from ConfigParser import SafeConfigParser # pylint: disable=F0401
import time
DESCRIPTION = """
Remove ip/mac bindings for VMs that no longer exists.
......@@ -98,6 +99,9 @@ def main():
security_groups.delete_mac_from_group(etcd_client, group, mac)
else:
logging.info("Would have removed mac {} from group with id {}".format(mac, group))
if not args.noop:
with open("/var/lib/nova-router/last-successful-clean", "w") as fh:
fh.write("{}".format(int(time.time())))
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment