Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451574 - net-misc/openvpn-2.2.2: cannot open ifconfig-pool-persist file on startup
Summary: net-misc/openvpn-2.2.2: cannot open ifconfig-pool-persist file on startup
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dirkjan Ochtman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-12 21:26 UTC by Michael Orlitzky
Modified: 2013-04-17 20:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2013-01-12 21:26:46 UTC
I noticed these in our logs:

  Sat Jan 12 15:56:45 2013 Note: cannot open /var/run/openvpn/ifconfig-pool-persist for READ/WRITE

A `mkdir /var/run/openvpn` as root is all it took to fix it. The error appears upon starting openvpn.
Comment 1 Michael Orlitzky gentoo-dev 2013-02-27 19:14:05 UTC
For what it's worth, this also happens on a fresh install so it should be easy to reproduce.
Comment 2 Josh Cepek 2013-04-17 19:16:39 UTC
This isn't a problem with OpenVPN within Gentoo but how you're using it.

The use of the --ifconfig-pool-persist file is *not* at default, and not something Gentoo is adding in the initscript. The only use the initscript provided by Gentoo has with /var/run/ is to store the PID, and that's stored at /var/run/ (not an openvpn subdirectory.) Thus /var/run/openvpn/ is *not* expected to exist on a "stock" install.

You are the one that has specified the path argument to this file, and it is thus your responsibility to insure that the directory exists where you want this file to reside.

And finally, while this isn't on topic with your original bug, you're better off not even using the --ifconfig-pool-persist directive anyway; it won't give clients static addresses since the client -> IP mappings are used as suggestions only by openvpn. If you want proper static IPs with openvpn, use a smaller --ifconfig-pool range and use --ifconfig-push directives in a ccd or --client-connect script.

Since this is not a bug with OpenVPN or Gentoo, I suggest it be closed out.
Comment 3 Dirkjan Ochtman gentoo-dev 2013-04-17 20:37:29 UTC
Sounds good. Josh, thanks for the analysis.