These are chat archives for Exa-Networks/exabgp

27th
Oct 2016
Ben Agricola
@benagricola
Oct 27 2016 12:28
@thomas-mangin sorry i didn't get the fixed patch in, haven't had any time to look in the last couple of weeks :\
Ben Agricola
@benagricola
Oct 27 2016 16:45
exabgp --run healthcheck is the correct way to run the healthcheck now, right?
(because python -m exabgp healthcheck doesn't work for me, and needs to be python -m exabgp.__main__ healthcheck
Ben Agricola
@benagricola
Oct 27 2016 17:00
also problematic, using exabgp --run healthcheck doesn't seem to allow specifying any of the options for healthcheck
running /usr/sbin/exabgp --run healthcheck --help works but if i then try to specify e.g. --cmd, I get the 'usage' message from exabgp rather than the healthcheck script
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:20
Hi @benagricola
no worries - I was in a similar place a few weeks ago - no spare time at all.
both ways are correctpython -m exabgp healthcheck or ./sbin/exabgp --run healthcheck, I just done a pip install and checked and both worked for me
we recommand the python variant so I will check if I get something wrong with the arguments for the second
Ben Agricola
@benagricola
Oct 27 2016 18:26
interesting, if i run python -m exabgp healthcheck - i get /usr/bin/python: exabgp is a package and cannot be directly executed
have to use exabgp.main
exabgp.__main__ rather
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:27
how did you install ? It works fine for me with pip and sourcecode !
Ben Agricola
@benagricola
Oct 27 2016 18:28
it's packaged from master so likely not the same version :)
this server is running python 2.6.6 too so that might have something to do with it
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:29
unlikely, the behaviour is documented
what version are you running ?
python -m exabgp healthcheck
ERROR[healthcheck] No IP found
-h gives the expected help output
python2.6 -m exabgp healthcheck
/usr/bin/python2.6: exabgp is a package and cannot be directly executed
Ben Agricola
@benagricola
Oct 27 2016 18:30
yeah
The feature to run the __main__ module of a package when using the command line -m option was introduced in Python 2.7
okay, so that's fine, can work around that
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:32
exabgp --run healthcheck --help it must be then :wink:
Ben Agricola
@benagricola
Oct 27 2016 18:32
and if i run exabgp --run healthcheck --interval 5 i get usage: exabgp [--help] [--version]...
but, running without --interval and using --help does give the healthcheck help
confusing...
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:33
same issue python2.6 -m exabgp healthcheck --interval 5
/usr/bin/python2.6: exabgp is a package and cannot be directly executed
Ben Agricola
@benagricola
Oct 27 2016 18:33
yeah but python2.6 -m exabgp.__main__ healthcheck --interval 5 will work
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:34
ok - sorry bad copy and paste - wanted to try the other way :face palm:
Ben Agricola
@benagricola
Oct 27 2016 18:34
haha
Thomas Mangin
@thomas-mangin
Oct 27 2016 18:35
also broken on 2.6 !