Re: [openstack-dev] Launch of an instance from a bootable volume fails on Xen env

2016-04-07 Thread Eugen Block

Hi,


did you file a bug for Horizon about this?


I did file a bug for nova about this, but I wasn't sure where to put it.


Zitat von Matthias Runge :


On 24/03/16 12:03, Eugen Block wrote:

Hi,


Has this been resolved?  Is anyone working on this issue?


I had traced down the effect and found a possible solution, see
https://bugs.launchpad.net/nova/+bug/1560965

If you're just trying to start via Horizon, changing
/srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
ought to fix this for you:

---cut here---
control1:/srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows
# diff -u5 create_instance.py.dist create_instance.py
--- create_instance.py.dist 2016-03-18 10:40:51.123942306 +0100
+++ create_instance.py  2016-03-24 11:49:00.404537704 +0100
@@ -119,11 +119,11 @@



Eugen, did you file a bug for Horizon about this? I would think, that
should be examined carefully.

--
Matthias Runge 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill

__
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




--
Eugen Block voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG  fax : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg e-mail  : ebl...@nde.ag

Vorsitzende des Aufsichtsrates: Angelika Mozdzen
  Sitz und Registergericht: Hamburg, HRB 90934
  Vorstand: Jens-U. Mozdzen
   USt-IdNr. DE 814 013 983


__
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] Launch of an instance from a bootable volume fails on Xen env

2016-04-07 Thread Matthias Runge
On 24/03/16 12:03, Eugen Block wrote:
> Hi,
> 
>> Has this been resolved?  Is anyone working on this issue?
> 
> I had traced down the effect and found a possible solution, see
> https://bugs.launchpad.net/nova/+bug/1560965
> 
> If you're just trying to start via Horizon, changing
> /srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
> ought to fix this for you:
> 
> ---cut here---
> control1:/srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows
> # diff -u5 create_instance.py.dist create_instance.py
> --- create_instance.py.dist 2016-03-18 10:40:51.123942306 +0100
> +++ create_instance.py  2016-03-24 11:49:00.404537704 +0100
> @@ -119,11 +119,11 @@


Eugen, did you file a bug for Horizon about this? I would think, that
should be examined carefully.

-- 
Matthias Runge 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill

__
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] Launch of an instance from a bootable volume fails on Xen env

2016-03-24 Thread Eugen Block

Hi,


Has this been resolved?  Is anyone working on this issue?


I had traced down the effect and found a possible solution, see  
https://bugs.launchpad.net/nova/+bug/1560965


If you're just trying to start via Horizon, changing  
/srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py ought to fix this for  
you:


---cut here---
control1:/srv/www/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows # diff -u5 create_instance.py.dist  
create_instance.py

--- create_instance.py.dist 2016-03-18 10:40:51.123942306 +0100
+++ create_instance.py  2016-03-24 11:49:00.404537704 +0100
@@ -119,11 +119,11 @@
  help_text=_("Volume size in gigabytes "
  "(integer value)."))

 device_name = forms.CharField(label=_("Device Name"),
   required=False,
-  initial="vda",
+  initial="",
   help_text=_("Volume mount point  
(e.g. 'vda' "

   "mounts at '/dev/vda'). Leave "
   "this field blank to let the "
   "system choose a device name "
   "for you."))
@@ -878,20 +878,23 @@
 dev_source_type_mapping = {
 'volume_id': 'volume',
 'volume_snapshot_id': 'snapshot'
 }
 dev_mapping_2 = [
-{'device_name': device_name,
+{
  'source_type': dev_source_type_mapping[source_type],
  'destination_type': 'volume',
  'delete_on_termination':
  bool(context['delete_on_terminate']),
  'uuid': volume_source_id,
  'boot_index': '0',
  'volume_size': context['volume_size']
  }
 ]
+if device_name:
+dev_mapping_2.append({"device_name": device_name})
+
 else:
 dev_mapping_1 = {context['device_name']: '%s::%s' %
  (context['source_id'],
  bool(context['delete_on_terminate']))
  }
@@ -900,20 +903,22 @@
 exceptions.handle(request, msg)

 elif source_type == 'volume_image_id':
 device_name = context.get('device_name', '').strip() or None
 dev_mapping_2 = [
-{'device_name': device_name,  # None auto-selects device
+{
  'source_type': 'image',
  'destination_type': 'volume',
  'delete_on_termination':
  bool(context['delete_on_terminate']),
  'uuid': context['source_id'],
  'boot_index': '0',
  'volume_size': context['volume_size']
  }
 ]
+if device_name:
+dev_mapping_2.append({"device_name": device_name})

 netids = context.get('network_id', None)
 if netids:
 nics = [{"net-id": netid, "v4-fixed-ip": ""}
 for netid in netids]

---cut here---

I'm not aware which side effects this change can have. I started a  
similar thread in the mailing list this week  
http://lists.openstack.org/pipermail/openstack-dev/2016-March/090009.html


Regards,
Eugen


Zitat von "Benjamin, Arputham" :


Launch of an instance from a bootable volume fails on Xen env.
The root cause of this issue is that Nova is mapping the disk_dev  
/disk_bus to vda/virtio

instead of xvda/xen. (Below is the session output showing the launch error)

Has this been resolved?  Is anyone working on this issue?

Thanks,
Benjamin

016-03-08 15:07:51.430 3070 INFO nova.virt.block_device  
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8  
976963ca04df48c79f0c87ff7a330d47 310cb58241964e0a92bc939ec1c6a0ff -  
- -] [instance: d45a5b7b-314f-4bfa-893d-3498e04f04fa] Booting with  
volume 1d33ba84-9ce2-467d-97c5-973a7ed48456 at /dev/vda
2016-03-08 15:07:55.863 3070 INFO nova.virt.libvirt.driver  
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8  
976963ca04df48c79f0c87ff7a330d47 310cb58241964e0a92bc939ec1c6a0ff -  
- -] [instance: d45a5b7b-314f-4bfa-893d-3498e04f04fa] Creating image
2016-03-08 15:07:55.864 3070 WARNING nova.virt.libvirt.driver  
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8  
976963ca04df48c79f0c87ff7a330d47 310cb58241964e0a92bc939ec1c6a0ff -  
- -] [instance: d45a5b7b-314f-4bfa-893d-3498e04f04fa] File injection  
into a boot from volume instance is not supported
2016-03-08 15:08:01.430 3070 IN

[openstack-dev] Launch of an instance from a bootable volume fails on Xen env

2016-03-23 Thread Benjamin, Arputham
Launch of an instance from a bootable volume fails on Xen env.
The root cause of this issue is that Nova is mapping the disk_dev /disk_bus to 
vda/virtio
instead of xvda/xen. (Below is the session output showing the launch error)

Has this been resolved?  Is anyone working on this issue?

Thanks,
Benjamin

016-03-08 15:07:51.430 3070 INFO nova.virt.block_device 
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8 976963ca04df48c79f0c87ff7a330d47 
310cb58241964e0a92bc939ec1c6a0ff - - -] [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] Booting with volume 
1d33ba84-9ce2-467d-97c5-973a7ed48456 at /dev/vda
2016-03-08 15:07:55.863 3070 INFO nova.virt.libvirt.driver 
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8 976963ca04df48c79f0c87ff7a330d47 
310cb58241964e0a92bc939ec1c6a0ff - - -] [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] Creating image
2016-03-08 15:07:55.864 3070 WARNING nova.virt.libvirt.driver 
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8 976963ca04df48c79f0c87ff7a330d47 
310cb58241964e0a92bc939ec1c6a0ff - - -] [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] File injection into a boot from volume 
instance is not supported
2016-03-08 15:08:01.430 3070 INFO nova.compute.resource_tracker 
[req-4ac03ab4-f8f6-4141-b96d-2968e9664c35 - - - - -] Auditing locally available 
compute resources for node compute.openstack.com
2016-03-08 15:08:02.164 3070 ERROR nova.virt.libvirt.driver 
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8 976963ca04df48c79f0c87ff7a330d47 
310cb58241964e0a92bc939ec1c6a0ff - - -] Error launching a defined domain with 
XML: 
  instance-006c
  d45a5b7b-314f-4bfa-893d-3498e04f04fa
  
http://openstack.org/xmlns/libvirt/nova/1.0";>
  
  bv-vivid-server
  2016-03-08 23:07:55
  
2048
20
0
0
1
  
  
admin
admin
  

  
  2097152
  2097152
  1
  
hvm
/usr/lib/xen/boot/hvmloader

  
  



  
  
  destroy
  restart
  destroy
  

  
  
  
  1d33ba84-9ce2-467d-97c5-973a7ed48456


  
  
  


  


  





  


  


  

  


2016-03-08 15:08:02.167 3070 ERROR nova.compute.manager 
[req-b5033c12-196f-411e-8b19-6d15b1e7a5b8 976963ca04df48c79f0c87ff7a330d47 
310cb58241964e0a92bc939ec1c6a0ff - - -] [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] Instance failed to spawn
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] Traceback (most recent call last):
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2461, in 
_build_resources
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] yield resources
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2333, in 
_build_and_run_instance
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] block_device_info=block_device_info)
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2385, in 
spawn
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] block_device_info=block_device_info)
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4403, in 
_create_domain_and_network
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] power_on=power_on)
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4334, in 
_create_domain
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] LOG.error(err)
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] six.reraise(self.type_, self.value, 
self.tb)
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa]   File 
"/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4324, in 
_create_domain
2016-03-08 15:08:02.167 3070 TRACE nova.compute.manager [instance: 
d45a5b7b-314f-4bfa-893d-3498e04f04fa] domain.createWithFlags(launch_flags)
201