<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">于 2014年09月22日 17:52, Chen CH Ji 写道:<br>
    </div>
    <blockquote
cite="mid:OF54028CF9.A8766A48-ON48257D5B.00361AC2-48257D5B.0036A056@cn.ibm.com"
      type="cite">
      <p><font face="sans-serif" size="2">whether following variables
          fit for your purpose? guess you want to override the value
          through boot command?</font><br>
        <br>
        <font face="sans-serif" size="2">cfg.IntOpt("reboot_timeout",</font><br>
        <font face="sans-serif" size="2">               default=0,</font><br>
        <font face="sans-serif" size="2">             
           help="Automatically hard reboot an instance if it has been "</font><br>
        <font face="sans-serif" size="2">                    "stuck in a
          rebooting state longer than N seconds. "</font><br>
        <font face="sans-serif" size="2">                    "Set to 0
          to disable."),</font><br>
        <font face="sans-serif" size="2">   
          cfg.IntOpt("instance_build_timeout",</font><br>
        <font face="sans-serif" size="2">               default=0,</font><br>
        <font face="sans-serif" size="2">               help="Amount of
          time in seconds an instance can be in BUILD "</font><br>
        <font face="sans-serif" size="2">                    "before
          going into ERROR status."</font><br>
        <font face="sans-serif" size="2">                    "Set to 0
          to disable."),</font><br>
        <br>
      </p>
    </blockquote>
    it seems libvirt driver doesn't implement this function<br>
    <br>
    <br>
       @periodic_task.periodic_task<br>
        def _poll_rebooting_instances(self, context):<br>
            if CONF.reboot_timeout > 0:<br>
                filters = {'task_state': task_states.REBOOTING,<br>
                           'host': self.host}<br>
                rebooting = objects.InstanceList.get_by_filters(<br>
                    context, filters, expected_attrs=[], use_slave=True)<br>
    <br>
                to_poll = []<br>
                for instance in rebooting:<br>
                    if timeutils.is_older_than(instance['updated_at'],<br>
                                               CONF.reboot_timeout):<br>
                        to_poll.append(instance)<br>
    <br>
               
    self.driver.poll_rebooting_instances(CONF.reboot_timeout, to_poll)<br>
    <br>
    libvirt/driver.py<br>
        def poll_rebooting_instances(self, timeout, instances):<br>
            pass<br>
    <blockquote
cite="mid:OF54028CF9.A8766A48-ON48257D5B.00361AC2-48257D5B.0036A056@cn.ibm.com"
      type="cite">
      <p>
        <font face="sans-serif" size="2">Best Regards! <br>
          <br>
          Kevin (Chen) Ji 纪 晨<br>
          <br>
          Engineer, zVM Development, CSTL<br>
          Notes: Chen CH Ji/China/IBM@IBMCN   Internet:
          <a class="moz-txt-link-abbreviated" href="mailto:jichenjc@cn.ibm.com">jichenjc@cn.ibm.com</a><br>
          Phone: +86-10-82454158<br>
          Address: 3/F Ring Building, ZhongGuanCun Software Park,
          Haidian District, Beijing 100193, PRC </font><br>
        <br>
        <img src="cid:part1.08000509.08090702@linux.vnet.ibm.com"
          alt="Inactive hide details for Angelo Matarazzo ---09/22/2014
          05:30:35 PM---Hi all, I need to add the option rebootTimeout
          when the " border="0" height="16" width="16"><font
          color="#424282" face="sans-serif" size="2">Angelo Matarazzo
          ---09/22/2014 05:30:35 PM---Hi all, I need to add the option
          rebootTimeout when the instance boots.</font><br>
        <br>
        <font color="#5F5F5F" face="sans-serif" size="1">From: </font><font
          face="sans-serif" size="1">Angelo Matarazzo
          <a class="moz-txt-link-rfc2396E" href="mailto:angelo.matarazzo@dektech.com.au"><angelo.matarazzo@dektech.com.au></a></font><br>
        <font color="#5F5F5F" face="sans-serif" size="1">To: </font><font
          face="sans-serif" size="1"><a class="moz-txt-link-abbreviated" href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a></font><br>
        <font color="#5F5F5F" face="sans-serif" size="1">Date: </font><font
          face="sans-serif" size="1">09/22/2014 05:30 PM</font><br>
        <font color="#5F5F5F" face="sans-serif" size="1">Subject: </font><font
          face="sans-serif" size="1">[openstack-dev] [nova] libvirt boot
          parameters</font><br>
      </p>
      <hr style="color:#8091A5; " align="left" noshade="noshade"
        size="2" width="100%"><br>
      <br>
      <br>
      <font face="serif" size="3">Hi all,<br>
        I need to add the option rebootTimeout when the instance boots.</font>
      <p><font face="Liberation Sans" size="3">If you use the </font><font
          face="Liberation Sans" size="3"><b>qemu-kvm</b></font><font
          face="Liberation Sans" size="3">, boot parameter </font><font
          face="DejaVu Sans Mono" size="3"><b><i>reboot-timeout</i></b></font><font
          face="Liberation Sans" size="3"> allows  a virtual machine to
          retry booting if no bootable device is found:<br>
        </font><font face="Liberation Sans" size="3"><b><i><br>
              # qemu-kvm --boot reboot-timeout=1000</i></b></font><br>
        <font face="serif" size="2"><br>
          Ref: </font><a moz-do-not-send="true"
href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html"><font
            color="#0000FF" face="serif" size="2"><u>https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html</u></font></a><font
          face="serif" size="3"><br>
          <br>
          In Openstack a new boot parameter should be entered into
          Libvirt XML attributes where required:</font><tt><font
            color="#1F497D" size="2"><br>
          </font></tt><font face="serif" size="2"><br>
          <bios rebootTimeout=5000 /> under the <os> in the
          libvirt.xml file.</font><font face="serif" size="3"><br>
          <br>
          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? <br>
          <br>
          Thank you beforehand<br>
          Angelo<br>
        </font><tt><font size="2">_______________________________________________<br>
            OpenStack-dev mailing list<br>
            <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
          </font></tt><tt><font size="2"><a moz-do-not-send="true"
              href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></font></tt><tt><font
            size="2"><br>
          </font></tt><br>
        <br>
      </p>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thanks,
Eli (Li Yong) Qiao</pre>
  </body>
</html>