<div dir="ltr"><font face="arial, helvetica, sans-serif">Hi, all!</font><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I have been looking at the bug <a href="https://bugs.launchpad.net/neutron/+bug/1338885">https://bugs.launchpad.net/neutron/+bug/1338885</a> and it turned out that it is relevant <span style="color:rgb(51,51,51);font-size:12px;line-height:18px">not only for firewall rules but for all resources that take tenant-is for create and update.</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);font-size:12px;line-height:18px"><br></span></font></div><div><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em"><font face="arial, helvetica, sans-serif"><font color="#333333"><span style="font-size:12px;line-height:18px">I need a piece of advice on a preferable way of solving the problem.</span></font></font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em">First of all, there may be two situations:</p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em">1. Neutron using Keystone</p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em">2. Neutron working without it</p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em">In the second case there is obviously nothing to be done.</p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em"><font face="arial, helvetica, sans-serif"><font color="#333333"><span style="font-size:12px;line-height:18px">But when Neutron uses Keystone, tenant-id should be checked against existing keystone tenants. I can think of 2 ways of doing this. This may be done either by calling keystone client directly from neutron while preparing request body [1] or move the check to keystone middleware. In any case, such check will be performed during each create or update operation preventing admin from providing non-existent tenants. For now I think that calling the keystone client from Neutron code is not the best idea and prefer the second option. I would really appreciate recommendations about the best way of making the check. </span></font></font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-size:12px;line-height:18px"><font face="arial, helvetica, sans-serif">It still leaves the situation when an existing tenant is deleted from keystone and its resources are left orphaned, but it is being dealt with by [2].</font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-size:12px;line-height:18px"><font face="arial, helvetica, sans-serif">Thanks,</font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-size:12px;line-height:18px"><font face="arial, helvetica, sans-serif">Elena</font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-size:12px;line-height:18px"><font face="arial, helvetica, sans-serif"><br></font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em"><font face="arial, helvetica, sans-serif" style="color:rgb(51,51,51);font-size:12px;line-height:18px">[1] </font><font color="#333333" face="arial, helvetica, sans-serif"><span style="font-size:12px;line-height:18px"><a href="https://github.com/openstack/neutron/blob/master/neutron/api/v2/base.py#L545">https://github.com/openstack/neutron/blob/master/neutron/api/v2/base.py#L545</a></span></font></p><p style="margin:0px 0px 0.8em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-size:12px;line-height:18px"><font face="arial, helvetica, sans-serif">[2] <a href="https://blueprints.launchpad.net/neutron/+spec/tenant-delete">https://blueprints.launchpad.net/neutron/+spec/tenant-delete</a></font></p></div></div>