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 1281911 - ovs-dpdk: vhost-user socket has wrong permissions
Summary: ovs-dpdk: vhost-user socket has wrong permissions
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openvswitch-dpdk
Version: 7.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Aaron Conole
QA Contact: Jean-Tsung Hsiao
URL:
Whiteboard:
Depends On:
Blocks: 1301628 1313485
TreeView+ depends on / blocked
 
Reported: 2015-11-13 19:04 UTC by Flavio Leitner
Modified: 2016-09-28 14:33 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-28 14:33:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1267017 0 high CLOSED [RFE] [Neutron] [OVS-DPDK] Include DPDK enabled OVS with RHEL OSP 8.0 2021-02-22 00:41:40 UTC

Internal Links: 1267017

Description Flavio Leitner 2015-11-13 19:04:17 UTC
Description of problem:

When a vhost-user port is attached, a unix socket is created at var/run/openvswitch/ which qemu should be able to connect to.

However, the permissions are wrong requiring manual intervention. 

Expected results:
No manual intervention is needed

Comment 1 Terry Wilson 2015-11-13 19:40:54 UTC
Should adding:

RuntimeDirectoryMode=0775
Group=qemu
UMask=0002

to /usr/lib/systemd/system/openvswitch-nonetwork.service fix this issue?

Comment 2 Aaron Conole 2015-11-18 18:53:01 UTC
I think a better approach is to use a separate directory for the vhost_user sockets, which would require passing the -vhost_sock_dir option to ovs-vswitchd, and updating the selinux permissions. That way we could make a sgid directory where vhost sockets go.

I will look into this and have a formal proposal (in the form of patches) soon.

Comment 3 Aaron Conole 2015-12-02 18:39:23 UTC
There is a discussion upstream at http://openvswitch.org/pipermail/dev/2015-December/062845.html regarding when and how to apply DPDK parameters to Open vSwitch. Since my solution is based on the -vhost_sock_dir option, and there's a possibility that it will need to be re-architected.

That said, the packages (which haven't been fully tested) are at:
https://copr.fedoraproject.org/coprs/aconole/qemu-kvm/
and
https://copr.fedoraproject.org/coprs/aconole/openvswitch-dpdk/

I will be testing them later today/tomorrow to see that the idea is sound, and then the implementation may need further discussion.

Comment 4 Terry Wilson 2015-12-09 17:41:48 UTC
Aaron: how'd the testing go?

Comment 5 Aaron Conole 2015-12-09 20:17:17 UTC
Sorry for the late response. There are issues in the initial implementation that need to be cleaned up. I will respin and update the bug with corrected patches. The solution _should_ work, but may not be a final one that upstream accepts.

Comment 6 Aaron Conole 2015-12-10 14:27:52 UTC
I have a working set of packages, on COPR:

https://copr.fedoraproject.org/coprs/aconole/openvswitch-dpdk/
and
https://copr.fedoraproject.org/coprs/aconole/qemu-kvm/

The following are the changes that I did:

On package install:
1. QEMU adds itself to the vhost group (if no such group exists, it creates)
2. Openvswitch-DPDK adds the vhost group if it doesn't already exist

Open vSwitch DPDK package has the following changes:

ovs-ctl accepts an (not-required) option in /etc/sysconf/openvswitch called VHOST_SOCK_DIR which should be a path in the filesystem. This variable is only used when DPDK_OPTIONS are specified.

If the path specified by VHOST_SOCK_DIR does not exist, ovs-ctl creates it during openvswitch startup, and sets mode to rwxrwsr-x with a group of vhost

Once the path specified in VHOST_SOCK_DIR exists, openvswitch passes it and DPDK_OPTIONS has a value, ovs-ctl sets umask to 0002, launches ovs-vswitchd, and restores umask.

I will post the patches for Panu and Flavio to review, and then bring it to wider audience (because it may not be the solution upstream accepts).

Comment 7 Aaron Conole 2016-01-06 21:40:37 UTC
The upstream solution is posted at 
http://openvswitch.org/pipermail/dev/2016-January/063959.html

This is the first series to reorganize under the database. The second will be to set vhost-sock permissions and ownership.


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