<div dir="ltr">Does this fix your issue? <a href="https://review.openstack.org/#/c/475445/">https://review.openstack.org/#/c/475445/</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 19, 2017 at 12:21 AM, Gary Kotton <span dir="ltr"><<a href="mailto:gkotton@vmware.com" target="_blank">gkotton@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="m_6938535685819453475WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Sorry for being vague – have been debugging.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">We overwrite the base method:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> with db_api.context_manager.writer.<wbr>using(context):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> secgroup_db = (<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> super(NsxV3Plugin, self).create_security_group(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> context, security_group, default_sg))<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> nsx_db.save_sg_mappings(<wbr>context,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> secgroup_db['id'],<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> ns_group['id'],<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> firewall_section['id'])<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> self._process_security_group_<wbr>properties_create(context,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> secgroup_db,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> secgroup,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> default_sg)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">The secgroup_db that returns always has empty rules. If I remove the transaction then it works.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Still trying to figure out why when we call:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> with db_api.context_manager.writer.<wbr>using(context):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> secgroup_db = (<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> super(NsxV3Plugin, self).create_security_group(…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">The rules are not populated. The db_api.context_manager.writer.<wbr>using is what is causing the problem.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">As a work around we reread the object when we need to process the rules. Not sure if anyone else has hit this<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Gary<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Kevin Benton <kevin@benton.pub><br>
<b>Reply-To: </b>OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.<wbr>openstack.org</a>><br>
<b>Date: </b>Monday, June 19, 2017 at 10:01 AM<br>
<b>To: </b>OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.<wbr>openstack.org</a>><br>
<b>Cc: </b>"<a href="mailto:isaku.yamahata@gmail.com" target="_blank">isaku.yamahata@gmail.com</a>" <<a href="mailto:isaku.yamahata@gmail.com" target="_blank">isaku.yamahata@gmail.com</a>><br>
<b>Subject: </b>Re: [openstack-dev] [neutron] security group OVO change<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Do you mean the callback event for AFTER_CREATE is missing the rules when it's for default security groups?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Sun, Jun 18, 2017 at 4:44 AM, Gary Kotton <<a href="mailto:gkotton@vmware.com" target="_blank">gkotton@vmware.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi,<br>
That patch looks good. We still have an issue in that the create security groups does not return the list of the default rules.<br>
Thanks<br>
<span class="m_6938535685819453475hoenzb"><span style="color:#888888">Gary</span></span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
On 6/17/17, 2:33 AM, "Isaku Yamahata" <<a href="mailto:isaku.yamahata@gmail.com" target="_blank">isaku.yamahata@gmail.com</a>> wrote:<br>
<br>
It also broke networking-odl.<br>
The patch[1] is needed to unbreak.<br>
[1] <a href="https://review.openstack.org/#/c/448420/" target="_blank">https://review.openstack.org/#<wbr>/c/448420/</a><br>
<br>
necessary db info is taken from context.session.new.<br>
But with OVO, those expunge themselves with create method.<br>
Those info needs to be passed as callback argument.<br>
<br>
Thanks,<br>
<br>
On Fri, Jun 16, 2017 at 01:25:28PM -0700,<br>
Ihar Hrachyshka <<a href="mailto:ihrachys@redhat.com" target="_blank">ihrachys@redhat.com</a>> wrote:<br>
<br>
> To close the loop here,<br>
><br>
> - this also broke heat py3 job (<a href="https://launchpad.net/bugs/1698355" target="_blank">https://launchpad.net/bugs/<wbr>1698355</a>)<br>
> - we polished <a href="https://review.openstack.org/474575" target="_blank">
https://review.openstack.org/<wbr>474575</a> to fix both<br>
> vmware-nsx and heat issues<br>
> - I also posted a patch for oslo.serialization for the bug that<br>
> triggered MemoryError in heat gate:<br>
> <a href="https://review.openstack.org/475052" target="_blank">https://review.openstack.org/<wbr>475052</a><br>
> - the vmware-nsx adoption patch is at:<br>
> <a href="https://review.openstack.org/#/c/474608/" target="_blank">https://review.openstack.org/#<wbr>/c/474608/</a> and @boden is working on it,<br>
> should be ready to go in due course.<br>
><br>
> Thanks and sorry for inconveniences,<br>
> Ihar<br>
><br>
> On Thu, Jun 15, 2017 at 6:17 AM, Gary Kotton <<a href="mailto:gkotton@vmware.com" target="_blank">gkotton@vmware.com</a>> wrote:<br>
> > Hi,<br>
> ><br>
> > The commit <a href="https://review.openstack.org/284738" target="_blank">
https://review.openstack.org/<wbr>284738</a> has broken decomposed plugins<br>
> > (those that extend security groups and rules). The reason for this is that<br>
> > there is a extend callback that we use which expects to get a database<br>
> > object and the aforementioned patch passes a new neutron object.<br>
> ><br>
> > I have posted [i] to temporarily address the issue. An alternative is to<br>
> > revert the patch until the decomposed plugins can figure out how to<br>
> > correctly address this.<br>
> ><br>
> > Thanks<br>
> ><br>
> > Gary<br>
> ><br>
> > [i] <a href="https://review.openstack.org/474575" target="_blank">https://review.openstack.org/<wbr>474575</a><br>
> ><br>
> ><br>
> > ______________________________<wbr>______________________________<wbr>______________<br>
> > OpenStack Development Mailing List (not for usage questions)<br>
> > Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
> ><br>
><br>
> ______________________________<wbr>______________________________<wbr>______________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br>
--<br>
Isaku Yamahata <<a href="mailto:isaku.yamahata@gmail.com" target="_blank">isaku.yamahata@gmail.com</a>><br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
<br>______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br></blockquote></div><br></div>