sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

minimega: fix vm name check for rtunnel #1385

Closed djfritz closed 4 years ago

djfritz commented 4 years ago

fixes #1384

djfritz commented 4 years ago

@mkunz7 @aherna

aherna commented 4 years ago

@djfritz We now get the below error when creating the rtunnel. ie cc rtunnel 127.0.0.1

2019/11/21 23:49:13 ERROR mux.go:122: dial tcp 127.0.0.1:: getsockopt: connection refused

aherna commented 4 years ago

@djfritz We now get the below error when creating the rtunnel. ie cc rtunnel 127.0.0.1

2019/11/21 23:49:13 ERROR mux.go:122: dial tcp 127.0.0.1:: getsockopt: connection refused

looks like its working. looks like if the os is not listening on the specified port it will fail with that error

djfritz commented 4 years ago

rtunnel shouldn't open any sockets initially on the host - it forwards any connections from guests to some destination - so that error should only occur when whatever is trying to connect inside the guest attempts a connection and then, as you say, the service isn't listening, etc.

So in a sense, that's not an error - it's perfectly acceptable to have a tunnel without something listening on the destination. The connection refused error should also be correctly propagated to the guest application as well.

@jcrussell @csymonds @jasoncontrib - can we get a review?