Merge "upload_image.sh to support streamOptimized disks"
diff --git a/lib/nova b/lib/nova
index 0db242a..dbc5c3d 100644
--- a/lib/nova
+++ b/lib/nova
@@ -240,10 +240,6 @@
sudo sysctl -w net.ipv4.ip_forward=1
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
- # File injection is being disabled by default in the near future -
- # disable it here for now to avoid surprises later.
- iniset $NOVA_CONF libvirt inject_partition '-2'
-
# Check for kvm (hardware based virtualization). If unable to initialize
# kvm, we drop back to the slower emulation mode (qemu). Note: many systems
# come with hardware virtualization disabled in BIOS.
@@ -499,6 +495,12 @@
iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST"
iniset_rpc_backend nova $NOVA_CONF DEFAULT
iniset $NOVA_CONF DEFAULT glance_api_servers "$GLANCE_HOSTPORT"
+
+ if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
+ # File injection is being disabled by default in the near future -
+ # disable it here for now to avoid surprises later.
+ iniset $NOVA_CONF libvirt inject_partition '-2'
+ fi
}
function init_nova_cells() {
diff --git a/tools/bash8.py b/tools/bash8.py
index edf7da4..2623358 100755
--- a/tools/bash8.py
+++ b/tools/bash8.py
@@ -30,8 +30,18 @@
import re
import sys
-
ERRORS = 0
+IGNORE = None
+
+
+def register_ignores(ignores):
+ global IGNORE
+ if ignores:
+ IGNORE='^(' + '|'.join(ignores.split(',')) + ')'
+
+
+def should_ignore(error):
+ return IGNORE and re.search(IGNORE, error)
def print_error(error, line):
@@ -97,11 +107,13 @@
description='A bash script style checker')
parser.add_argument('files', metavar='file', nargs='+',
help='files to scan for errors')
+ parser.add_argument('-i', '--ignore', help='Rules to ignore')
return parser.parse_args()
def main():
opts = get_options()
+ register_ignores(opts.ignore)
check_files(opts.files)
if ERRORS > 0: