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

pip upgrading breaks the former installed configuration #322

Open
mohierf opened this issue Sep 7, 2017 · 2 comments
Open

pip upgrading breaks the former installed configuration #322

mohierf opened this issue Sep 7, 2017 · 2 comments

Comments

@mohierf
Copy link
Contributor

mohierf commented Sep 7, 2017

When upgrading the web ui with the pip install alignak-webui --upgrade the former configuration is replaced with the default shipped configuration.

This is the drawbacks of pip distributing this application :/

Perharps we should ship settings.dist, logging.dist and uwsgi.dist to be renamed by the end user as settings.cfg, logging.json and uwsgi.ini ... this will avoid deleting a real configuration when upgrading

@mohierf
Copy link
Contributor Author

mohierf commented Sep 19, 2017

Moreover, upgrading is always destroying the existing log files because the * /usr/local/var/log/alignak-webui* directory is deleted during the uninstall process (same as the configuration files directory).

Currently it does not look possible to interfere with the pip uninstall process and thus avoid files deletion!

@mohierf
Copy link
Contributor Author

mohierf commented Sep 19, 2017

The proposed solution (to be tested). Oon start, the Web UI application:

  • checks whether required directories exist. If not they are created
  • checks whether a configuration file is found. If the file is found, the application starts with this configuration
  • If no configuration file exists, the application will copy a settings.dist file to settings.cfg as a default configuration file

The problem that is not fixed with this solution is the uwsgi.ini file ... let's assume that the sysadmin will be able to copy an uwsgi.dist file to uwsgi.ini 😉

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

No branches or pull requests

1 participant