diff --git a/daemon-common/vmbuilder.py b/daemon-common/vmbuilder.py index db53a76a..9a7ff5b7 100644 --- a/daemon-common/vmbuilder.py +++ b/daemon-common/vmbuilder.py @@ -258,6 +258,13 @@ def worker_create_vm( args = (vm_profile,) db_cur.execute(query, args) profile_data = db_cur.fetchone() + if profile_data is None: + fail( + celery, + f'Provisioner profile "{vm_profile}" is not present on the cluster', + exception=ClusterError, + ) + if profile_data.get("arguments"): vm_data["script_arguments"] = profile_data.get("arguments").split("|") else: