On Sun, Feb 1, 2015 at 9:18 PM, YAMAMOTO Takashi <yamam...@valinux.co.jp> wrote:
> commit 7905aae3fc1633c2c44c8fdb9e9d3a3d6e63439b
> ("vlog: Don't fail syslog initialization in chroot.")
> uses os.path.isfile("/dev/log"), which tests if the given path
> is a regular file, to see if syslog can be usable.
>
> However, /dev/log is not a regular file for platforms I looked at.
>     * On Ubuntu 14.04 and CentOS 6.5, /dev/log is a socket
>     * On NetBSD-6, /dev/log is a symlink to a socket
>
> Replace the test with os.path.exists() so that it can work
> as intended for these platforms.
>
> Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
Sorry about that.
Acked-by: Gurucharan Shetty <gshe...@nicira.com>


> ---
>  python/ovs/vlog.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/python/ovs/vlog.py b/python/ovs/vlog.py
> index 107f18c..d5741a6 100644
> --- a/python/ovs/vlog.py
> +++ b/python/ovs/vlog.py
> @@ -295,7 +295,7 @@ class Vlog:
>          logger = logging.getLogger('syslog')
>          # If there is no infrastructure to support python syslog, increase
>          # the logging severity level to avoid repeated errors.
> -        if not os.path.isfile("/dev/log"):
> +        if not os.path.exists("/dev/log"):
>              logger.setLevel(logging.CRITICAL)
>              return
>
> --
> 2.1.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to