From 1effd562ed2d6bb95af7bdf8a362f2180ac4579e Mon Sep 17 00:00:00 2001
From: Derek Higgins <derekh@redhat.com>
Date: Tue, 18 Dec 2018 11:13:49 +0000
Subject: [PATCH] Switch to cirros 0.4.0

This supports ext4 partitions with metadata_csum(as created
by ubuntu bionic by default).

Also Using it with the e1000 virt driver cirros sees the nics.

This allows us to remove 2 of the special cases we had inserted
when the CI jobs were switched to bionic.

Change-Id: I68165110dd57ed314cbc29430f84ff5092065d38
Story: #2004604
Task: #28570
Task: #28499
---
 devstack/common_settings | 2 +-
 devstack/lib/ironic      | 7 ++-----
 zuul.d/ironic-jobs.yaml  | 1 -
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/devstack/common_settings b/devstack/common_settings
index dc426a89c5..86eaed92c3 100644
--- a/devstack/common_settings
+++ b/devstack/common_settings
@@ -4,7 +4,7 @@ if [[ -f $TOP_DIR/../../old/devstack/.localrc.auto ]]; then
     source <(cat $TOP_DIR/../../old/devstack/.localrc.auto | grep -v 'enable_plugin')
 fi
 
-CIRROS_VERSION=0.3.5
+CIRROS_VERSION=0.4.0
 
 # Whether configure the nodes to boot in Legacy BIOS or UEFI mode. Accepted
 # values are: "bios" or "uefi", defaults to "bios".
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index 91a94db579..6182e3011a 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -889,9 +889,6 @@ function install_ironic {
     if is_ansible_deploy_enabled; then
         pip_install "$(grep '^ansible' $IRONIC_DIR/driver-requirements.txt | awk '{print $1}')"
     fi
-
-    # Disable metadata_csum from ext4 as cirros can't mount partitions with it
-    [ -f /etc/mke2fs.conf ] && sudo sed -i -e 's/,metadata_csum//g' /etc/mke2fs.conf
 }
 
 # install_ironicclient() - Collect sources and prepare
@@ -1619,8 +1616,8 @@ function create_bridge_and_vms {
 
     if [[ -n "$LIBVIRT_NIC_DRIVER" ]]; then
         vm_opts+=" -D $LIBVIRT_NIC_DRIVER"
-    elif [[ "$IRONIC_BOOT_MODE" == "uefi" || "$IRONIC_STORAGE_INTERFACE" == "cinder" ]]; then
-        # Note(derekh) Both UEFI and BVF for the moment don't work with the e1000 net driver
+    elif [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
+        # Note(derekh) UEFI for the moment doesn't work with the e1000 net driver
         vm_opts+=" -D virtio"
     fi
 
diff --git a/zuul.d/ironic-jobs.yaml b/zuul.d/ironic-jobs.yaml
index d0995a2ac9..2d3b201078 100644
--- a/zuul.d/ironic-jobs.yaml
+++ b/zuul.d/ironic-jobs.yaml
@@ -215,7 +215,6 @@
     name: ironic-tempest-dsvm-bfv
     description: ironic-tempest-dsvm-bfv
     parent: ironic-base
-    nodeset: openstack-single-node-xenial
     timeout: 9600
     vars:
       tempest_test_regex: baremetal_boot_from_volume