[openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-06-23 Thread Markus Zoeller
 Daniel P. Berrange berrange at redhat.com wrote on 04/15/2015 
11:35:39 
 AM:

  From: Daniel P. Berrange berrange at redhat.com
  To: OpenStack Development Mailing List (not for usage questions) 
  openstack-dev at lists.openstack.org
  Date: 04/15/2015 11:42 AM
  Subject: Re: [openstack-dev] [nova] why is evacuate marked as missing 
  for libvirt?
  
  On Tue, Apr 14, 2015 at 01:44:45PM -0400, Russell Bryant wrote:
   On 04/14/2015 12:22 PM, Matt Riedemann wrote:
This came up in IRC this morning, but the hypervisor support 
matrix 
 is
listing evacuate as 'missing' for the libvirt driver:

http://docs.openstack.org/developer/nova/support-
  matrix.html#operation_evacuate


Does anyone know why that is?  The rebuild method in the compute 
 manager
just re-uses other virt driver operations so by default it's 
 implemented
by all drivers.  The only one that overrides rebuild for evacuate 
is 
 the
ironic driver.
   
   I think it's a case where there are a couple of different things
   referred to with 'evacuate'.  I believe this was originally added to
   track something that was effectively XenServer specific and the
   description of the feature seems to reflect that.  We've since added 

 the
   more generic 'evacuate' API, so it's pretty confusing.  It should
   probably be reworked to track which drivers work with the 'evacuate' 

 API
   call, and perhaps have a different entry for whatever this different
   XenServer thing is (or was).
  
  Yep, if there's any mistakes or bizarre things in the support matrix
  just remember that the original wiki page had essentially zero 
 information
  about what each feature item was referring to - just the two/three 
word
  feature name. When I turned it into formal docs I tried to add better
  explanations, but it is entirely possible my interpretations were 
wrong
  in places. So if in doubt assume the support matrix is wrong, and just
  send a review to update it to some saner state with better description
  of the feature. Pretty much all the features in the matrix could do
  with better explanations and/or being broken up into finer grained
  features - there's plenty of scope for people to submit patches to
  improve the granularity of items.

 I think that the confusion is caused by something called the host
 maintenance mode [1]. When this is enabled, an evacuate is triggered
 by the underlying hypervisor. This can mode can be set by the CLI [2] 
 and is not implemented by the libvirt driver.
 The probably intented API for the feature evacuate is [3] which can 
 be triggered via CLI with:
 * nova evacuate server
 * nova host-evacuate host
 * nova host-evacuate-live host

 The feature evacuate has hereby a dependency to live-migration. As
 the system z platform doesn't yet has [4] merged, evacuate is there 
 partial [5] (TODO for me) whereas for x86 there should be complete.
 Please correct me if I'm wrong here.

 Unfortunately I couldn't find any tempest tests for the evacuate 
 feature, so I tested in manually.

 [1] virt.driver.ComputeDriver.host_maintenance_mode(self, host, mode)
  
 
https://github.com/openstack/nova/blob/2015.1.0rc1/nova/virt/driver.py#L1016
 [2] Nova CLI; command nova host-update
  
 http://docs.openstack.org/cli-reference/content/novaclient_commands.html
 [3] nova.api.openstack.compute.contrib.evacuate
  
 
https://github.com/openstack/nova/blob/2015.1.0rc1/nova/api/openstack/compute/contrib/evacuate.py
 [4] libvirt: handle NotSupportedError in compareCPU
  https://review.openstack.org/#/c/166130/
 [5] Update hypervisor support matrix with column for kvm on system z
  https://review.openstack.org/#/c/172391/
 Regards,
 Markus Zoeller (markus_z)


Today the topic about evacuate and host maintenance mode came up
again in the IRC nova channel. I'd like to try again to state how I
understand it. At the end will be suggestions how this could be solved.


CLI - API - Driver

The mapping between the python-novaclient, the nova REST API and
the nova.virt.driver looks like this:

CLIAPI Driver
----
nova host-update   hosts.pyhost_maintenance_mode()
   update()set_host_enabled()
----
nova evacuate  evacuate.py rebuild()
   _evacuate() 
----   
 
nova host-evacuate evacuate.py rebuild()
[calls API in a loop]  _evacuate()
----
nova host-evacuate-liveadmin_actions.pylive_migration()
[calls API in a loop]  _migrate_live()
----

The CLI command nova host-update [1] calls the update 

Re: [openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-04-17 Thread Markus Zoeller
Daniel P. Berrange berra...@redhat.com wrote on 04/15/2015 11:35:39 
AM:

 From: Daniel P. Berrange berra...@redhat.com
 To: OpenStack Development Mailing List (not for usage questions) 
 openstack-dev@lists.openstack.org
 Date: 04/15/2015 11:42 AM
 Subject: Re: [openstack-dev] [nova] why is evacuate marked as missing 
 for libvirt?
 
 On Tue, Apr 14, 2015 at 01:44:45PM -0400, Russell Bryant wrote:
  On 04/14/2015 12:22 PM, Matt Riedemann wrote:
   This came up in IRC this morning, but the hypervisor support matrix 
is
   listing evacuate as 'missing' for the libvirt driver:
   
   http://docs.openstack.org/developer/nova/support-
 matrix.html#operation_evacuate
   
   
   Does anyone know why that is?  The rebuild method in the compute 
manager
   just re-uses other virt driver operations so by default it's 
implemented
   by all drivers.  The only one that overrides rebuild for evacuate is 
the
   ironic driver.
  
  I think it's a case where there are a couple of different things
  referred to with 'evacuate'.  I believe this was originally added to
  track something that was effectively XenServer specific and the
  description of the feature seems to reflect that.  We've since added 
the
  more generic 'evacuate' API, so it's pretty confusing.  It should
  probably be reworked to track which drivers work with the 'evacuate' 
API
  call, and perhaps have a different entry for whatever this different
  XenServer thing is (or was).
 
 Yep, if there's any mistakes or bizarre things in the support matrix
 just remember that the original wiki page had essentially zero 
information
 about what each feature item was referring to - just the two/three word
 feature name. When I turned it into formal docs I tried to add better
 explanations, but it is entirely possible my interpretations were wrong
 in places. So if in doubt assume the support matrix is wrong, and just
 send a review to update it to some saner state with better description
 of the feature. Pretty much all the features in the matrix could do
 with better explanations and/or being broken up into finer grained
 features - there's plenty of scope for people to submit patches to
 improve the granularity of items.

I think that the confusion is caused by something called the host
maintenance mode [1]. When this is enabled, an evacuate is triggered
by the underlying hypervisor. This can mode can be set by the CLI [2] 
and is not implemented by the libvirt driver.
The probably intented API for the feature evacuate is [3] which can 
be triggered via CLI with:
* nova evacuate server
* nova host-evacuate host
* nova host-evacuate-live host

The feature evacuate has hereby a dependency to live-migration. As
the system z platform doesn't yet has [4] merged, evacuate is there 
partial [5] (TODO for me) whereas for x86 there should be complete.
Please correct me if I'm wrong here.

Unfortunately I couldn't find any tempest tests for the evacuate 
feature, so I tested in manually.

[1] virt.driver.ComputeDriver.host_maintenance_mode(self, host, mode)

https://github.com/openstack/nova/blob/2015.1.0rc1/nova/virt/driver.py#L1016
[2] Nova CLI; command nova host-update

http://docs.openstack.org/cli-reference/content/novaclient_commands.html
[3] nova.api.openstack.compute.contrib.evacuate

https://github.com/openstack/nova/blob/2015.1.0rc1/nova/api/openstack/compute/contrib/evacuate.py
[4] libvirt: handle NotSupportedError in compareCPU
https://review.openstack.org/#/c/166130/
[5] Update hypervisor support matrix with column for kvm on system z
https://review.openstack.org/#/c/172391/

Regards,
Markus Zoeller (markus_z)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-04-15 Thread Daniel P. Berrange
On Tue, Apr 14, 2015 at 01:44:45PM -0400, Russell Bryant wrote:
 On 04/14/2015 12:22 PM, Matt Riedemann wrote:
  This came up in IRC this morning, but the hypervisor support matrix is
  listing evacuate as 'missing' for the libvirt driver:
  
  http://docs.openstack.org/developer/nova/support-matrix.html#operation_evacuate
  
  
  Does anyone know why that is?  The rebuild method in the compute manager
  just re-uses other virt driver operations so by default it's implemented
  by all drivers.  The only one that overrides rebuild for evacuate is the
  ironic driver.
 
 I think it's a case where there are a couple of different things
 referred to with 'evacuate'.  I believe this was originally added to
 track something that was effectively XenServer specific and the
 description of the feature seems to reflect that.  We've since added the
 more generic 'evacuate' API, so it's pretty confusing.  It should
 probably be reworked to track which drivers work with the 'evacuate' API
 call, and perhaps have a different entry for whatever this different
 XenServer thing is (or was).

Yep, if there's any mistakes or bizarre things in the support matrix
just remember that the original wiki page had essentially zero information
about what each feature item was referring to - just the two/three word
feature name. When I turned it into formal docs I tried to add better
explanations, but it is entirely possible my interpretations were wrong
in places. So if in doubt assume the support matrix is wrong, and just
send a review to update it to some saner state with better description
of the feature. Pretty much all the features in the matrix could do
with better explanations and/or being broken up into finer grained
features - there's plenty of scope for people to submit patches to
improve the granularity of items.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-04-14 Thread Matt Riedemann
This came up in IRC this morning, but the hypervisor support matrix is 
listing evacuate as 'missing' for the libvirt driver:


http://docs.openstack.org/developer/nova/support-matrix.html#operation_evacuate

Does anyone know why that is?  The rebuild method in the compute manager 
just re-uses other virt driver operations so by default it's implemented 
by all drivers.  The only one that overrides rebuild for evacuate is the 
ironic driver.


--

Thanks,

Matt Riedemann


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-04-14 Thread Russell Bryant
On 04/14/2015 12:22 PM, Matt Riedemann wrote:
 This came up in IRC this morning, but the hypervisor support matrix is
 listing evacuate as 'missing' for the libvirt driver:
 
 http://docs.openstack.org/developer/nova/support-matrix.html#operation_evacuate
 
 
 Does anyone know why that is?  The rebuild method in the compute manager
 just re-uses other virt driver operations so by default it's implemented
 by all drivers.  The only one that overrides rebuild for evacuate is the
 ironic driver.

I think it's a case where there are a couple of different things
referred to with 'evacuate'.  I believe this was originally added to
track something that was effectively XenServer specific and the
description of the feature seems to reflect that.  We've since added the
more generic 'evacuate' API, so it's pretty confusing.  It should
probably be reworked to track which drivers work with the 'evacuate' API
call, and perhaps have a different entry for whatever this different
XenServer thing is (or was).

 This is allows a host to be placed into maintenance mode,

This can be done with 'nova service-disable' for libvirt, but IIRC was
directly a part of the XenServer feature.

 automatically triggering migration of any running instances to an
 alternative host and preventing new instances from being launched

and this isn't a part of the 'evacuate' API call at all.  The API call
expects that the hypervisor is gone/dead.  There's no automatic moving
of stuff running.


-- 
Russell Bryant

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] why is evacuate marked as missing for libvirt?

2015-04-14 Thread John Garbutt
On 14 April 2015 at 18:44, Russell Bryant rbry...@redhat.com wrote:
 On 04/14/2015 12:22 PM, Matt Riedemann wrote:
 This came up in IRC this morning, but the hypervisor support matrix is
 listing evacuate as 'missing' for the libvirt driver:

 http://docs.openstack.org/developer/nova/support-matrix.html#operation_evacuate


 Does anyone know why that is?  The rebuild method in the compute manager
 just re-uses other virt driver operations so by default it's implemented
 by all drivers.  The only one that overrides rebuild for evacuate is the
 ironic driver.

 I think it's a case where there are a couple of different things
 referred to with 'evacuate'.  I believe this was originally added to
 track something that was effectively XenServer specific and the
 description of the feature seems to reflect that.  We've since added the
 more generic 'evacuate' API, so it's pretty confusing.  It should
 probably be reworked to track which drivers work with the 'evacuate' API
 call, and perhaps have a different entry for whatever this different
 XenServer thing is (or was).

 This is allows a host to be placed into maintenance mode,

 This can be done with 'nova service-disable' for libvirt, but IIRC was
 directly a part of the XenServer feature.

 automatically triggering migration of any running instances to an
 alternative host and preventing new instances from being launched

 and this isn't a part of the 'evacuate' API call at all.  The API call
 expects that the hypervisor is gone/dead.  There's no automatic moving
 of stuff running.

Oh right, that was part of the experimental support for XenServer
pools. Basically using the pool's ability to live-migrate VMs off that
host. I would be shocked if that untested feature still works, I am
hoping we can finally deprecate the current XenAPI pool support soon.

I would nuke that, and replace it with the regular evacuate API.
(XenServer driver supports the newer evacuate API in the normal way,
AFAIK).

Thanks,
John

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev