Bug 1122018
Summary: | calling a method with different signature does not throw UnknownMethod error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jakub Jelen <jjelen> | ||||
Component: | dbus-python | Assignee: | leigh scott <leigh123linux> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 21 | CC: | dan.mashal, jpopelka, lnie, rdieter, stefano, twoerner | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | dbus-python-1.2.0-12.fc23 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-11-19 09:53:51 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1017034 | ||||||
Attachments: |
|
Description
Jakub Jelen
2014-07-22 11:11:54 UTC
With: https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=7b8d76273939d28b96b6a3e0bb99b2c6a8e6e1c3 the results are: DBusException: 32 is <type 'int'>, expected <type 'str'> and the chain is not added Thanks for fix. Tested on chains and works fine. I will test other methods later, but I see you made it working globally. :: [ 12:55:32 ] :: :::::::: Direct example :: [ BEGIN ] :: Running 'dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply --type=method_call /org/fedoraproject/FirewallD1 org.fedoraproject.FirewallD1.direct.addChain string:"ipv4" string:"filter" int32:32' Error org.freedesktop.DBus.Python.dbus.exceptions.DBusException: 32 is <type 'int'>, expected <type 'str'> :: [ PASS ] :: Command 'dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply --type=method_call /org/fedoraproject/FirewallD1 org.fedoraproject.FirewallD1.direct.addChain string:"ipv4" string:"filter" int32:32' (Expected 1, got 1) :: [ BEGIN ] :: Running 'dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply --type=method_call /org/fedoraproject/FirewallD1 org.fedoraproject.FirewallD1.direct.addChain string:"ipv4" string:"filter" int32:32' Error org.freedesktop.DBus.Python.dbus.exceptions.DBusException: 32 is <type 'int'>, expected <type 'str'> :: [ PASS ] :: Command 'dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply --type=method_call /org/fedoraproject/FirewallD1 org.fedoraproject.FirewallD1.direct.addChain string:"ipv4" string:"filter" int32:32' (Expected 1, got 1) :: [ BEGIN ] :: Running 'iptables-save -t filter | grep ":32 - \[0:0\]"' :: [ PASS ] :: Command 'iptables-save -t filter | grep ":32 - \[0:0\]"' (Expected 1, got 1) I guess this bugzilla is resolved in upstream. firewalld-0.3.11-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/firewalld-0.3.11-1.fc20 firewalld-0.3.11-1.fc20 works Package firewalld-0.3.11-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing firewalld-0.3.11-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-9609/firewalld-0.3.11-1.fc20 then log in and leave karma (feedback). Package firewalld-0.3.11-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing firewalld-0.3.11-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-9609/firewalld-0.3.11-2.fc20 then log in and leave karma (feedback). Package firewalld-0.3.11-3.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing firewalld-0.3.11-3.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-9609/firewalld-0.3.11-3.fc20 then log in and leave karma (feedback). (In reply to Jakub Jelen from comment #0) > # dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply > --type=method_call /org/fedoraproject/FirewallD1 > org.fedoraproject.FirewallD1.direct.addChain string:"ipv4" string:"filter" > int32:32 As Thomas noticed, not firewalld, but dbus-send in the first place should warn/error that this is not possible (according to introspection data). Example: NM's GetDeviceByIpIface(in s iface,out o device) # dbus-send --system --dest=org.freedesktop.NetworkManager --print-reply /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.GetDeviceByIpIface string:"em1" method return sender=:1.8 -> dest=:1.263 reply_serial=2 object path "/org/freedesktop/NetworkManager/Devices/1" if I specify int32:1 instead of string:"em1" I see: Error org.freedesktop.DBus.Error.UnknownMethod: Method "GetDeviceByIpIface" with signature "i" on interface "org.freedesktop.NetworkManager" doesn't exist But trying the same (i.e. using int32 instead of string) for the direct.addChain() mentioned in comment #0 obviously passes the call to firewalld without checking the introspection data first. # dbus-send --system --dest=org.fedoraproject.FirewallD1 --print-reply /org/fedoraproject/FirewallD1 org.freedesktop.DBus.Introspectable.Introspect correctly shows: ... <method name="addChain"> <arg direction="in" type="s" name="ipv" /> <arg direction="in" type="s" name="table" /> <arg direction="in" type="s" name="chain" /> </method> ... so I have no idea where can be the problem, dbus? python-slip? python-dbus? Created attachment 938538 [details] python-dbus example I can see the same using pure python-dbus so python-slip seems to be ruled out. I'm using the attached example (taken from [1]). There's one hello() method which takes a string input argument. # dbus-send --session --dest=org.frankhale.helloservice --print-reply /org/frankhale/helloservice org.freedesktop.DBus.Introspectable.Introspect ... <method name="hello"> <arg direction="in" type="s" name="a" /> <arg direction="out" type="s" /> </method> But trying to call it with int32 argument shows that the signature is not checked beforehand: # dbus-send --session --dest=org.frankhale.helloservice --print-reply /org/frankhale/helloservice org.frankhale.helloservice.hello int32:1 ... File "myservice.py", line 17, in hello return "Hello,World: " + a TypeError: cannot concatenate 'str' and 'dbus.Int32' objects [1] http://excid3.com/blog/an-actually-decent-python-dbus-tutorial/ I don't know how to debug it further so let's pass this to dbus-python. My question is: Is it expected that calling a method (from previous comment) with different signature does not throw something like: Error org.freedesktop.DBus.Error.UnknownMethod: Method "hello" with signature "i" on interface "org.frankhale.helloservice" doesn't exist Hello guys. This bugzilla is 2 months inactive and we don't have any answer from you, D-Bus people. What do you think about this issue? I'm really interested in results, because I need to continue in my testing and it is pretty hard when dbus does such things. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. dbus-python-1.2.0-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b5c42d1d47 dbus-python-1.2.0-12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update dbus-python' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b5c42d1d47 dbus-python-1.2.0-12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |