From 82369dc79d38e77ca3c2c86e7322b47ed4d1bd55 Mon Sep 17 00:00:00 2001 From: Josep Puigdemont Date: Tue, 17 May 2016 15:06:44 +0200 Subject: Fuel deploy: timestamp for newly created images All images created are named opnfv.iso, this is not sustainable in an environment where several PODs might share the same libvirt storage pool. For this we need unique names, and the time stamp is a cheap way for now to achieve this. Change-Id: I8a7d34036898b8b4e57b23c11bee643876e1829c Signed-off-by: Josep Puigdemont --- ....py-add-a-time-stamp-to-the-new-ISO-image.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch (limited to 'patches') diff --git a/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch new file mode 100644 index 00000000..3e3480b1 --- /dev/null +++ b/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch @@ -0,0 +1,39 @@ +From: Josep Puigdemont +Date: Tue, 17 May 2016 14:40:48 +0200 +Subject: [PATCH] deploy.py: add a time stamp to the new ISO image + +Add a time stamp to the newly create ISO image. This is to prevent name +collisions with other ISO images from earlier deploy jobs. + +Ideally this will only be a temporary need, and releng will provide with +unique IDs for each job that we can use to this effect. + +Signed-off-by: Josep Puigdemont +--- + deploy/deploy.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index 041ba2f..cebef97 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -13,6 +13,7 @@ import os + import io + import re + import sys ++import time + import yaml + import errno + import signal +@@ -100,8 +101,9 @@ class AutoDeploy(object): + + def install_fuel_master(self): + log('Install Fuel Master') +- new_iso = ('%s/deploy-%s' +- % (self.tmp_dir, os.path.basename(self.iso_file))) ++ stamp = time.strftime("%Y%m%d%H%M%S") ++ new_iso = ('%s/deploy-%s-%s' ++ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) + self.patch_iso(new_iso) + self.iso_file = new_iso + self.install_iso() -- cgit 1.2.3-korg