2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-24 02:20:08 +00:00

Ensure that python3 will execute before doing migrate

If python3 is not the executable name, prevent the restoration
attempt from happening.
This commit is contained in:
Jarrod Johnson 2022-06-10 11:19:21 -04:00
parent db5c31030d
commit 13d4d1dd98

View File

@ -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])