ovs .pid file?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
New
|
Undecided
|
Unassigned | ||
Rocky |
New
|
Undecided
|
Unassigned |
Bug Description
when executing ovs commands in the containers, they complain they cant find the pid file. File does not exist
[root@eselda04u25 openvswitch]# docker exec openvswitch_db ovs-appctl list-commands
2020-02-
ovs-appctl: cannot read pidfile "/var/run/
[root@eselda04u25 openvswitch]# docker exec openvswitch_
2020-02-
ovs-appctl: cannot read pidfile "/var/run/
[root@eselda04u25 openvswitch]# ll /var/run/
total 0
srwxr-x---. 1 root root 0 Feb 17 20:12 br-ex.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-ex.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-int.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-int.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-tun.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-tun.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4022.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4022.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4023.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4023.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4024.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4024.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4025.mgmt
srwxr-x---. 1 root root 0 Feb 17 20:12 br-vlan4025.snoop
srwxr-x---. 1 root root 0 Feb 17 20:12 db.sock
srwxr-x---. 1 root root 0 Feb 17 20:06 ovsdb-server.14.ctl
srwxr-x---. 1 root root 0 Feb 17 20:12 ovsdb-server.15.ctl
srwxr-x---. 1 root root 0 Feb 17 20:12 ovs-vswitchd.14.ctl
Expection:
commands should work and return output
Env:
version: rocky centos7 source built december
kernel 5.4.15
Host OS: centos 7
docker 17.05
description: | updated |
summary: |
- ovs containers dont have access to sockets + ovs .pid file? |
description: | updated |
The solution is to add the --pidfile flag to the start-ovs
See man ovs-vswitchd
# cat /etc/kolla/ openvswitch- vswitchd/ start-ovs ovs-vswitchd unix:/run/ openvswitch/ db.sock --pidfile -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file= /var/log/ kolla/openvswit ch/ovs- vswitchd. log
#!/usr/bin/env bash
/usr/sbin/