<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 01/14/2015 12:57 PM, Murray, Paul
      (HP Cloud) wrote:<br>
    </div>
    <blockquote
cite="mid:39E5672E03A1CB4B93936D1C4AA5E15D1D025A5E@G6W2484.americas.hpqcorp.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier New"">Hi
            All,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier New"">I
            recently experienced failures getting images from Glance
            while spawning instances. This step comes after building the
            networks in the guild sequence. When the Glance failure
            occurred the instance was cleaned up and rescheduled as
            expected, but the networks were not cleaned up. On
            investigation I found that the cleanup code for the networks
            is in the compute manager’s _<i>do_build_run</i>_instance()
            method as follows:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">            # NOTE(comstud):
            Deallocate networks if the driver wants<br>
                        # us to do so.<br>
                        if
            self.driver.deallocate_networks_on_reschedule(instance):<br>
                            self._cleanup_allocated_networks(context,
            instance,<br>
                                    requested_networks)<o:p></o:p></span></p>
        <p
          style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white;max-width:
          45em;orphans: auto;widows: auto;-webkit-text-stroke-width:
          0px;word-spacing:0px">
          <span style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">The default behavior in for the
            deallocate_networks_on_schedule() method defined in
            ComputeDriver is:<o:p></o:p></span></p>
        <p
          style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white;max-width:
          45em;orphans: auto;widows: auto;-webkit-text-stroke-width:
          0px;word-spacing:0px">
          <span style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">    def
            deallocate_networks_on_reschedule(self, instance):<br>
                    """Does the driver want networks deallocated on
            reschedule?"""<br>
                    return False<o:p></o:p></span></p>
        <p
          style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white;max-width:
          45em;orphans: auto;widows: auto;-webkit-text-stroke-width:
          0px;word-spacing:0px">
          <span style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">Only the Ironic driver over rides
            this method to return True, so I think this means the
            networks will not be cleaned up for any other virt driver.<o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">Is this really the desired
            behavior?</span></p>
      </div>
    </blockquote>
    <br>
    Yes.  Other than when using Ironic there is nothing specific to a
    particular host in the networking setup.  This means it is not
    necessary to deallocate and reallocate networks when an instance is
    rescheduled, so we can avoid the unnecessary work of doing it.<br>
    <br>
    If the instance goes to ERROR then the network will get cleaned up
    when the instance is deleted.<br>
    <blockquote
cite="mid:39E5672E03A1CB4B93936D1C4AA5E15D1D025A5E@G6W2484.americas.hpqcorp.net"
      type="cite">
      <div class="WordSection1">
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333"><o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">I have filed a bug for this and
            plan to fix it:
            <a moz-do-not-send="true"
              href="https://bugs.launchpad.net/nova/+bug/1410739">https://bugs.launchpad.net/nova/+bug/1410739</a>
            <o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">My initial thought is to fix this
            either by making the method in the base class return True or
            by adding the method to virt drivers returning True (I would
            expect the former). But I wanted to check if there is a
            reason for the base class behavior (and so the default
            behavior) to be *<b>NOT</b>* to clean up the networks?<o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333"><o:p> </o:p></span></p>
        <p
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:9.6pt;margin-left:0cm;line-height:13.5pt;background:white"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#333333">Paul<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
            style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB"
            lang="EN-GB">Paul Murray<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB"
            lang="EN-GB">Nova Technical Lead, HP Cloud<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB"
            lang="EN-GB">+44 117 316 2527<br>
            <br>
            Hewlett-Packard Limited registered Office: Cain Road,
            Bracknell, Berks RG12 1HN Registered No: 690597 England. The
            contents of this message and any attachments to it are
            confidential and may be legally privileged. If you have
            received this message in error, you should delete it from
            your system immediately and advise the sender. To any
            recipient of this message within HP, unless otherwise stated
            you should consider this message and attachments as "HP
            CONFIDENTIAL".</span><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</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>
  </body>
</html>