This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master in repository copr/copr.
commit be184b259f7978cf11a75f5e2170ff47e3ec0e25 Author: Pavel Raiskup praiskup@redhat.com AuthorDate: Tue Jul 30 08:58:40 2019 +0200
backend: cleanup_vm_nova: require 'copr' user
We plan to put this script into cronjob, and since the script writes to log file - we'd need to deal with root-owned log files very soon. --- backend/run/cleanup_vm_nova.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/backend/run/cleanup_vm_nova.py b/backend/run/cleanup_vm_nova.py index 20bb8f4..1b8498c 100755 --- a/backend/run/cleanup_vm_nova.py +++ b/backend/run/cleanup_vm_nova.py @@ -3,6 +3,7 @@
import os import sys +import getpass import time import logging import argparse @@ -131,6 +132,11 @@ class Cleaner(object): redis DB - when --kill-also-unused, we also terminate ready VMs """ + + if getpass.getuser() != 'copr': + log.error("This script needs to be executed as copr user") + sys.exit(1) + start = time.time() log.info("Cleanup start")