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

starting failed because of missing /var/lib/ergw #4

Closed
grundrauschen opened this issue Nov 15, 2016 · 1 comment
Closed

starting failed because of missing /var/lib/ergw #4

grundrauschen opened this issue Nov 15, 2016 · 1 comment

Comments

@grundrauschen
Copy link

grundrauschen commented Nov 15, 2016

I am trying to run erGW in a configuration as gtp-c-node in a Docker container.
The release was built with rebar3 and then copied.
During bootup the following error message appeared: 18:48:14.552 [error] Failed to read /var/lib/ergw/ergw.state with no such file or directory.
After creation of /var/lib/ergw/ the error did not come up again.
It would be great if the software could be patched, so that it creates the folder during bootup if it is missing.

(the build recipe can be found at https://github.com/travelping/ergw-gtp-c-node-docker and the built docker image at https://hub.docker.com/r/grundrausch3n/ergw-gtp-c-node/)

@RoadRunnr
Copy link
Member

creating directories (especially a directory in /var/lib) is not the task of an application. It has do be done by some external management entity (human administrator, packing system, deployment instrumentation, ....).

The reason is that the application can not:

  1. know what permission and ownership that directory should have
  2. might not even have the permission to create a directory in that place (in this case it would require write permission to /var/lib, there are many reason why a erGW instance might not have that, e.g. selinux, apparmor, ....)
  3. it is not common for Unix application to create directories automatically outside of an directory hierarchy that has been assigned to them (by policy). Creating sub-directories inside of /var/lib/ergw/ would be ok.

So, to summarize, it's not the applications to create that directory. Make sure your installation or packaging process does create that directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants