Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1535529

Summary: Use dd conv=sparse when writing images to nodes
Product: Red Hat OpenStack Reporter: Ian Pilcher <ipilcher>
Component: python-ironic-libAssignee: Ian Pilcher <ipilcher>
Status: CLOSED ERRATA QA Contact: mlammon
Severity: medium Docs Contact:
Priority: medium    
Version: 12.0 (Pike)CC: apevec, bfournie, ipilcher, jjoyce, jschluet, lhh, racedoro
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ironic-lib-2.10.1-1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-20 12:46:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Pilcher 2018-01-17 15:04:44 UTC
When using whole disk images, one generally wants the *virtual* size of the image to be close to the size of the overcloud nodes' physical disks (since no partition/logical volume/filesystem) expansion is done). As an example, one might end up with a 4GB overcloud image (QCOW file) that has a virtual size of 100GB or more.

Ironic uses qemu-img to convert this QCOW file to a "raw" image, which is a *sparse* file. When the image is copied to an overcloud node's disk (via iSCSI), we currently write all 100GB (mainly of zeroes) across the network to the node's disk.

Adding conv=sparse to the dd command makes it skip the "holes" in the image file; it will only the write the portions of the image that actually contain data across the network.

Comment 2 mlammon 2018-07-18 16:43:32 UTC
Install latest osp12 puddle 

Environment:
python-ironic-lib-2.10.1-1.el7ost.noarch

I can verify the code has landed. 
sed -n '293,294p' /usr/lib/python2.7/site-packages/ironic_lib/disk_utils.py
    utils.dd(src, dst, 'bs=%s' % CONF.disk_utils.dd_block_size, 'oflag=direct',
             'conv=sparse')

Please re-open bug if issue persists.

Comment 5 errata-xmlrpc 2018-08-20 12:46:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2517

Comment 6 Bob Fournier 2018-09-13 16:09:21 UTC
This change appears to have caused a problem booting whole disk images, see https://bugzilla.redhat.com/show_bug.cgi?id=1618548

Comment 7 Red Hat Bugzilla 2023-09-14 04:15:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days