aboutsummaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel
diff options
context:
space:
mode:
Diffstat (limited to 'patches/opnfv-fuel')
-rw-r--r--patches/opnfv-fuel/0026-deploy.sh-accept-a-timeout-flag-T.patch81
-rw-r--r--patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch33
-rw-r--r--patches/opnfv-fuel/0027-deploy-reap.py-Dump-extra-interfaces-information.patch90
3 files changed, 204 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0026-deploy.sh-accept-a-timeout-flag-T.patch b/patches/opnfv-fuel/0026-deploy.sh-accept-a-timeout-flag-T.patch
new file mode 100644
index 00000000..19651467
--- /dev/null
+++ b/patches/opnfv-fuel/0026-deploy.sh-accept-a-timeout-flag-T.patch
@@ -0,0 +1,81 @@
+From: Josep Puigdemont <josep.puigdemont@enea.com>
+Date: Mon, 9 May 2016 11:05:58 +0200
+Subject: [PATCH] deploy.sh: accept a timeout flag (-T)
+
+Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
+---
+ ci/deploy.sh | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/ci/deploy.sh b/ci/deploy.sh
+index c9b836b..5f06a19 100755
+--- a/ci/deploy.sh
++++ b/ci/deploy.sh
+@@ -29,7 +29,7 @@ cat << EOF
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ `basename $0`: Deploys the Fuel@OPNFV stack
+
+-usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] -i iso
++usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] [-T timeout] -i iso
+ -s deployment-scenario [-S optional Deploy-scenario path URI]
+ [-R optional local relen repo (containing deployment Scenarios]
+
+@@ -46,6 +46,7 @@ OPTIONS:
+ -p Pod-name
+ -s Deploy-scenario short-name/base-file-name
+ -S Storage dir for VM images
++ -T Timeout, in minutes, for the deploy.
+ -i iso url
+
+ Description:
+@@ -76,6 +77,8 @@ Input parameters to the build script is:
+ or a deployment short-name as defined by scenario.yaml in the deployment
+ scenario path.
+ -S Storage dir for VM images, default is fuel/deploy/images
++-T Timeout, in minutes, for the deploy. It defaults to using the DEPLOY_TIMEOUT
++ environment variable when defined, or to the default in deploy.py otherwise
+ -i .iso image to be deployed (needs to be provided in a URI
+ style, it can be a local resource: file:// or a remote resource http(s)://)
+
+@@ -111,6 +114,11 @@ FUEL_CREATION_ONLY=''
+ NO_DEPLOY_ENVIRONMENT=''
+ STORAGE_DIR=''
+ DRY_RUN=0
++if ! [ -z $DEPLOY_TIMEOUT ]; then
++ DEPLOY_TIMEOUT="-dt $DEPLOY_TIMEOUT"
++else
++ DEPLOY_TIMEOUT=""
++fi
+ #
+ # END of variables to customize
+ ############################################################################
+@@ -118,7 +126,7 @@ DRY_RUN=0
+ ############################################################################
+ # BEGIN of main
+ #
+-while getopts "b:B:dfFHl:p:s:S:i:he" OPTION
++while getopts "b:B:dfFHl:p:s:S:T:i:he" OPTION
+ do
+ case $OPTION in
+ b)
+@@ -166,6 +174,9 @@ do
+ STORAGE_DIR="-s ${OPTARG}"
+ fi
+ ;;
++ T)
++ DEPLOY_TIMEOUT="-dt ${OPTARG}"
++ ;;
+ i)
+ ISO=${OPTARG}
+ if [[ ! $ISO == file://* ]] && \
+@@ -227,8 +238,8 @@ if [ $DRY_RUN -eq 0 ]; then
+ ISO=${SCRIPT_PATH}/ISO/image.iso
+ fi
+ # Start deployment
+- echo "python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO"
+- python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO
++ echo "python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT"
++ python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT
+ fi
+ popd > /dev/null
+
diff --git a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch
new file mode 100644
index 00000000..9791f595
--- /dev/null
+++ b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch
@@ -0,0 +1,33 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 9 May 2016 17:05:53 +0200
+Subject: [PATCH] UX: Update bootstrap/target build time estimate.
+
+While building for a different architecture (e.g. AArch64 on x86_64),
+the bootstrap/target image build may take longer, due to latency
+introduced by using qemu-user-static.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+index 744f352..7395af3 100755
+--- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
++++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+@@ -29,9 +29,12 @@ and added to cluster. \
+ For more information please visit \
+ https://docs.mirantis.com/openstack/fuel/fuel-master/"
+ bs_progress_message="There is no active bootstrap. Bootstrap image building \
+-is in progress. Usually it takes 15-20 minutes. It depends on your internet \
+-connection and hardware performance. Please reboot failed to discover nodes \
+-after bootstrap image become available."
++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \
++and/or 30-45 minutes for each cross-build (e.g. AArch64). \
++It depends on your internet connection, hardware performance and selected \
++bootstrap architecture(s). This ISO supports AArch64 only. Please reboot \
++failed to discover nodes after bootstrap image become available."
++
+ bs_done_message="Default bootstrap image building done. Now you can boot new \
+ nodes over PXE, they will be discovered and become available for installing \
+ OpenStack on them"
diff --git a/patches/opnfv-fuel/0027-deploy-reap.py-Dump-extra-interfaces-information.patch b/patches/opnfv-fuel/0027-deploy-reap.py-Dump-extra-interfaces-information.patch
new file mode 100644
index 00000000..fba7e713
--- /dev/null
+++ b/patches/opnfv-fuel/0027-deploy-reap.py-Dump-extra-interfaces-information.patch
@@ -0,0 +1,90 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Wed, 4 May 2016 18:31:09 +0200
+Subject: [PATCH] deploy/reap.py: Dump extra interfaces information.
+
+Since on AArch64, Ubuntu local mirror lacks arm64 packages (see [1]),
+Fuel master requires internet connectivity during deploy, and hence
+a way to setup such a public (extra) interface automatically.
+
+Previous commit "transplant: Generate extra interfaces config file"
+introduced support for passing this information via DEA (override),
+which may define a IFCGF_<interface> section in its 'fuel:'
+section, containing the necessary keys to produce a ifcfg-<interface>
+file, like in this example:
+
+fuel:
+ IFCFG_ETH1:
+ device: eth1
+ ipaddress: 10.0.1.10
+ netmask: 255.255.255.0
+ gateway: 10.0.1.254
+
+In order for Network Manager to use the newly added interfaces
+for outgoing traffic and honor their GATEWAY setting (e.g. if we just
+added one public interface), the default route on admin iface (most of
+the time called eth0) is disabled when extra interfaces are present.
+
+FIXME: Only supports lowercase interface names, but so does Fuel,
+see related bug report [2].
+
+[1] https://jira.opnfv.org/browse/ARMBAND-35
+[2] https://jira.opnfv.org/browse/FUEL-136
+
+Signed-off-by: Alexandu Avadanii <alexandru.avadanii@enea.com>
+Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
+---
+ deploy/reap.py | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/deploy/reap.py b/deploy/reap.py
+index bf64d40..6feaf17 100755
+--- a/deploy/reap.py
++++ b/deploy/reap.py
+@@ -15,6 +15,8 @@ import yaml
+ import glob
+ import shutil
+ import tempfile
++import re
++import netaddr
+
+ from common import (
+ N,
+@@ -245,6 +247,38 @@ class Reap(object):
+ if key not in ['ipaddress', 'netmask',
+ 'dhcp_pool_start', 'dhcp_pool_end']:
+ del fuel['ADMIN_NETWORK'][key]
++
++ ## FIXME(armband): Factor in support for adding public/other interfaces.
++ ## TODO: Following block expects interface name(s) to be lowercase only
++ interfaces_list = exec_cmd('ip -o -4 a | grep -e "e[nt][hopsx].*"')
++ for interface in re.split('\n', interfaces_list):
++ # Sample output line from above cmd:
++ # 3: eth1 inet 10.0.2.10/24 scope global eth1 valid_lft forever ...
++ ifcfg = re.split(r'\s+', interface)
++ ifcfg_name = ifcfg[1]
++ ifcfg_ipaddr = ifcfg[3]
++
++ # Filter out admin interface (device name is not known, match IP)
++ current_network = netaddr.IPNetwork(ifcfg_ipaddr)
++ if str(current_network.ip) == fuel['ADMIN_NETWORK']['ipaddress']:
++ continue
++
++ # Read ifcfg-* network interface config file, write IFCFG_<IFNAME>
++ ifcfg_sec = 'IFCFG_%s' % ifcfg_name.upper()
++ fuel[ifcfg_sec] = {}
++ ifcfg_data = {}
++ ifcfg_f = ('/etc/sysconfig/network-scripts/ifcfg-%s' % ifcfg_name)
++ with open(ifcfg_f) as f:
++ for line in f:
++ (key, val) = line.split('=')
++ ifcfg_data[key.lower()] = val.rstrip()
++
++ # Keep only needed info (e.g. filter-out type=Ethernet).
++ fuel[ifcfg_sec]['ipaddress'] = ifcfg_data['ipaddr']
++ fuel[ifcfg_sec]['device'] = ifcfg_data['device']
++ fuel[ifcfg_sec]['netmask'] = str(current_network.netmask)
++ fuel[ifcfg_sec]['gateway'] = ifcfg_data['gateway']
++
+ self.write_yaml(self.dea_file, {'fuel': fuel})
+
+ def reap_network_settings(self):