Possible bug with fsimage/pygrub
A message that is not in the archive (sent off-list or not yet received): [email protected]
All,
Having a very strange problem. I created a CentOS 7 PV vm but could not get pygrub to pick-up the grub entries. I did some fault finding and concluded that fsimage was unable to find the grub.cfg. I could start the vm as an HVM guest with no problem. I renamed the grub2 folder to be grub2.x and cp -a that back to grub2. pygrub/fsimage were able to find the file after that. fsimage couldn't see grub2.x/grub.cfg.
I wrote small test case in python to illustrate the issue:
I can only think it is a bug in fsimage, or there is something very hidden about that directory that is causing this.
Any suggestions would be most welcome,
Thanks,
Ian
import fsimagefs = fsimage.open('/dev/xen2/email', 1048576, "seclabel")if fs.file_exists('/grub2.x/grub.cfg'): print "found"else: print "not found"if fs.file_exists('/grub2/grub.cfg'): print "found"else: print "not found"
The results are:- # python ~/test.py not foundfound
(mounted locally, after an update, but same behaviour as previously. The partition is on LVM and is formatted ext4)# ls -al grub2*grub2:total 52drwxr-xr-x. 6 root root 4096 May 31 02:39 .dr-xr-xr-x. 7 root root 4096 May 31 02:41 ..-rw-r--r--. 1 root root 86 Jan 10 23:32 device.mapdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 fonts-rw-r--r--. 1 root root 4806 May 31 02:39 grub.cfg-rw-r--r--. 1 root root 4045 Jan 10 23:33 grub.cfg.1496194637.rpmsave-rw-r--r--. 1 root root 1024 May 31 02:39 grubenvdrwxr-xr-x. 2 root root 12288 Jan 10 23:32 i386-pcdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 localedrwxr-xr-x. 3 root root 4096 Jan 10 23:28 themes-rw-r--r--. 1 root root 0 May 31 02:13 xxxx grub2.x:total 44drwxr-xr-x. 6 root root 4096 May 31 02:13 .dr-xr-xr-x. 7 root root 4096 May 31 02:41 ..-rw-r--r--. 1 root root 86 Jan 10 23:32 device.mapdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 fonts-rw-r--r--. 1 root root 4045 Jan 10 23:33 grub.cfg-rw-r--r--. 1 root root 1024 Jan 10 23:33 grubenvdrwxr-xr-x. 2 root root 12288 Jan 10 23:32 i386-pcdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 localedrwxr-xr-x. 3 root root 4096 Jan 10 23:28 themes-rw-r--r--. 1 root root 0 May 31 02:13 xxxx
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 4 lines · Ian Murray
All,
Having a very strange problem. I created a CentOS 7 PV vm but could not get pygrub to pick-up the grub entries. I did some fault finding and concluded thatfsimagewas unable to find the grub.cfg. I could start the vm as an HVM guest with no problem. I renamed thegrub2folder to begrub2.xandcp -athat back togrub2. pygrub/fsimage were able to find the file after that. fsimage couldn't see grub2.x/grub.cfg.
Quoted 10 lines
I wrote small test case in python to illustrate the issue:
I can only think it is a bug in fsimage, or there is something very hidden about that directory that is causing this.
Any suggestions would be most welcome,
Thanks,
Ian
import fsimagefs =fsimage.open('/dev/xen2/email', 1048576, "seclabel")if fs.file_exists('/grub2.x/grub.cfg'): print "found"else: print "not found"if fs.file_exists('/grub2/grub.cfg'): print "found"else: print "not found"
The results are:- # python ~/test.py not foundfound
(mounted locally, after an update, but same behaviour as previously. The partition is on LVM and is formatted ext4)# ls -al grub2*grub2:total 52drwxr-xr-x. 6 root root 4096 May 31 02:39 .dr-xr-xr-x. 7 root root 4096 May 31 02:41 ..-rw-r--r--. 1 root root 86 Jan 10 23:32 device.mapdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 fonts-rw-r--r--. 1 root root 4806 May 31 02:39 grub.cfg-rw-r--r--. 1 root root 4045 Jan 10 23:33 grub.cfg.1496194637.rpmsave-rw-r--r--. 1 root root 1024 May 31 02:39 grubenvdrwxr-xr-x. 2 root root 12288 Jan 10 23:32 i386-pcdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 localedrwxr-xr-x. 3 root root 4096 Jan 10 23:28 themes-rw-r--r--. 1 root root 0 May 31 02:13 xxxx grub2.x:total 44drwxr-xr-x. 6 root root 4096 May 31 02:13 .dr-xr-xr-x. 7 root root 4096 May 31 02:41 ..-rw-r--r--. 1 root root 86 Jan 10 23:32 device.mapdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 fonts-rw-r--r--. 1 root root 4045 Jan 10 23:33 grub.cfg-rw-r--r--. 1 root root 1024 Jan 10 23:33 grubenvdrwxr-xr-x. 2 root root 12288 Jan 10 23:32 i386-pcdrwxr-xr-x. 2 root root 4096 Jan 10 23:32 localedrwxr-xr-x. 3 root root 4096 Jan 10 23:28 themes-rw-r--r--. 1 root root 0 May 31 02:13 xxxx
What about extended attributes and other meta data? Maybe they are not retained after you copied the files?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel