[virt-tools-list] [virt-manager PATCH] ui: disable setting uid/gid_start for user namespace

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Thu Feb 27 01:22:45 UTC 2014



> -----Original Message-----
> From: Cole Robinson [mailto:crobinso at redhat.com]
> Sent: Wednesday, February 26, 2014 11:07 PM
> To: Chen Hanxiao; virt-tools-list at redhat.com
> Subject: Re: [virt-tools-list] [virt-manager PATCH] ui: disable setting
uid/gid_start
> for user namespace
> 
> On 02/25/2014 09:29 PM, Chen Hanxiao wrote:
> > Libvirt only allowed uid/gid_start configured as 0.
> > This patch will disable config uid/gid_start in UI.
> >
> > Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> > ---
> >  ui/details.ui          | 60
> +++++++++++++++++++++++---------------------------
> >  virtManager/details.py | 12 ++--------
> >  virtManager/domain.py  |  8 +++----
> >  3 files changed, 34 insertions(+), 46 deletions(-)
> >
> > diff --git a/ui/details.ui b/ui/details.ui
> > index 71e4ed8..7bd5121 100644
> > --- a/ui/details.ui
> > +++ b/ui/details.ui
> > @@ -1,5 +1,5 @@
> > diff --git a/virtManager/domain.py b/virtManager/domain.py
> > index db21ae4..6af08cc 100644
> > --- a/virtManager/domain.py
> > +++ b/virtManager/domain.py
> > @@ -577,17 +577,17 @@ class vmmDomain(vmmLibvirtObject):
> >      # Idmap config define methods
> >      def define_idmap(self, idmap_list):
> >          def change(guest):
> > -            guest.idmap.uid_start = uid_start
> > +            guest.idmap.uid_start = 0
> >              guest.idmap.uid_target = uid_target
> >              guest.idmap.uid_count = uid_count
> > -            guest.idmap.gid_start = gid_start
> > +            guest.idmap.gid_start = 0
> 
> If libvirt ever supports non 0, this would overwrite any prefigured
> uid_start/gid_start.
> 
> Will libvirt fill in 0 if it isn't specified?
> 
> - Cole

I test this scenario by virsh:

a) none 0 value
b) no uid/gid_start member
c) blank for uid/gid_start

Libvirt coulde not accept all of them, it will throw errors.

- Chen





More information about the virt-tools-list mailing list