That error went away on running the container in priviledged mode,
NET_ADMIN capability did not seem to make a difference. In both cases,
the original issue is still present.

cloudscaling@mngmt2:~/dockstack> docker run -it --pid=host
--privileged --net=host ubuntu bash
root@mngmt2:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Hit http://archive.ubuntu.com trusty Release.gpg
Get:1 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:2 http://archive.ubuntu.com trusty-security Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty Release
Get:3 http://archive.ubuntu.com trusty-updates Release [62.0 kB]
Get:4 http://archive.ubuntu.com trusty-security Release [62.0 kB]
Get:5 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:6 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:7 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:8 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:9 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:10 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Get:11 http://archive.ubuntu.com trusty-updates/main Sources [229 kB]
Get:12 http://archive.ubuntu.com trusty-updates/restricted Sources [1874 B]
Get:13 http://archive.ubuntu.com trusty-updates/universe Sources [130 kB]
Get:14 http://archive.ubuntu.com trusty-updates/main amd64 Packages [557 kB]
Get:15 http://archive.ubuntu.com trusty-updates/restricted amd64
Packages [14.8 kB]
Get:16 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [329 kB]
Get:17 http://archive.ubuntu.com trusty-security/main Sources [86.9 kB]
Get:18 http://archive.ubuntu.com trusty-security/restricted Sources [1874 B]
Get:19 http://archive.ubuntu.com trusty-security/universe Sources [19.6 kB]
Get:20 http://archive.ubuntu.com trusty-security/main amd64 Packages [269 kB]
Get:21 http://archive.ubuntu.com trusty-security/restricted amd64
Packages [14.8 kB]
Get:22 http://archive.ubuntu.com trusty-security/universe amd64
Packages [113 kB]
Fetched 20.5 MB in 17s (1149 kB/s)
Reading package lists... Done
root@mngmt2:/# apt-get install openvswitch-switch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib openssl
  openvswitch-common python python-minimal python2.7 python2.7-minimal
  uuid-runtime
Suggested packages:
  ca-certificates ethtool openvswitch-datapath-module python-doc python-tk
  python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib openssl
  openvswitch-common openvswitch-switch python python-minimal python2.7
  python2.7-minimal uuid-runtime
0 upgraded, 11 newly installed, 0 to remove and 9 not upgraded.
Need to get 5543 kB of archives.
After this operation, 23.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main
libpython2.7-minimal amd64 2.7.6-8 [307 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main python2.7-minimal
amd64 2.7.6-8 [1190 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main openssl
amd64 1.0.1f-1ubuntu2.8 [489 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main
uuid-runtime amd64 2.20.1-5.1ubuntu20.3 [12.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main
libpython2.7-stdlib amd64 2.7.6-8 [1872 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/main libpython-stdlib
amd64 2.7.5-5ubuntu3 [7012 B]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty/main python2.7 amd64
2.7.6-8 [197 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty/main python-minimal
amd64 2.7.5-5ubuntu3 [27.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty/main python amd64
2.7.5-5ubuntu3 [134 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main
openvswitch-common amd64 2.0.2-0ubuntu0.14.04.1 [444 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ trusty-updates/main
openvswitch-switch amd64 2.0.2-0ubuntu0.14.04.1 [863 kB]
Fetched 5543 kB in 8s (683 kB/s)
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 11527 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.6-8_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.6-8) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.6-8_amd64.deb ...
Unpacking python2.7-minimal (2.7.6-8) ...
Selecting previously unselected package openssl.
Preparing to unpack .../openssl_1.0.1f-1ubuntu2.8_amd64.deb ...
Unpacking openssl (1.0.1f-1ubuntu2.8) ...
Selecting previously unselected package uuid-runtime.
Preparing to unpack .../uuid-runtime_2.20.1-5.1ubuntu20.3_amd64.deb ...
Unpacking uuid-runtime (2.20.1-5.1ubuntu20.3) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../libpython2.7-stdlib_2.7.6-8_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.6-8) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.5-5ubuntu3_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.5-5ubuntu3) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.6-8_amd64.deb ...
Unpacking python2.7 (2.7.6-8) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.5-5ubuntu3_amd64.deb ...
Unpacking python-minimal (2.7.5-5ubuntu3) ...
Selecting previously unselected package python.
Preparing to unpack .../python_2.7.5-5ubuntu3_amd64.deb ...
Unpacking python (2.7.5-5ubuntu3) ...
Selecting previously unselected package openvswitch-common.
Preparing to unpack .../openvswitch-common_2.0.2-0ubuntu0.14.04.1_amd64.deb ...
Unpacking openvswitch-common (2.0.2-0ubuntu0.14.04.1) ...
Selecting previously unselected package openvswitch-switch.
Preparing to unpack .../openvswitch-switch_2.0.2-0ubuntu0.14.04.1_amd64.deb ...
Unpacking openvswitch-switch (2.0.2-0ubuntu0.14.04.1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libpython2.7-minimal:amd64 (2.7.6-8) ...
Setting up python2.7-minimal (2.7.6-8) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up openssl (1.0.1f-1ubuntu2.8) ...
Setting up uuid-runtime (2.20.1-5.1ubuntu20.3) ...
Setting up libpython2.7-stdlib:amd64 (2.7.6-8) ...
Setting up libpython-stdlib:amd64 (2.7.5-5ubuntu3) ...
Setting up python2.7 (2.7.6-8) ...
Setting up python-minimal (2.7.5-5ubuntu3) ...
Setting up python (2.7.5-5ubuntu3) ...
Setting up openvswitch-common (2.0.2-0ubuntu0.14.04.1) ...
Setting up openvswitch-switch (2.0.2-0ubuntu0.14.04.1) ...
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
root@mngmt2:/# /etc/init.d/openvswitch-switch status
ovsdb-server is not running
ovs-vswitchd is not running
root@mngmt2:/# /etc/init.d/openvswitch-switch start
 * /etc/openvswitch/conf.db does not exist
 * Creating empty database /etc/openvswitch/conf.db
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Enabling remote OVSDB managers
root@mngmt2:/#
root@mngmt2:/#
root@mngmt2:/# /etc/init.d/openvswitch-switch status
ovsdb-server is running with pid 18931
ovs-vswitchd is running with pid 18941
root@mngmt2:/# ovs-vsctl show
8ce09967-d2da-4034-a052-07680bb1caf9
    ovs_version: "2.0.2"
root@mngmt2:/# ovs-vsctl add-br br0
root@mngmt2:/#
root@mngmt2:/#
root@mngmt2:/# ip link show br0
Device "br0" does not exist.
root@mngmt2:/# grep -rn br0 /var/log/openvswitch/ovs-vswitchd.log
6:2015-02-17T21:55:55.226Z|00006|bridge|INFO|bridge br0: added
interface br0 on port 0
7:2015-02-17T21:55:55.226Z|00007|netdev|WARN|failed to set flags for
network device br0: No such device
8:2015-02-17T21:55:55.226Z|00008|netdev_linux|WARN|br0: obtaining
netdev stats via vport failed (No such device)
9:2015-02-17T21:55:55.226Z|00009|netdev_linux|INFO|ioctl(SIOCGIFHWADDR)
on br0 device failed: No such device
10:2015-02-17T21:55:55.226Z|00010|netdev_linux|WARN|ioctl(SIOCGIFINDEX)
on br0 device failed: No such device
11:2015-02-17T21:55:55.240Z|00011|bridge|INFO|bridge br0: using
datapath ID 00001a263e067541
12:2015-02-17T21:55:55.240Z|00012|ofproto|WARN|br0: cannot set queues
on nonexistent port 0
13:2015-02-17T21:55:55.240Z|00013|netdev_linux|WARN|br0: removing
policing failed: No such device
14:2015-02-17T21:55:55.240Z|00014|ofproto|WARN|br0: cannot configure
bfd on nonexistent port 0
15:2015-02-17T21:55:55.240Z|00015|connmgr|INFO|br0: added service
controller "punix:/var/run/openvswitch/br0.mgmt"
16:2015-02-17T21:55:55.240Z|00016|ofproto|WARN|br0: cannot get STP
status on nonexistent port 0
17:2015-02-17T21:55:55.242Z|00017|ofproto|WARN|br0: cannot set queues
on nonexistent port 0
18:2015-02-17T21:55:55.242Z|00018|ofproto|WARN|br0: cannot configure
bfd on nonexistent port 0
19:2015-02-17T21:55:55.341Z|00019|ofproto|WARN|br0: cannot get STP
status on nonexistent port 0
20:2015-02-17T21:55:55.495Z|00020|ofproto|WARN|br0: cannot get STP
status on nonexistent port 0
21:2015-02-17T21:55:56.212Z|00021|ofproto|WARN|br0: cannot get STP
status on nonexistent port 0
22:2015-02-17T21:55:57.213Z|00022|ofproto|WARN|br0: cannot get STP
status on nonexistent port 0
root@mngmt2:/# ovs-vsctl show
8ce09967-d2da-4034-a052-07680bb1caf9
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
    ovs_version: "2.0.2"
root@mngmt2:/#

I will surely report back if I find anything useful. Thanks a lot for
looking into this.

Thanks

On Tue, Feb 17, 2015 at 1:50 PM, Gurucharan Shetty <[email protected]> wrote:
>> root@mngmt2:/# /etc/init.d/openvswitch-switch start
>>  * /etc/openvswitch/conf.db does not exist
>>  * Creating empty database /etc/openvswitch/conf.db
>> nice: cannot set niceness: Permission denied
>>  * Starting ovsdb-server
>>  * Configuring Open vSwitch system IDs
>> /usr/share/openvswitch/scripts/ovs-ctl: 232: ulimit: error setting
>> limit (Operation not permitted)
>> nice: cannot set niceness: Permission denied
>>  * Starting ovs-vswitchd
>>  * Enabling remote OVSDB managers
> There are some permission denied errors above. So I wonder
> ovs-vswitchd does not have permissions to create a network device.
> I am not very familiar with why you are getting the above errors even
> thought you are running as "root". Does doing --cap-add NET_ADMIN
> while running the container help? I would suggest that you look into
> that. Once you figure out how to not get the above errors, please do
> share on the list so that others can find it helpful.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to