fgrehm / vagrant-lxc

LXC provider for Vagrant
MIT License
1.21k stars 181 forks source link

Support the new redir 3.x command line interface #460

Closed lucaskanashiro closed 6 years ago

lucaskanashiro commented 6 years ago

Since redir 2.x upstream is not evolving it, Joachim Nilsson adopted it and have started to work on it and publish a new command line interface (check out https://github.com/troglobit/redir). The redir 3.1 is already available in Debian and Ubuntu in their stable releases.

ghost commented 6 years ago

Thanks for this PR, will look at it soon. A few preliminary questions (I don't know much about redir and its transition to v3):

  1. Is this patch backward-compatible? Will it break on systems still on redir 2.x?
  2. Does redir v3 support the old-style command line? Does vagrant-lxc still work on systems that have redir v3 (the system I'm on has redir v2, so I haven't tried yet).
lucaskanashiro commented 6 years ago

Hi @hsoft . Answering your questions below:

  1. No, the actual patch is not backward compatible, I intend to update it soonish.
  2. Yes, it supports but not by default. I contacted the redir's maintainer and he will keep both cli versions working. The main issue is that you need to build redir with a specific parameter in order to enable the backward compatibility. In Debian I already did it (it should fix the Debian based systems), but in other distributions we do not know if they are doing that, that's why I think that vagrant-lxc needs to support both of them.

In resume, I will update this patch to support both versions of redir's cli. With this patch vagrant-lxc will work in any case.

ghost commented 6 years ago

Thanks for this. I have v2.21 here and I've verified that this new patch doesn't break anything on that side. I'll try updating my version of redir soon, but for now, not breaking the old ways is good enough for merging.