[openstack-dev] [nova] libvirt boot parameters

Eli Qiao taget at linux.vnet.ibm.com
Tue Sep 23 05:53:50 UTC 2014


? 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 at IBMCN   Internet: jichenjc at 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.matarazzo at dektech.com.au>
> To: openstack-dev at 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 at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-- 
Thanks,
Eli (Li Yong) Qiao

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140923/df9e2b72/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140923/df9e2b72/attachment.gif>


More information about the OpenStack-dev mailing list