neutron-l3-agent permission denied when execute ( list_network_namespaces)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Medium
|
Rodolfo Alonso |
Bug Description
I have neutron manual installation on ubuntu server 22.04.
I use 2023.1 openstack release.
Everything was working fine before I rebooted the machine.
Now I have this error:
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
2023-07-05 12:20:55.449 48258 ERROR oslo_service.
My /etc/sudoers.
Defaults:neutron !requiretty
neutron ALL = (root) NOPASSWD: /usr/bin/
My /etc/neutron/
# Command filters to allow privsep daemon to be started via rootwrap.
#
# This file should be owned by (and only-writeable by) the root user
[Filters]
# By installing the following, the local admin is asserting that:
#
# 1. The python module load path used by privsep-helper
# command as root (as started by sudo/rootwrap) is trusted.
# 2. Any oslo.config files matching the --config-file
# arguments below are trusted.
# 3. Users allowed to run sudo/rootwrap with this configuration(*) are
# also allowed to invoke python "entrypoint" functions from
# --privsep_context with the additional (possibly root) privileges
# configured for that context.
#
# (*) ie: the user is allowed by /etc/sudoers to run rootwrap as root
#
# In particular, the oslo.config and python module path must not
# be writeable by the unprivileged user.
# PRIVSEP
# oslo.privsep default neutron context
privsep: PathFilter, privsep-helper, root,
--config-file, /etc/(?!\.\.).*,
--privsep_context, neutron.
--privsep_
# NOTE: A second `--config-file` arg can also be added above. Since
# many neutron components are installed like that (eg: by devstack).
# Adjust to suit local requirements.
# DEBUG
sleep: RegExpFilter, sleep, root, sleep, \d+
# EXECUTE COMMANDS IN A NAMESPACE
ip: IpFilter, ip, root
ip_exec: IpNetnsExecFilter, ip, root
# METADATA PROXY
haproxy: RegExpFilter, haproxy, root, haproxy, -f, .*
haproxy_env: EnvFilter, env, root, PROCESS_TAG=, haproxy, -f, .*
# DHCP
dnsmasq: CommandFilter, dnsmasq, root
dnsmasq_env: EnvFilter, env, root, PROCESS_TAG=, dnsmasq
# DIBBLER
dibbler-client: CommandFilter, dibbler-client, root
dibbler-client_env: EnvFilter, env, root, PROCESS_TAG=, dibbler-client
# L3
radvd: CommandFilter, radvd, root
radvd_env: EnvFilter, env, root, PROCESS_TAG=, radvd
keepalived: CommandFilter, keepalived, root
keepalived_env: EnvFilter, env, root, PROCESS_TAG=, keepalived
keepalived_
keepalived_
# OPEN VSWITCH
ovs-ofctl: CommandFilter, ovs-ofctl, root
ovsdb-client: CommandFilter, ovsdb-client, root
My /etc/neutron/
# Configuration for neutron-rootwrap
# This file should be owned by (and only-writeable by) the root user
[DEFAULT]
# List of directories to load filter definitions from (separated by ',').
# These directories MUST all be only writeable by root !
filters_
# List of directories to search executables in, in case filters do not
# explicitely specify a full path (separated by ',')
# If not specified, defaults to system PATH environment variable.
# These directories MUST all be only writeable by root !
exec_dirs=
# Enable logging to syslog
# Default value is False
use_syslog=False
# Which syslog facility to use.
# Valid values include auth, authpriv, syslog, local0, local1...
# Default value is 'syslog'
syslog_
# Which messages to log.
# INFO means log all usage
# ERROR means only log unsuccessful attempts
syslog_
# Rootwrap daemon exits after this seconds of inactivity
daemon_timeout=600
# Rootwrap daemon limits itself to that many file descriptors (Linux only)
rlimit_nofile=1024
In neutron config I have this :
[agent]
root_helper = "sudo /usr/bin/
I am not sure if it is neutron error or oslo.privsep error.
description: | updated |
description: | updated |
summary: |
- neutron-l3-agent permissin denied when execute ( + neutron-l3-agent permission denied when execute ( list_network_namespaces) |
Changed in neutron: | |
importance: | Undecided → Medium |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
I found that if I add this section with capabilities :
[privsep_namespace] READ_SEARCH, CAP_SYS_PTRAC
capabilities = CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_DAC_OVERRIDE, CAP_DAC_
in my /etc/neutron/ neutron. conf file the error is gone