summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0016-Remove-check-for-root.patch
diff options
context:
space:
mode:
authorJosep Puigdemont <josep.puigdemont@enea.com>2016-05-08 13:04:07 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-05-08 17:34:50 +0000
commita31faaebf959dca2793edd984f6776ae5c272f4f (patch)
treed09bf3d730b109339363c326dc96dfd187b037f9 /patches/opnfv-fuel/0016-Remove-check-for-root.patch
parent1158f729444aa16313e263b468e92555f8eb7eb4 (diff)
ARMband patches for the fuel@opnfv deploy scripts
These are a collection of patches that adapt the current Fuel deploy scripts for mainly two purposes: - Make it possible to create a Fuel VM on a remote libvirt server. We use the LIBVIRT_DEFAULT_URI environment variable to detect that. Local deploys are possible by setting this variable to 'quemu:///system', or leaving it empty. See: https://libvirt.org/remote.html for more details. - Make it possible to add additional network interfaces. For this we allow the user to pass the "-b bridge" paramter several times, and creating a new virtual NIC for each of them, in the same order they were given. This required a bit of refactoring of the code. None of the changes above should break backwards compatibility, except when indicated in the commit (search for CHANGE in the log) In addition there are some updates to the code that were deemed necessary, like the ability to retry when executing shell commands instead of directly failing, and a simplification of the DHA IPMI adapter. Change-Id: I8a0cd5b8672383decd861309328137971eaed14b Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> (cherry picked from commit bedeb36ac9ad42fb1ead2449ed8e75f0171808a2)
Diffstat (limited to 'patches/opnfv-fuel/0016-Remove-check-for-root.patch')
-rw-r--r--patches/opnfv-fuel/0016-Remove-check-for-root.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0016-Remove-check-for-root.patch b/patches/opnfv-fuel/0016-Remove-check-for-root.patch
new file mode 100644
index 00000000..4c24bb0e
--- /dev/null
+++ b/patches/opnfv-fuel/0016-Remove-check-for-root.patch
@@ -0,0 +1,79 @@
+From: Josep Puigdemont <josep.puigdemont@enea.com>
+Date: Wed, 4 May 2016 14:27:23 +0200
+Subject: [PATCH] Remove check for root
+
+---
+ ci/deploy.sh | 5 -----
+ deploy/deploy-config.py | 1 -
+ deploy/deploy.py | 2 --
+ deploy/environments/virtual_fuel.py | 2 --
+ 4 files changed, 10 deletions(-)
+
+diff --git a/ci/deploy.sh b/ci/deploy.sh
+index dc13f1c..343d499 100755
+--- a/ci/deploy.sh
++++ b/ci/deploy.sh
+@@ -193,11 +193,6 @@ do
+ esac
+ done
+
+-if [[ $EUID -ne 0 ]]; then
+- echo "This script must be run as root" 1>&2
+- exit 1
+-fi
+-
+ if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \
+ [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \
+ [ -z $ISO ]; then
+diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
+index 65d51b2..88a1111 100644
+--- a/deploy/deploy-config.py
++++ b/deploy/deploy-config.py
+@@ -40,7 +40,6 @@ from common import (
+ check_file_exists,
+ create_dir_if_not_exists,
+ delete,
+- check_if_root,
+ ArgParser,
+ )
+
+diff --git a/deploy/deploy.py b/deploy/deploy.py
+index 265e888..ff4582a 100755
+--- a/deploy/deploy.py
++++ b/deploy/deploy.py
+@@ -32,7 +32,6 @@ from common import (
+ check_file_exists,
+ create_dir_if_not_exists,
+ delete,
+- check_if_root,
+ ArgParser,
+ )
+
+@@ -230,7 +229,6 @@ class AutoDeploy(object):
+ return 0
+
+ def run(self):
+- check_if_root()
+ if self.cleanup_only:
+ self.cleanup_execution_environment()
+ else:
+diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
+index 56d6f98..f07207f 100644
+--- a/deploy/environments/virtual_fuel.py
++++ b/deploy/environments/virtual_fuel.py
+@@ -17,7 +17,6 @@ import re
+ from common import (
+ exec_cmd,
+ check_file_exists,
+- check_if_root,
+ delete,
+ log,
+ )
+@@ -114,7 +113,6 @@ class VirtualFuel(ExecutionEnvironment):
+ vm_definition_overwrite)
+
+ def setup_environment(self):
+- check_if_root()
+ self.cleanup_environment()
+ self.create_vm()
+