python: Workaround UNIX socket path length limits
authorJames Page <james.page@ubuntu.com>
Wed, 16 Jan 2013 11:12:09 +0000 (11:12 +0000)
committerBen Pfaff <blp@nicira.com>
Wed, 16 Jan 2013 17:25:30 +0000 (09:25 -0800)
commit89d7ffa9941b15bd4e9952226983dc90e9f7fa9a
tree7be3088193754556123fc3a6f3b080715682fb0d
parentc964dc7fe51b75fe0d9e5234ec995eab19773860
python: Workaround UNIX socket path length limits

From aa28e8bfb646a54ba91e3545f3c0b9db39eddb7f Mon Sep 17 00:00:00 2001
From: James Page <james.page@ubuntu.com>
Date: Wed, 16 Jan 2013 10:52:59 +0000
Subject: [PATCH] python: Workaround UNIX socket path length limits
To: dev@openvswitch.org

UNIX socket paths have a limit in terms of length.  On Linux
this is 103 characters.

This is a problem in Debian/Ubuntu buildds which can generate
quite long paths.

This patch works around this issue by detecting when socket
connection/binding fails due to this issue and accessing the
socket path using a file descriptor path in /proc/self/fd.

The workaround is limited to Linux.

This is based on similar code in the C parts of OpenvSwitch.

Signed-off-by: James Page <james.page@ubuntu.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
python/ovs/socket_util.py