View Issue Details

IDProjectCategoryView StatusLast Update
0013220CentOS-7Cloud-Imagespublic2018-01-02 11:38
Status newResolutionopen 
Product Version7.2.1511 
Target VersionFixed in Version 
Summary0013220: Cloud-init: unable to use 'disk_setup' to provision machines with additional disks
DescriptionWhen attempting to use cloud-init's 'disk_setup' module to provision an Openstack instance with a 2nd volume, the cloud-init process fails with:

AttributeError: 'list' object has no attribute 'splitlines'

This error has been fixed upstream in:
Steps To ReproduceAttempt to use the following cloud-init script:

    layout: true
Additional InformationThis error has been fixed upstream in:
TagsNo tags attached.




2017-05-04 13:14


cloud-init_fix-splitlines.patch.txt (925 bytes)
From 0b9e0444f5092e647a3fa55887d96ffaf3d23c06 Mon Sep 17 00:00:00 2001
From: Daniel Watkins <>
Date: Wed, 18 Mar 2015 13:33:12 +0000
Subject: [PATCH] Update is_disk_used for changed enumerate_disk output.

Fixes Launchpad bug #1311463.
 cloudinit/config/ | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cloudinit/config/ b/cloudinit/config/
index f899210..e2ce6db 100644
--- a/cloudinit/config/
+++ b/cloudinit/config/
@@ -304,8 +304,7 @@ def is_disk_used(device):
     # If the child count is higher 1, then there are child nodes
     # such as partition or device mapper nodes
-    use_count = [x for x in enumerate_disk(device)]
-    if len(use_count.splitlines()) > 1:
+    if len(list(enumerate_disk(device))) > 1:
         return True
     # If we see a file system, then its used


2018-01-02 11:38

reporter   ~0030841

Now that CentOS 7.3 is using Cloud-Init 0.7.9-9, the upstream fix has been included.

However it would appear that the 'disk_setup' module is still not being included in 'cloud-init-rhel.cfg' (!cloud-init.git/c7/SOURCES!cloud-init-rhel.cfg).

Is there a specific reason for this?

Issue History

Date Modified Username Field Change
2017-05-04 13:14 fatmcgav New Issue
2017-05-04 13:14 fatmcgav File Added: cloud-init_fix-splitlines.patch.txt
2018-01-02 11:38 fatmcgav Note Added: 0030841