Re: [Libguestfs] [PATCH 0/5] Improve inspection of /usr filesystems

2016-12-07 Thread Richard W.M. Jones
On Wed, Dec 07, 2016 at 10:49:44AM +0100, Pino Toscano wrote:
> On Wednesday, 7 December 2016 08:29:54 CET Richard W.M. Jones wrote:
> > On Tue, Dec 06, 2016 at 04:29:17PM +0100, Pino Toscano wrote:
> > > Hi,
> > > 
> > > this patch series improves the way /usr filesystems are handled: tag
> > > them appropriately, so later on we can find them and merge results they
> > > contain directly back for the root filesystem.
> > > 
> > > The series includes also a new private debug API, and its usage to fix
> > > the resolution of /dev/mapper/.. devices found in fstab; without it,
> > > LVM /usr filesystems are not recognized as belonging to their roots.
> > > Maybe a better API for this could be added, but since it's something
> > > only related to the appliance then can stay internal for now. (Better
> > > suggestions always welcome, of course.)
> > 
> > Firstly, I still think we need:
> > 
> >   [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
> > 
> > although it's not related to the current patch series.
> 
> This was not an issue in the data of RHBZ#140147, do you have an example
> of guest with such paths in fstab? So far I never seen one myself.

I don't, but it could happen and I see no problem with canonicalizing
these paths.  Having these "weird" paths in fstab causes the same
paths to be returned by guestfs_inspect_get_filesystems and might
cause problems for other API users.

> > >   daemon: debug: new "exists" subcommand
> > >   inspect: fix existance check of /dev/mapper devices
> > 
> > This is very ugly.  We really shouldn't be calling a debug API from
> > inspection code.
> 
> As mentioned above, any better suggestion is welcome. I didn't want to
> add a new public API for inspecting files in the appliance itself --
> what about something like internal_exists?

I'll follow up on the commit message.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 0/5] Improve inspection of /usr filesystems

2016-12-07 Thread Pino Toscano
On Wednesday, 7 December 2016 08:29:54 CET Richard W.M. Jones wrote:
> On Tue, Dec 06, 2016 at 04:29:17PM +0100, Pino Toscano wrote:
> > Hi,
> > 
> > this patch series improves the way /usr filesystems are handled: tag
> > them appropriately, so later on we can find them and merge results they
> > contain directly back for the root filesystem.
> > 
> > The series includes also a new private debug API, and its usage to fix
> > the resolution of /dev/mapper/.. devices found in fstab; without it,
> > LVM /usr filesystems are not recognized as belonging to their roots.
> > Maybe a better API for this could be added, but since it's something
> > only related to the appliance then can stay internal for now. (Better
> > suggestions always welcome, of course.)
> 
> Firstly, I still think we need:
> 
>   [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
> 
> although it's not related to the current patch series.

This was not an issue in the data of RHBZ#140147, do you have an example
of guest with such paths in fstab? So far I never seen one myself.

> In regards to this series:
> 
> > Pino Toscano (5):
> >   inspect: change is_root flag into enum
> >   inspect: mark CoreOS /usr partitions with own USR role
> 
> These are fine.

Pushed, thanks.

> >   daemon: debug: new "exists" subcommand
> >   inspect: fix existance check of /dev/mapper devices
> 
> This is very ugly.  We really shouldn't be calling a debug API from
> inspection code.

As mentioned above, any better suggestion is welcome. I didn't want to
add a new public API for inspecting files in the appliance itself --
what about something like internal_exists?

Thanks,
-- 
Pino Toscano

signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH 0/5] Improve inspection of /usr filesystems

2016-12-07 Thread Richard W.M. Jones
On Tue, Dec 06, 2016 at 04:29:17PM +0100, Pino Toscano wrote:
> Hi,
> 
> this patch series improves the way /usr filesystems are handled: tag
> them appropriately, so later on we can find them and merge results they
> contain directly back for the root filesystem.
> 
> The series includes also a new private debug API, and its usage to fix
> the resolution of /dev/mapper/.. devices found in fstab; without it,
> LVM /usr filesystems are not recognized as belonging to their roots.
> Maybe a better API for this could be added, but since it's something
> only related to the appliance then can stay internal for now. (Better
> suggestions always welcome, of course.)

Firstly, I still think we need:

  [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.

although it's not related to the current patch series.

In regards to this series:

> Pino Toscano (5):
>   inspect: change is_root flag into enum
>   inspect: mark CoreOS /usr partitions with own USR role

These are fine.

>   daemon: debug: new "exists" subcommand
>   inspect: fix existance check of /dev/mapper devices

This is very ugly.  We really shouldn't be calling a debug API from
inspection code.

>   inspect: gather info from /usr filesystems as well (RHBZ#1401474)

I have specific comments on this patch.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 0/5] Improve inspection of /usr filesystems

2016-12-06 Thread Pino Toscano
Hi,

this patch series improves the way /usr filesystems are handled: tag
them appropriately, so later on we can find them and merge results they
contain directly back for the root filesystem.

The series includes also a new private debug API, and its usage to fix
the resolution of /dev/mapper/.. devices found in fstab; without it,
LVM /usr filesystems are not recognized as belonging to their roots.
Maybe a better API for this could be added, but since it's something
only related to the appliance then can stay internal for now. (Better
suggestions always welcome, of course.)

Thanks,

Pino Toscano (5):
  inspect: change is_root flag into enum
  inspect: mark CoreOS /usr partitions with own USR role
  daemon: debug: new "exists" subcommand
  inspect: fix existance check of /dev/mapper devices
  inspect: gather info from /usr filesystems as well (RHBZ#1401474)

 daemon/debug.c | 39 ++
 src/guestfs-internal.h | 13 ++--
 src/inspect-fs-cd.c|  2 +-
 src/inspect-fs-unix.c  | 42 ++-
 src/inspect-fs.c   | 26 ---
 src/inspect.c  | 90 +-
 6 files changed, 187 insertions(+), 25 deletions(-)

-- 
2.7.4

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs