Bug 1166582

Summary: Backport /boot/*/device.map fix to augeas
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: augeasAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: codong, dyuan, juzhou, liye, lkong, mbooth, ptoscano, tzheng, virt-bugs
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: augeas-1.1.0-17.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1165975 Environment:
Last Closed: 2015-03-05 09:26:17 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:    
Bug Blocks: 1165975    

Description Richard W.M. Jones 2014-11-21 09:50:18 UTC
+++ This bug was initially created as a clone of Bug #1165975 +++

Description of problem:
File "/boot/grub2/device.map" showing is not right after converting a rhel7 guest from esx server

Version-Release number of selected component (if applicable):

augeas-1.1.0-16.el7.x86_64

To support this in virt-v2v we need a one-line change to
Augeas in RHEL 7.1:

  commit 6ee12b6a705cc5da3558847fe4782e2ac30bcc10
  Author: Mike Latimer <mlatimer>
  Date:   Mon May 5 13:08:14 2014 -0600

    Device_map: Parse all device.map files under /boot

...

--- a/lenses/device_map.aug
+++ b/lenses/device_map.aug
@@ -21,7 +21,7 @@ module Device_map =
 
   let lns = ( empty | comment | map ) *
 
-  let xfm = transform lns (incl "/boot/grub/device.map")
+  let xfm = transform lns (incl "/boot/*/device.map")
 
 (* Local Variables: *)
 (* mode: caml *)

Comment 2 Lingfei Kong 2014-12-09 02:00:47 UTC
Can reproduce with augeas-1.1.0-16.el7
Steps to reproduce:
1. #augtool print /files/boot/grub2/device.map
<Nothing>

2. #cat /usr/share/augeas/lenses/dist/device_map.aug |grep device.map
(* Parsing grub's device.map *)
  let xfm = transform lns (incl "/boot/grub/device.map")

Only include file /boot/grub/device.map but not /boot/grub2/device.map.


Verify with augeas-1.1.0-17.el7
Steps to verify:
1. #cat /boot/grub2/device.map
# this device map was generated by anaconda
(hd0)      /dev/sda

2. #augtool  print /files/boot/grub2/device.map
/files/boot/grub2/device.map
/files/boot/grub2/device.map/#comment = "this device map was generated by anaconda"
/files/boot/grub2/device.map/hd0 = "/dev/sda"

3. #cat /usr/share/augeas/lenses/dist/device_map.aug |grep device.map
(* Parsing grub's device.map *)
  let xfm = transform lns (incl "/boot/*/device.map")

This lense parse file /boot/*/device.map include /boot/grub2/device.map


So bug is fixed.

Comment 4 errata-xmlrpc 2015-03-05 09:26:17 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://rhn.redhat.com/errata/RHBA-2015-0399.html