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

Make the repositpory server into a fully flegged Lago object #27

Open
ifireball opened this issue Oct 22, 2017 · 0 comments
Open

Make the repositpory server into a fully flegged Lago object #27

ifireball opened this issue Oct 22, 2017 · 0 comments

Comments

@ifireball
Copy link

ifireball commented Oct 22, 2017

The repository server is currently a very strange thing, is something that lives in the Lago environment but:

  • It isn't mentioned in the LagoInitFile
  • Its not started on lago start
  • Its not stopped on lago stop
  • It can be left behind even after lago destroy
  • lago ovirt serve is the only lago command that creates a long lived Lago process.

The above had been causing several issues:

  • Users frequently forget to run lago ovirt serve
  • Whet cleanup steps fail, lago ovirt serve can keep runing and prevent the same command from being run in a new lago environment on the same host

What needs to be done IMO:

  1. The code for running the local server should be changed so that instead of assuming the server will always be started and stopped within the same python process, the server will be double forked to a new daemon process whose PID will be tracked with a file in the prefix.
  2. A new syntax will be added to the LagoInitFile to specify that a local repo server should be available in the environment (It could be expanded in the future to enable running multiple servers and specifying that reposync should run at deploy, but lets not spend time on enhancements ATM)
  3. lago start needs to be changed to start the server if asked for, lago stop to stop it etc.
  4. lago status should show the status of the repo server. To do that, it should have a special URL defined that will return some status JSON. To be robust the status command should probably always try to check if the server process is up before trying to query it over HTTP.
  5. The lago ovirt serve command should be converted into a noop showing a deprecation warning with some instructions on how to add the server to the LagoIniFile.

Also it might be useful to move the server code to its own separate Python file so that we don't have to have the whole Lago code base in memory just to serve some files over HTTP.

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