RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1721414 - Adding service into permanent configuration via DBus api suddenly requires 9 values instead of 8
Summary: Adding service into permanent configuration via DBus api suddenly requires 9 ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: firewalld
Version: 8.1
Hardware: x86_64
OS: Linux
urgent
unspecified
Target Milestone: rc
: 8.1
Assignee: Eric Garver
QA Contact: Tomas Dolezal
URL:
Whiteboard:
: 1733277 (view as bug list)
Depends On:
Blocks: 1660400 1721548
TreeView+ depends on / blocked
 
Reported: 2019-06-18 09:03 UTC by Sanne Raymaekers
Modified: 2021-09-03 15:08 UTC (History)
6 users (show)

Fixed In Version: firewalld-0.7.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:31:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:3635 0 None None None 2019-11-05 22:31:49 UTC

Description Sanne Raymaekers 2019-06-18 09:03:33 UTC
Description of problem:
Caught by cockpit tests.

Adding service into permanent configuration via DBus api suddenly requires 9 values. While the documentation clearly states only 8 are required to make up the settings structure.

Version-Release number of selected component (if applicable):
0.7.0

How reproducible:
A dbus call to
object path: /org/fedoraproject/FirewallD1/config
interface:   org.fedoraproject.FirewallD1.config
method:      addService
arguments:   [service, ["", name, "", ports, [], {}, [], []]*

*with name and ports as valid arguments


Actual results:
org.freedesktop.DBus.Error.InvalidArgs: Too few values in tuple/struct


Using [service, ["", name, "", ports, [], {}, [], [], []] as the arguments works.

Comment 1 Eric Garver 2019-06-18 13:33:50 UTC
(In reply to Sanne Raymaekers from comment #0)
> Description of problem:
> Caught by cockpit tests.
> 
> Adding service into permanent configuration via DBus api suddenly requires 9
> values. While the documentation clearly states only 8 are required to make
> up the settings structure.

This is a documentation failure. The section for org.fedoraproject.FirewallD1.Methods.getServiceSettings() was updated in firewalld.dbus(5), but not org.fedoraproject.FirewallD1.config.service.Methods.getSettings().

> Version-Release number of selected component (if applicable):
> 0.7.0
> 
> How reproducible:
> A dbus call to
> object path: /org/fedoraproject/FirewallD1/config
> interface:   org.fedoraproject.FirewallD1.config
> method:      addService
> arguments:   [service, ["", name, "", ports, [], {}, [], []]*
> 
> *with name and ports as valid arguments
> 
> 
> Actual results:
> org.freedesktop.DBus.Error.InvalidArgs: Too few values in tuple/struct
> 
> 
> Using [service, ["", name, "", ports, [], {}, [], [], []] as the arguments
> works.

Upstream added a setting to the argument list for the "service includes" feature.

In the past, methods were extended in an append-only manner without changing the dbus version and bumping the minor number on an internal "interface_version". When "service includes" were added the same approach was taken. I don't think this is valid as per DBUS API guidelines (https://dbus.freedesktop.org/doc/dbus-api-design.html#api-versioning). Instead a new API should be added to get/set the service includes.

Comment 7 Eric Garver 2019-07-22 20:28:11 UTC
Fixed upstream. The old dbus signature was restored and new APIs were added to use the new features.

91c1434de861 ("fix: firewall-offline-cmd: service: use dict based APIs")
632380e6efcd ("fix: client: service: use dict based dbus APIs")
335f23848140 ("test: dbus: coverage for new service APIs")
bbadd3943dab ("fix: dbus: new dict based APIs for services")

b0ecd9e3916a ("test: dbus: service API coverage")
5f32c24dec88 ("test: functions: add macro DBUS_INTROSPECT")
a8b90c38c197 ("test: functions: add CHOMP macro for shell output")
15346d6ff16e ("fix: tests/functions: use gdbus instead of dbus-send")
bcdc1e2bf1e7 ("fix: dbus: add missing APIs for service includes")
335a68c1bba5 ("fix: dbus: fix service API break")

Comment 9 Martin Pitt 2019-07-30 08:43:24 UTC
*** Bug 1733277 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2019-11-05 22:31:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:3635


Note You need to log in before you can comment on or make changes to this bug.