Bug 1477921

Summary: [RFE] diskimage-builder shall support creating images with volumes
Product: Red Hat OpenStack Reporter: Yolanda Robla <yroblamo>
Component: diskimage-builderAssignee: Yolanda Robla <yroblamo>
Status: CLOSED ERRATA QA Contact: mlammon
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: achernet, bfournie, jschluet, mburns, mlammon, racedo, racedoro, rhel-osp-director-maint, yroblamo
Target Milestone: Upstream M1Keywords: FutureFeature, Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: diskimage-builder-2.10.2-0.20180123051718.7e7186a.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:33:47 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:
Bug Depends On: 1563774    
Bug Blocks:    

Description Yolanda Robla 2017-08-03 08:43:05 UTC
Description of problem:


In order to create security hardened images, it was important to have different directories on different filesystems. On Pike, support for partitions was added. Now we are willing to create volumes on top of them, for Queens.
Using volumes instead of partitions, will give us more flexibility in terms of sizing and scaling.

Comment 3 Ramon Acedo 2017-10-31 10:25:00 UTC
Ideally we should verify if LVM can be configured with PVs in multiple local disks instead of just partitions in one disk.

Comment 5 Yolanda Robla 2017-11-09 16:55:20 UTC
I tested creating the image with multiple disks in diskimage-builder and that's not supported. If you'd like to work with multiple PVs in multiple disks, this needs to be done manually. The current volume creation in diskimage-builder/tripleo is just thought for a single disk

Comment 13 mlammon 2018-04-06 16:51:30 UTC
This was tested with osp13 latest.  Looking at one of nodes (controller) which was deployed using whole disk image. 

environment:
python-tripleoclient-9.2.0-2.el7ost.noarch
instack-undercloud-8.4.0-2.el7ost.noarch
instack-8.1.1-0.20180313084439.0d768a3.el7ost.noarch
diskimage-builder-2.12.2-0.20180326010239.ffc0687.el7ost.noarch


We can see the volumes
[root@controller-0 files]# lsblk
NAME                                          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda                                           252:0    0   40G  0 disk
├─vda1                                        252:1    0 21.4G  0 part
│ ├─vg-lv_root                                253:0    0    6G  0 lvm  /
│ ├─vg-lv_tmp                                 253:1    0  876M  0 lvm  /tmp
│ ├─vg-lv_var                                 253:2    0  8.6G  0 lvm  /var
│ ├─vg-lv_log                                 253:3    0  4.9G  0 lvm  /var/log
│ ├─vg-lv_audit                               253:4    0  876M  0 lvm  /var/log/audit
│ └─vg-lv_home                                253:5    0  216M  0 lvm  /home
└─vda2                                        252:2    0   64M  0 part
loop2                                           7:2    0   16G  0 loop
├─cinder--volumes-cinder--volumes--pool_tmeta 253:6    0   16M  0 lvm
│ └─cinder--volumes-cinder--volumes--pool     253:8    0 15.2G  0 lvm
└─cinder--volumes-cinder--volumes--pool_tdata 253:7    0 15.2G  0 lvm
  └─cinder--volumes-cinder--volumes--pool     253:8    0 15.2G  0 lvm

Comment 15 Bob Fournier 2018-04-16 15:38:00 UTC
Mike - I believe fix for 1563774 is available in the latest puddle.

Comment 16 mlammon 2018-04-17 22:15:55 UTC
This can now be moved to verified with bz 1563774 being verified today in osp 13 2018-04-13.1

Comment 18 errata-xmlrpc 2018-06-27 13:33:47 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/RHEA-2018:2086