Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind /etc/netns/vopono_c_Dt2VWW2Ui1J/openvpn.log -> /etc/openvpn.log failed: No such file or directory #152

Closed
d4h0 opened this issue May 18, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@d4h0
Copy link

d4h0 commented May 18, 2022

I did some digging regarding the above error.

sudo touch /etc/openvpn.log fixes the issue.

The question is, should we just create that file if it's missing, document the error, or is this issue enough for people to find out what is going on?

I'm not really sure what ip netns exec is doing here.

Could eliminating this error lead to issues when Vopono is executed in parallel?

I'm interested in eliminating it, because it adds a lot of output, and because many users probably will think that there is a problem.

@niki-on-github
Copy link

The question is, should we just create that file if it's missing, document the error, or is this issue enough for people to find out what is going on?
I'm not really sure what ip netns exec is doing here.

ip netns exec ${NS_NAME} cmd spawns a temporary mount namespace of /etc/netns/${NS_NAME}/* that exists until cmd exits, after that the mount namespace gets cleaned up.

From man ip-netns:

ip netns exec automates handling of this configuration, file convention for network namespace unaware applications, by creating a mount namespace and bind mounting all of the per network namespace configure files into their traditional location in /etc.

--

Could eliminating this error lead to issues when Vopono is executed in parallel?

No because each namespace makes its own temporary mount to /etc.

I'm interested in eliminating it, because it adds a lot of output, and because many users probably will think that there is a problem.

I think the problem is that the log file should not be stored in /etc/netns/${NS_NAME}/ because of the temporary mount to /etc and /etc is not the correct folder for a log file. So i would recommend to change the log path in vopono/src/openvpn.rs.

@jamesmcm
Copy link
Owner

I think the solution here might be to put the namespace name in the log file name and then just store it in the vopono dir somewhere.

The only reason for putting it in the /etc/netns dir before was so it gets automatically cleaned up and is separate per network namespace.

@jamesmcm jamesmcm added enhancement New feature or request good first issue Good for newcomers labels Jul 17, 2022
@jamesmcm jamesmcm mentioned this issue Jul 24, 2022
@jamesmcm
Copy link
Owner

Fixed in 0.10.1 - log files are moved to ~/.config/vopono/logs/ by network namespace name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants