From a953a6afba7edc79767627ccae63428c5f698a1c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 14 Jul 2021 15:40:38 -0400 Subject: [PATCH] Provide clearer error when osdeploy initialize is not done osdeploy import needs to have things prepared by osdeploy initialize. Check for it having run and error if needed. --- confluent_server/confluent/osimage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 88127db0..30ef95c2 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -672,6 +672,8 @@ class MediaImporter(object): def __init__(self, media, cfm=None): self.worker = None + if not os.path.exists('/var/lib/confluent/public'): + raise Exception('`osdeploy initialize` must be executed before importing any media') self.profiles = [] medfile = None if cfm and media in cfm.clientfiles: