Re: Disk_config lens for Augeas
On Fri, Sep 2, 2011 at 2:53 PM, Michael Tautschnig m...@debian.org wrote: Hi again, [...] I have noticed that the schema on the wiki is outdated, and sometimes not functional even. With the lens in the current state, I've been able to successfully parse 477 disk_config files we use in production. I'd be happy to get more tricky cases to test if you wish to send some to me. I think the following three examples should be of such nature: Config 1: disk_config disk1 bootable:1 preserve_always:all always_format:5,6,7,8,9,10,11 primary - 0 - - primary - 0 - - logical / 0 ext3 rw,relatime,errors=remount-ro createopts=-c -j logical swap 0 swap sw logical /var 0 ext3 rw,relatime createopts=-m 5 -j logical /tmp 0 ext3 rw createopts=-m 0 -j logical /usr 0 ext3 rw,relatime createopts=-j logical /home 0 ext3 rw,relatime,nosuid,nodevcreateopts=-m 1 -j logical /wrk 0 ext3 rw,relatime,nosuid,nodevcreateopts=-m 1 -j logical /transfer 0 vfat rw Config 2: disk_config /dev/sda primary - 250M - - primary - 20G - - logical - 8G- - logical - 4G- - logical - 5G- - disk_config /dev/sdb sameas:/dev/sda disk_config raid raid1 /boot sda1,sdb1 ext3 defaults raid1 / sda2,sdb2 ext3 defaults,errors=remount-ro raid1 swap sda5,sdb5 swap defaults raid1 /tmp sda6,sdb6 ext3 defaults createopts=-m 1 raid1 /var sda7,sdb7 ext3 defaults Config 3: disk_config /dev/sdb primary / 21750 ext3 defaults,errors=remount-ro primary /boot 250ext3 defaults logical - 4000 - - logical - 2000 - - logical - 10-- - disk_config cryptsetup randinit swap swap /dev/sdb5 swap defaults tmp /tmp /dev/sdb6 ext2 defaults luks /local00 /dev/sdb7 ext3 defaults,errors=remount-ro createopts=-m 0 I updated the lens to support these examples. See [0] to see how they are parsed by Augeas. Cheers, Raphaël [0] http://git.fedorahosted.org/git/?p=augeas.git;a=blob;f=lenses/tests/test_fai_diskconfig.aug;h=f35feda5e3118692d29c0b45dc6685735f8ff4eb;hb=11c16475a064ce20edd19a7bf8a998e4fcb5e571
Re: Disk_config lens for Augeas
Hi, [...] This mail is to inform you that a new lens for FAI disk_config files was added to Augeas. It can currently be found in the git repository of the Augeas project [1]. This lens will turn disk_config files into a tree that can be parsed with xpath using Augeas. [...] Thanks a lot for this nice work! [...] Bug reports, suggestions, patches are all welcome. I'd have two suggestions, yes: - You should probably use http://wiki.fai-project.org/wiki/Setup-storage as a more permanent URL. - Yet I'm afraid the information on the wiki is partly outdated. The most up-to-date information is in the man page of setup-storage. If you find the time to check consistency of the grammars that would be awesome. Thanks a lot, Michael pgpQqEdncMHdL.pgp Description: PGP signature
Re: Disk_config lens for Augeas
On Fri, Sep 2, 2011 at 2:24 PM, Michael Tautschnig m...@debian.org wrote: Hi, [...] This mail is to inform you that a new lens for FAI disk_config files was added to Augeas. It can currently be found in the git repository of the Augeas project [1]. This lens will turn disk_config files into a tree that can be parsed with xpath using Augeas. [...] Thanks a lot for this nice work! [...] Bug reports, suggestions, patches are all welcome. I'd have two suggestions, yes: - You should probably use http://wiki.fai-project.org/wiki/Setup-storageas a more permanent URL. This URL is only put in my email as an example of what the lens can do. It is not actually used anywhere in the code. - Yet I'm afraid the information on the wiki is partly outdated. The most up-to-date information is in the man page of setup-storage. If you find the time to check consistency of the grammars that would be awesome. I have noticed that the schema on the wiki is outdated, and sometimes not functional even. With the lens in the current state, I've been able to successfully parse 477 disk_config files we use in production. I'd be happy to get more tricky cases to test if you wish to send some to me. Raphaël
Re: Disk_config lens for Augeas
Hi again, [...] I have noticed that the schema on the wiki is outdated, and sometimes not functional even. With the lens in the current state, I've been able to successfully parse 477 disk_config files we use in production. I'd be happy to get more tricky cases to test if you wish to send some to me. I think the following three examples should be of such nature: Config 1: disk_config disk1 bootable:1 preserve_always:all always_format:5,6,7,8,9,10,11 primary - 0 - - primary - 0 - - logical / 0 ext3 rw,relatime,errors=remount-ro createopts=-c -j logical swap 0 swap sw logical /var 0 ext3 rw,relatime createopts=-m 5 -j logical /tmp 0 ext3 rw createopts=-m 0 -j logical /usr 0 ext3 rw,relatime createopts=-j logical /home 0 ext3 rw,relatime,nosuid,nodevcreateopts=-m 1 -j logical /wrk 0 ext3 rw,relatime,nosuid,nodevcreateopts=-m 1 -j logical /transfer 0 vfat rw Config 2: disk_config /dev/sda primary - 250M - - primary - 20G - - logical - 8G- - logical - 4G- - logical - 5G- - disk_config /dev/sdb sameas:/dev/sda disk_config raid raid1 /boot sda1,sdb1 ext3 defaults raid1 / sda2,sdb2 ext3 defaults,errors=remount-ro raid1 swap sda5,sdb5 swap defaults raid1 /tmp sda6,sdb6 ext3 defaults createopts=-m 1 raid1 /var sda7,sdb7 ext3 defaults Config 3: disk_config /dev/sdb primary / 21750 ext3 defaults,errors=remount-ro primary /boot 250ext3 defaults logical - 4000 - - logical - 2000 - - logical - 10-- - disk_config cryptsetup randinit swap swap /dev/sdb5 swap defaults tmp /tmp /dev/sdb6 ext2 defaults luks /local00 /dev/sdb7 ext3 defaults,errors=remount-ro createopts=-m 0 Thanks again for your work, Michael pgpVUs3UR1q4z.pgp Description: PGP signature