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

Bug 1618548

Summary: Unable to boot rhel7.5 wholedisk image
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: python-ironic-libAssignee: Yolanda Robla <yroblamo>
Status: CLOSED CURRENTRELEASE QA Contact: Alexander Chuzhoy <sasha>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 13.0 (Queens)CC: aguetta, apevec, astupnik, bfournie, hfukumot, igreen, iwienand, jjoyce, jkreger, jschluet, lhh, mburns, morazi, ohochman, pmorey, slinaber, srevivo, yroblamo
Target Milestone: z3Keywords: TestOnly, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ironic-lib-2.12.1-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1628753 (view as bug list) Environment:
Last Closed: 2018-11-20 11:43:20 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: 1643273, 1646976    
Bug Blocks: 1628753    

Description Alexander Chuzhoy 2018-08-16 22:36:26 UTC
Unable to boot rhel7.5 wholedisk image 

Environment:
instack-undercloud-8.4.1-5.el7ost.noarch                                                                                                  
diskimage-builder-2.13.0-1.el7ost.noarch  
rhel-guest-image-7.5-146.x86_64.qcow2

Steps to reproduce:
Build a wholedisk image with:


openstack overcloud image build --image-name overcloud-hardened-full --config-file /usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images.yaml --config-file /usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images-rhel7.yaml --verbose 

Replace the overcloud-full image with the newly built one.

Try to deploy overcloud.


Result:

The overcloud nodes enter maintenance mode upon boot:
Give root password for maintenance

Comment 2 Alexander Chuzhoy 2018-08-16 23:36:23 UTC
The image fails to mount /tmp (/dev/vg/lv_tmp) and /home (/dev/vg/lv_home)

I overwritten the xfs filesystem on both and was able to successfully boot the image.

Comment 8 Alexander Chuzhoy 2018-08-17 14:11:41 UTC
Note: The failure was spotted on baremetal setup.

Comment 9 Omri Hochman 2018-08-17 17:51:42 UTC
Omri Hochman 2018-08-17 10:11:57 EDT
Flags: qe_test_coverage?

we would need to consider to re-run/convert this automation-job to run on BM and update the test-case accordingly.

Comment 10 Yolanda Robla 2018-08-23 10:42:22 UTC
I am working on testing that now. Images work on vms and isolated on baremetal, but somehow they are failing integrated into tripleo. I am testing with different approaches until we figure the origin of the problem.

Comment 11 Yolanda Robla 2018-08-23 13:18:31 UTC
As soon as images are copied into the baremetal servers, i can see volumes being created in the undercloud (this should not happen), and I/O errors there:

LANG=EN pvs
   WARNING: Not using lvmetad because duplicate PVs were found.
   WARNING: Use multipath or vgimportclone to resolve duplicate PVs?
   WARNING: After duplicates are resolved, run "pvscan --cache" to enable lvmetad.
   /dev/vg/lv_root: read failed after 0 of 4096 at 0: Input/output error
   /dev/vg/lv_root: read failed after 0 of 4096 at 6438191104: Input/output error
   /dev/vg/lv_root: read failed after 0 of 4096 at 6438248448: Input/output error
   /dev/vg/lv_root: read failed after 0 of 4096 at 4096: Input/output error

Comment 12 Yolanda Robla 2018-08-23 18:58:33 UTC
Random Errors when booting, on different volumes:

XFS (dm-4): Mounting V5 Filesystem
systemd-journald[735]: Received request to flush runtime journal from PID 1
systemd-journald[735]: File /var/log/journal/xxxx/system.journal corrupted or uncleanly shutdown, renaming and replacing.
XFS (dm-4): Log inconsistent (didn't find previous header)
XFS (dm-4): failed to find log head
XFS (dm-4): log mount/recovery failed: error -5
XFS (dm-4): log mount failed
Give root password for maintenance

Comment 13 Yolanda Robla 2018-08-24 14:43:28 UTC
Problem is still there. Things that i tried:
- create a config-2 partition, to see if problem was caused when ironic was creating config drive partition
- automount volumes on init, to check if we were hitting https://bugzilla.redhat.com/show_bug.cgi?id=1364092 . It continues failing after that

Comment 14 Yolanda Robla 2018-08-25 08:21:21 UTC
When looking at boot image, i can see, when booting:

File /var/log/journal/xxx/system.journal corrupted or uncleanly shut down, renaming and replacing. The images that we generate from diskimage-builder, have /vr/log/journal empty.
Ian, can i have your thoughts there?

Comment 15 Ian Wienand 2018-08-27 06:30:12 UTC
Ok, centos-minimal builds do not have a /var/log/journal directory.  It looks like we have in /etc/systemd/journald.conf

---
[Journal]
Storage=persistent
---

which I guess is just the default, I'm not aware that we set that in any way.  So by my reading of everything, the systemd-journal service should be happy to create /var/log/journal.  Indeed that's what I see on a live system, where /var/log/journal which must have been created at boot 

---
-bash-4.2# uptime
 05:55:53 up 36 min,  1 user,  load average: 1.45, 0.88, 0.75
-bash-4.2# date --date="36 minutes ago"
Mon Aug 27 05:20:23 UTC 2018
-bash-4.2# ls -l /var/log/journal/
total 8
drwxr-sr-x+ 2 root systemd-journal 4096 Aug 27 05:19 3b9c77317d8a4694ba3e42dfb4ebec92
---

I don't see anything relating to this in the boot logs on a standard system.

@Yolanda; I'm not following the following comment 

> As soon as images are copied into the baremetal servers, 
> i can see volumes being created in the undercloud (this should not happen), and I/O errors there:

What do you mean by "volumes being created in the undercloud"?  I'm wondering if

---
WARNING: Not using lvmetad because duplicate PVs were found.
---

Is a clue here.  If LVM was somehow getting confused about PV's because they have the same UUID or something, that could lead to it mounting the wrong PV in the wrong place; the upper layers would be all messed up and it would present itself as a filesystem corruption?  But I'm not fully following where we are actually seeing those messages.

Am i also understanding correctly that the image that produced as the output of "openstack overcloud image build" works when booted in isolation as a VM?  There seem to be a lot of transitions to making this a RAW image a rolling it out as the whole-disk images; including the 64mb configuration drive that is added (as mentioned).  If that was getting written in the wrong spot ...

Comment 31 Yolanda Robla 2018-09-13 15:49:05 UTC
We found the origin of the problem. There is this patch:

https://review.openstack.org/#/c/534442/

That added a conv=sparse to the dd copy of the image. This seems to be causing trouble with empty volumes (our /home volume is empty), and it was causing the failure to boot. When removing that patch, it worked fine.

Comment 32 Alexander Chuzhoy 2018-09-20 18:46:43 UTC
Tried this patch https://code.engineering.redhat.com/gerrit/#/c/150095/ on OSP13.

After applying it had to restart  openstack-ironic-conductor.service and then was able to boot instance with wholedisk image.

Comment 43 Bob Fournier 2018-10-30 11:42:35 UTC
Agree with Aviv. No need for signing a new hot fix.

Yolanda - usually in engineering we are responsible for building the package and support gets the pkg signed for delivery to the customer.

Comment 49 Alexander Chuzhoy 2018-11-19 20:14:52 UTC
Verified:

Environment:
python-ironic-lib-2.12.1-2.el7ost.noarch

The reported issue doesn't reproduce. Successfully booted machines and deployed OC.

Comment 50 Lon Hohberger 2018-11-20 11:43:20 UTC
According to our records, this should be resolved by python-ironic-lib-2.12.1-2.el7ost.  This build is available now.