From c6d0c121d4d43949ae108d34e3825437d8d91a38 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 10 Jun 2020 09:44:44 -0400 Subject: [PATCH] Switch to tar esxi seems to be inconsistent with working with gz compressed tar, see if plain tar fares better --- confluent_osdeploy/confluent_osdeploy.spec.tmpl | 4 ++-- confluent_server/bin/osimage | 6 +++--- confluent_server/confluent/osimage.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index 4bc123fe..5005bcbf 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -39,8 +39,8 @@ cd esxi7out cp -a ../opt . cp -a ../esxi7/initramfs/* . chmod +x bin/* opt/confluent/bin/* -tar zcvf ../addons.tgz * -mv ../addons.tgz . +tar cf ../addons.tar * +mv ../addons.tar . cd .. %install diff --git a/confluent_server/bin/osimage b/confluent_server/bin/osimage index 9349c62a..a29f1083 100644 --- a/confluent_server/bin/osimage +++ b/confluent_server/bin/osimage @@ -137,11 +137,11 @@ def initialize(cmdset): sys.stderr.write('Error occurred while packing site initramfs') sys.exit(1) os.rename(tmpname, '/var/lib/confluent/public/site/initramfs.cpio') - tmptarname = tmpname.replace('cpio', 'tgz') - tarcmd = ['tar', '--transform=s|^|etc/|', '-czf', tmptarname] + topack + tmptarname = tmpname.replace('cpio', 'tar') + tarcmd = ['tar', '--transform=s|^|etc/|', '-cf', tmptarname] + topack subprocess.check_call(tarcmd) os.chdir(opath) - os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tgz') + os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tar') if cmdset.k: with open('/etc/ssh/ssh_known_hosts', 'a+b') as skh: for cafile in glob.glob('/var/lib/confluent/public/site/ssh/*.ca'): diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 87aecaa5..0852f8c6 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -71,14 +71,14 @@ def update_boot_esxi(profiledir, profile, label): elif cfgline.startswith('modules='): modlist = cfgline.split('=', 1)[1] filesneeded.extend(modlist.split(' --- ')) - newbootcfg += cfgline + ' --- /initramfs/addons.tgz --- /site.tgz\n' + newbootcfg += cfgline + ' --- /initramfs/addons.tar --- /site.tar\n' else: newbootcfg += cfgline + '\n' os.makedirs('{0}/boot/efi/boot/'.format(profiledir)) with open('{0}/boot/efi/boot/BOOT.CFG'.format(profiledir), 'w+') as bcfg: bcfg.write(newbootcfg) - os.symlink('/var/lib/confluent/public/site/initramfs.tgz', - '{0}/boot/site.tgz'.format(profiledir)) + os.symlink('/var/lib/confluent/public/site/initramfs.tar', + '{0}/boot/site.tar'.format(profiledir)) for fn in filesneeded: if fn.startswith('/'): fn = fn[1:]