mendix / m2ee-tools

m2ee, the Mendix runtime helper tools for GNU/Linux
Other
27 stars 40 forks source link

Buildpack #27

Closed jtwaleson closed 6 years ago

jtwaleson commented 6 years ago

Backport some changes that were made manually in cf-mendix-buildpack.

knorrie commented 6 years ago

About the warn_constants: Yes, that's an annoyance. I already have https://github.com/mendix/m2ee-tools/issues/17 so I'd like to do that, but then as first version of the explicit check_constants command, and stop doing it automatically already.

About the stdio: detaching a process and keeping stdio open does not make sense. Either you background the process or you keep it open as a child with inherited file descriptors.

About http proxy fix: nice find, agree.

knorrie commented 6 years ago

Ok, I picked the proxy fix, and did the constants patch a bit different as check_constants command with also a nice message when everything is OK.

Would it be possible to just use the nodetach option that is present since recent, instead of the stdio patch?

jtwaleson commented 6 years ago

Great! Yes I think the nodetach option is the way to go, but currently it looks like it was designed mostly for experimenting in the CLI. Are there things you already know that need to be fixed before we can use nodetach in production in the buildpack or do you think that we should just start testing it?

knorrie commented 6 years ago

Afaik it just works (tm). Use start_appcontainer(detach=True) and the code will continue after the JVM process is successfully launced.

You can also use runner.check_attached_proc() to see if it's still alive, and act accordingly if not.

And note that you can't just exit the parent process when the attached child is still running, but I think that's not an issue for the buildpack situation?

knorrie commented 6 years ago

OK, closing now. Thanks.