Good find ;)

Davanum Srinivas wrote:
Josh,

Haha, see note from russellb :)
http://git.openstack.org/cgit/openstack/nova/tree/nova/network/rpcapi.py#n308

On Thu, Mar 17, 2016 at 6:44 PM, Joshua Harlow<harlo...@fastmail.com>  wrote:
In a follow-up to this.

Seems like the patch to disable/disallow this itself found some 'violations'
@
http://logs.openstack.org/24/289624/3/check/gate-oslo.messaging-src-dsvm-full-amqp1-centos7/e3b485c/console.html.gz#_2016-03-11_00_06_56_177

Details: {u'message': u'Unable to associate floating IP 172.24.5.1 to fixed
IP 10.1.14.255 for instance 3660f872-a8c2-4469-99c3-062ed1a90131. Error:
Remote error: NoSuchMethod Endpoint does not support RPC method
_associate_floating_ip\n[u\'Traceback (most recent call last):\\n\', u\'
File "/opt/stack/new/oslo.messaging/oslo_messaging/rpc/dispatcher.py", line
138, in _dispatch_and_reply\\n    incoming.message))\\n\', u\' File
"/opt/stack/new/oslo.messaging/oslo_messaging/rpc/dispatcher.py", line 170,
in _dispatch\\n    raise NoSuchMethod(method)\\n\', u\'NoSuchMethod:
Endpoint does not support RPC method _associate_floating_ip\\n\'].',
u'code': 400}

I believe this is a nova error as the test name is
'tempest.api.compute.floating_ips.test_floating_ips_actions'

So I guess the question becomes, should we start warning using warnings.warn
(instead of raising a NoSuchMethod error) and at a later point in the future
stop using warnings.warn and switch to NoSuchMethod, giving people ample
enough time to stop dispatching into protected/private methods.

Thoughts?

-Josh

On 03/08/2016 09:43 AM, Joshua Harlow wrote:
Hi all,

As I was working through https://review.openstack.org/#/c/288719/ for
kevin benton to do some things with in neutron it came to my
understanding that this code (the dispatcher code that is) can dispatch
into nearly arbitrary callables of any object (or that is what it looks
like it can do):


https://github.com/openstack/oslo.messaging/blob/4.5.0/oslo_messaging/rpc/dispatcher.py#L169


So during this exploration of this code for the above review it made me
wonder if this is a feature or bug, or if we should at least close the
hole of allowing calling into nearly any endpoint method/attribute (even
non-callable ones to?).

So before doing much more of this (which I started in review
https://review.openstack.org/#/c/289624/) I wanted to see if people are
actually using this 'ability' (for lack of better words) to call into
private/protected methods before pursuing 289624 much more...

Thoughts?

-Josh

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to