Re: [openstack-dev] [nova] libvirt boot parameters

2014-09-23 Thread Angelo Matarazzo

Hi,
I think that this variable is useful for me
cfg.IntOpt(reboot_timeout,
 default=0,
 help=Automatically hard reboot an instance if it has been 
  stuck in a rebooting state longer than N seconds. 
  Set to 0 to disable.),
  cfg.IntOpt(instance_build_timeout,

but it seems that Eli is right: lbvirt driver doesn't implement this 
function


def poll_rebooting_instances(self, timeout, instances):
pass



BTW I'm developing a feature: booting from network.
In my scenario sometimes the the booting instance pauses because the 
boot source ( PXE) cannot answer on time.

Look at
6.4. Installing guest virtual machines with PXE

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html

I'll investigate on reboot_timeout and I'll inform you but thanks for 
the tips


BR
Angelo




___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] libvirt boot parameters

2014-09-22 Thread Chen CH Ji
whether following variables fit for your purpose? guess you want to
override the value through boot command?

cfg.IntOpt(reboot_timeout,
   default=0,
   help=Automatically hard reboot an instance if it has been 
stuck in a rebooting state longer than N seconds. 
Set to 0 to disable.),
cfg.IntOpt(instance_build_timeout,
   default=0,
   help=Amount of time in seconds an instance can be in BUILD

before going into ERROR status.
Set to 0 to disable.),

Best Regards!

Kevin (Chen) Ji 纪 晨

Engineer, zVM Development, CSTL
Notes: Chen CH Ji/China/IBM@IBMCN   Internet: jiche...@cn.ibm.com
Phone: +86-10-82454158
Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian District,
Beijing 100193, PRC



From:   Angelo Matarazzo angelo.matara...@dektech.com.au
To: openstack-dev@lists.openstack.org
Date:   09/22/2014 05:30 PM
Subject:[openstack-dev] [nova] libvirt boot parameters



Hi all,
I need to add the option rebootTimeout when the instance boots.


If you use the qemu-kvm, boot parameter reboot-timeout allows  a virtual
machine to retry booting if no bootable device is found:

# qemu-kvm --boot reboot-timeout=1000

Ref:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html


In Openstack a new boot parameter should be entered into Libvirt XML
attributes where required:

bios rebootTimeout=5000 / under the os in the libvirt.xml file.

My idea is to add an option to nova boot command changing  (nova API, nova
base,python-novaclient) but I would like to know what you think about that?


Thank you beforehand
Angelo
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] libvirt boot parameters

2014-09-22 Thread Daniel P. Berrange
On Mon, Sep 22, 2014 at 11:32:57AM +0200, Angelo Matarazzo wrote:
 Hi all,
 I need to add the option rebootTimeout when the instance boots.
 If you use the*qemu-kvm*, boot parameter/|reboot-timeout|/allows  a virtual
 machine to retry booting if no bootable device is found:

What are the scenarios in which this is useful / required ?

 My idea is to add an option to nova boot command changing  (nova API, nova
 base,python-novaclient) but I would like to know what you think about that?

As a general rule we aim to avoid exposing such low level config parameters
via the APIs, since it is not in keeping with the cloud virtualization
model which is to avoid exposing hardware configuration details to the users.
It could be considered as a flavor extra specs parameter or image metadata
property, depending on the use cases for us

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-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] libvirt boot parameters

2014-09-22 Thread Eli Qiao


? 2014?09?22? 17:52, Chen CH Ji ??:


whether following variables fit for your purpose? guess you want to 
override the value through boot command?


cfg.IntOpt(reboot_timeout,
   default=0,
 help=Automatically hard reboot an instance if it has been 
stuck in a rebooting state longer than N seconds. 
Set to 0 to disable.),
cfg.IntOpt(instance_build_timeout,
   default=0,
   help=Amount of time in seconds an instance can be in 
BUILD 

before going into ERROR status.
Set to 0 to disable.),


it seems libvirt driver doesn't implement this function


   @periodic_task.periodic_task
def _poll_rebooting_instances(self, context):
if CONF.reboot_timeout  0:
filters = {'task_state': task_states.REBOOTING,
   'host': self.host}
rebooting = objects.InstanceList.get_by_filters(
context, filters, expected_attrs=[], use_slave=True)

to_poll = []
for instance in rebooting:
if timeutils.is_older_than(instance['updated_at'],
   CONF.reboot_timeout):
to_poll.append(instance)

self.driver.poll_rebooting_instances(CONF.reboot_timeout, to_poll)

libvirt/driver.py
def poll_rebooting_instances(self, timeout, instances):
pass


Best Regards!

Kevin (Chen) Ji ? ?

Engineer, zVM Development, CSTL
Notes: Chen CH Ji/China/IBM@IBMCN   Internet: jiche...@cn.ibm.com
Phone: +86-10-82454158
Address: 3/F Ring Building, ZhongGuanCun Software Park, Haidian 
District, Beijing 100193, PRC


Inactive hide details for Angelo Matarazzo ---09/22/2014 05:30:35 
PM---Hi all, I need to add the option rebootTimeout when the Angelo 
Matarazzo ---09/22/2014 05:30:35 PM---Hi all, I need to add the option 
rebootTimeout when the instance boots.


From: Angelo Matarazzo angelo.matara...@dektech.com.au
To: openstack-dev@lists.openstack.org
Date: 09/22/2014 05:30 PM
Subject: [openstack-dev] [nova] libvirt boot parameters





Hi all,
I need to add the option rebootTimeout when the instance boots.

If you use the *qemu-kvm*, boot parameter */reboot-timeout/* allows  a 
virtual machine to retry booting if no bootable device is found:

*/
# qemu-kvm --boot reboot-timeout=1000/*

Ref: 
_https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html_


In Openstack a new boot parameter should be entered into Libvirt XML 
attributes where required:


bios rebootTimeout=5000 / under the os in the libvirt.xml file.

My idea is to add an option to nova boot command changing (nova API, 
nova base,python-novaclient) but I would like to know what you think 
about that?


Thank you beforehand
Angelo
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


--
Thanks,
Eli (Li Yong) Qiao

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev