All of lore.kernel.org
 help / color / mirror / Atom feed
* Broken changing of config parameters for inactive domains
@ 2006-12-07 18:09 Daniel P. Berrange
  2006-12-07 18:34 ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2006-12-07 18:09 UTC (permalink / raw)
  To: xen-devel

I've been testing out the inactive domain support in more depth, and looking
for any odd interactions with xm and/or libvirt. In doing so I seem to have
found some problems with changing the configuration of existing domains.

Since the config files are no longer in /etc/xen, users will no longer simply
be able to edit them to tweak parameters before booting. Changing the files
under /var/lib/xend/domains is not practical because XenD won't see the
changed files (unless it uses Inotify - which it doesn't).

I don't think we need to worry about changing every single parameter at this
time, but the basic set of memory, max memory, vcpu count should definitely
be made to work with 'xm' / XMLRPC / SEXPR  apis.  If it was practical I'd
also like to see the network & block device add/remove APIs work for inactive
domains too.


Currently, this sort of works, but results in very wierd bugs. eg changing
the VCPUs for a guest:

So, I have a guest with 2 vcpus:

  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  2981     2     r-----   2381.2
  demo                                           410     2                 0.0


And want to change it to have 8:

  # xm set-vcpus demo 8
  Command set-vcpus is deprecated.  Please use xm vcpu-set instead.
  Error: 
  Usage: xm <subcommand> [args]
  [sniped rest of error]

So it apparently failed, but it actualy succeeded....

  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  2981     2     r-----   2381.7
  demo                                           410     8                 0.0

What's even wierder, is if I now go and try to start the guest I end up
with 2 copies of it !!

  # xm start demo
  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  2981     2     r-----   2382.9
  demo                                      45   410     8     -b----      0.8
  demo                                      45   410     8     -b----      0.8

And killing it off leaves me with a half-dead config I can't get rid of
without stopping XenD and manually removing the config from disk

  # xm destroy demo
  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  2981     2     r-----   2379.8
  demo                                             1     4                24.7


The 'mem-set' and 'mem-max' also have issues with inactive domains.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Broken changing of config parameters for inactive domains
  2006-12-07 18:09 Broken changing of config parameters for inactive domains Daniel P. Berrange
@ 2006-12-07 18:34 ` Daniel P. Berrange
  2006-12-08 17:28   ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2006-12-07 18:34 UTC (permalink / raw)
  To: xen-devel

On Thu, Dec 07, 2006 at 06:09:11PM +0000, Daniel P. Berrange wrote:
> I've been testing out the inactive domain support in more depth, and looking
> for any odd interactions with xm and/or libvirt. In doing so I seem to have
> found some problems with changing the configuration of existing domains.
> 
> Since the config files are no longer in /etc/xen, users will no longer simply
> be able to edit them to tweak parameters before booting. Changing the files
> under /var/lib/xend/domains is not practical because XenD won't see the
> changed files (unless it uses Inotify - which it doesn't).
> 
> I don't think we need to worry about changing every single parameter at this
> time, but the basic set of memory, max memory, vcpu count should definitely
> be made to work with 'xm' / XMLRPC / SEXPR  apis.  If it was practical I'd
> also like to see the network & block device add/remove APIs work for inactive
> domains too.
> 
> 
> Currently, this sort of works, but results in very wierd bugs. eg changing
> the VCPUs for a guest:
> 
> So, I have a guest with 2 vcpus:
> 
>   # xm list
>   Name                                      ID   Mem VCPUs      State   Time(s)
>   Domain-0                                   0  2981     2     r-----   2381.2
>   demo                                           410     2                 0.0
> 
> 
> And want to change it to have 8:
> 
>   # xm set-vcpus demo 8
>   Command set-vcpus is deprecated.  Please use xm vcpu-set instead.
>   Error: 
>   Usage: xm <subcommand> [args]
>   [sniped rest of error]
> 
> So it apparently failed, but it actualy succeeded....
> 
>   # xm list
>   Name                                      ID   Mem VCPUs      State   Time(s)
>   Domain-0                                   0  2981     2     r-----   2381.7
>   demo                                           410     8                 0.0
> 
> What's even wierder, is if I now go and try to start the guest I end up
> with 2 copies of it !!
> 
>   # xm start demo
>   # xm list
>   Name                                      ID   Mem VCPUs      State   Time(s)
>   Domain-0                                   0  2981     2     r-----   2382.9
>   demo                                      45   410     8     -b----      0.8
>   demo                                      45   410     8     -b----      0.8

After a little more debugging, this duplicate domains problem seems to be
unrelated to the changing of config params.

I defined an inactive guest with a UUID of '66857c70-9898-fdfc-ed53-8eee3ba294bf'
which got stored on disk as 

  /var/lib/xend/domains/66857c70-9898-fdfc-ed53-8eee3ba294bf/config.sxp 

When starting the guest, however, it got a UUID of 66857c709898fdfced538eee3ba294bf
so it thought there was a dup.  So, XenD needs to normalize UUIDs to remove any
embedded '-' when saving the inactive domain config to avoid this duplicate
domains issue.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Broken changing of config parameters for inactive domains
  2006-12-07 18:34 ` Daniel P. Berrange
@ 2006-12-08 17:28   ` Daniel P. Berrange
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2006-12-08 17:28 UTC (permalink / raw)
  To: xen-devel

On Thu, Dec 07, 2006 at 06:34:47PM +0000, Daniel P. Berrange wrote:
> On Thu, Dec 07, 2006 at 06:09:11PM +0000, Daniel P. Berrange wrote:
> > I've been testing out the inactive domain support in more depth, and looking
> > for any odd interactions with xm and/or libvirt. In doing so I seem to have
> > found some problems with changing the configuration of existing domains.
> > 
> > Since the config files are no longer in /etc/xen, users will no longer simply
> > be able to edit them to tweak parameters before booting. Changing the files
> > under /var/lib/xend/domains is not practical because XenD won't see the
> > changed files (unless it uses Inotify - which it doesn't).
> > 
> > I don't think we need to worry about changing every single parameter at this
> > time, but the basic set of memory, max memory, vcpu count should definitely
> > be made to work with 'xm' / XMLRPC / SEXPR  apis.  If it was practical I'd
> > also like to see the network & block device add/remove APIs work for inactive
> > domains too.
> > 
> > 
> > Currently, this sort of works, but results in very wierd bugs. eg changing
> > the VCPUs for a guest:
> > 
> > So, I have a guest with 2 vcpus:
> > 
> >   # xm list
> >   Name                                      ID   Mem VCPUs      State   Time(s)
> >   Domain-0                                   0  2981     2     r-----   2381.2
> >   demo                                           410     2                 0.0
> > 
> > 
> > And want to change it to have 8:
> > 
> >   # xm set-vcpus demo 8
> >   Command set-vcpus is deprecated.  Please use xm vcpu-set instead.
> >   Error: 
> >   Usage: xm <subcommand> [args]
> >   [sniped rest of error]
> > 
> > So it apparently failed, but it actualy succeeded....
> > 
> >   # xm list
> >   Name                                      ID   Mem VCPUs      State   Time(s)
> >   Domain-0                                   0  2981     2     r-----   2381.7
> >   demo                                           410     8                 0.0
> > 
> > What's even wierder, is if I now go and try to start the guest I end up
> > with 2 copies of it !!
> > 
> >   # xm start demo
> >   # xm list
> >   Name                                      ID   Mem VCPUs      State   Time(s)
> >   Domain-0                                   0  2981     2     r-----   2382.9
> >   demo                                      45   410     8     -b----      0.8
> >   demo                                      45   410     8     -b----      0.8
> 
> After a little more debugging, this duplicate domains problem seems to be
> unrelated to the changing of config params.
> 
> I defined an inactive guest with a UUID of '66857c70-9898-fdfc-ed53-8eee3ba294bf'
> which got stored on disk as 
> 
>   /var/lib/xend/domains/66857c70-9898-fdfc-ed53-8eee3ba294bf/config.sxp 
> 
> When starting the guest, however, it got a UUID of 66857c709898fdfced538eee3ba294bf
> so it thought there was a dup.  So, XenD needs to normalize UUIDs to remove any
> embedded '-' when saving the inactive domain config to avoid this duplicate
> domains issue.


Just tested

  changeset:   12810:28403de6c415
  user:        Alastair Tse <atse@xensource.com>
  date:        Fri Dec 08 13:28:22 2006 +0000
  summary:     [XEND] Make sure UUID is in the right format.

And this has resolved the duplicate domain problems I was seeing - thanks
Alastair.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-08 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 18:09 Broken changing of config parameters for inactive domains Daniel P. Berrange
2006-12-07 18:34 ` Daniel P. Berrange
2006-12-08 17:28   ` Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.