From 13d4d1dd98e1b4b077d9672e0881fe22d86f0f1b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 10 Jun 2022 11:19:21 -0400 Subject: [PATCH] Ensure that python3 will execute before doing migrate If python3 is not the executable name, prevent the restoration attempt from happening. --- confluent_server/confluent/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_server/confluent/main.py b/confluent_server/confluent/main.py index 2d26df8d..207d3783 100644 --- a/confluent_server/confluent/main.py +++ b/confluent_server/confluent/main.py @@ -240,6 +240,7 @@ def sanity_check(): def migrate_db(): tdir = tempfile.mkdtemp() + subprocess.check_call(['python3', '-c', 'pass']) subprocess.check_call(['python2', '/opt/confluent/bin/confluentdbutil', 'dump', '-u', tdir]) subprocess.check_call(['python3', '/opt/confluent/bin/confluentdbutil', 'restore', '-u', tdir]) subprocess.check_call(['rm', '-rf', tdir])