Comments (13)
What sort of machine do you have?
from gateway.
(By that I mean, what OS? Also, what version of golang are you using.)
fwiw the tests pass for me on OSX 10.11 and go version go1.5.2 darwin/amd64
from gateway.
go version go1.6.1 linux/amd64
I am on Debian.
I have just noticed that the tests pass when I run them directly but not in a chroot.
Do you have an idea of something gateway could be relying on that would not be available in my limited environment?
Note that the tests used to pass not long ago.
from gateway.
Also checked that version go1.6.2 darwin/amd64 works
Can you tell me what this command line prints in your limited chroot?
ip route show
from gateway.
Also, does this work in you limited chroot?
/usr/bin/ip route show
How about this?
/sbin/routel
Or this?
/usr/bin/route -n
from gateway.
I pushed version 1.0.2 that uses full paths and also closes stdout before waiting for the command to exit.
Please let me know if that fixes the problem.
from gateway.
I'd suggest using CombinedOutput on those as well, as it's simpler and correctly managed by the stdlib. I don't think there is any case in which Wait() needs you to close the commands Stdout to return.
from gateway.
I have a branch that breaks out all the parsing stuff into common and tests it, and uses CombinedOutput for the execution. Is that something you would accept as a PR, or too radical a change?
from gateway.
calmh -- yeah, I suspect CombinedOutput() is the right approach for this situation. The danger with CombinedOutput() is that some command goes nuts and spews gigabytes of data. But we don't expect that for these commands.
I would be interested in seeing your fork. It sounds like you've thought about this.
from gateway.
Or would you like to be a co-maintainer of palevich/gateway? Happy to add you.
from gateway.
avisu, could you pull and try v1.0.4 ?
from gateway.
The following things break:
routel
is in/usr/bin/routel
ip
is in/bin/ip
route
is in/sbin/route
Given that I fix the paths and run the commands you asked me, I get the following output:
echo "running /bin/ip route show"
running /bin/ip route show
/bin/ip route show
echo "running /usr/bin/routel"
running /usr/bin/routel
/usr/bin/routel
target gateway source proto scope dev tbl
127.0.0.0 broadcast 127.0.0.1 kernel link lo local
127.0.0.0 8 local 127.0.0.1 kernel host lo local
127.0.0.1 local 127.0.0.1 kernel host lo local
127.255.255.255 broadcast 127.0.0.1 kernel link lo local
default unreachable kernel lo unspec
::1 local none lo local
default unreachable kernel lo unspec
echo "running /sbin/route -n"
running /sbin/route -n
/sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
I have noticed that /sbin/route was missing in the chroot I was using. This didn't prevent the tests from passing in the past, but that might be it now? Given that you fix the bin paths, it might be fixed. It would be a wierd behaviour for a missing binary.
I have just pulled 1.0.4 and the tests pass on my machine, about to test in the chroot.
from gateway.
as of 1.0.4, the tests pass!
I'll upload it to Debian in 2 minutes ;)
from gateway.
Related Issues (15)
- Update solaris and freebsd code to have full paths to their executables. HOT 2
- don't hardcode paths for linux HOT 5
- Please tag new release HOT 1
- Will not working on windows of non-Englisht language HOT 2
- Win32 API version HOT 7
- Please create a new (dot) release HOT 1
- DiscoverInterface not in go package HOT 2
- better BSD detection without calling external commands HOT 1
- Windows implementation doesn't consider multiple default GW with different MTUs
- Retrieving router on OSX no longer working
- v1.0.9 build error on linux HOT 1
- please tag and version this project HOT 3
- No longer compiles with older Go versions HOT 4
- Panics on Windows when there is no default gateway
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway.