Thanks Stefan !
Le 02/04/2017 à 19:23, Stefan Seelmann a écrit : > On 03/26/2017 01:38 PM, Emmanuel Lécharny wrote: >> >> Le 26/03/2017 à 13:25, Stefan Seelmann a écrit : >>> Hi, >>> >>> another test that is failing in Studio is related to ApacheDS repair mode. >>> >>> I found out that when executing the "repair" command from commandline >>> (using apacheds.sh from tar.gz) we (1) start the server with boolean >>> flag startServers=false and then (2) run the repair, so far so good. But >>> when repair is finished the JVM doesn't terminate. It also not possible >>> to stop it via "stop" command because shutdown listener is not started. >> Ah, that is clearly wrong. The idea was to repair the database, then to >> start the server properly, including the shutdown listener. That part is >> missing, I think. >>> I think we need to change >>> (1) the UberJarMain.repair() method to stop the service again so the JVM >>> can terminate >>> (2) all the init scripts to run repair in interactive mode and await >>> termination >>> >>> Or, should we change the repair back to behaviour in 2.0.0-M23 where it >>> was more a "start and repair"? >> Yes, I think it would be better. We could also add a flag that does not >> restart the server once teh database has been repaired, but it might be >> superfluous. > After messing around with the ApacheDS code, the installers, the tests, > and Studio I did the following: > > 1. Changed UberJarMain and ApacheDsTanukiWrapper, the "repair" command > now only repairs. I still need to start the service before so everything > is properly initialized and wired, but after repair the service is > stopped and the JVM can terminate. Combined actions like "repair and > start" can still be done by the callers, see next item. > http://svn.apache.org/viewvc?rev=1789896&view=rev > > 2. Changed the installer scripts, the "repair" action now first runs the > "repair" command, afterwards the normal "start" command to start the > server. In the Tanuki wrapper scripts* it already was like that before, > not sure how that worked. I also changed the apacheds.sh script. > http://svn.apache.org/viewvc?rev=1789897&view=rev > > 3. Updated Docker tests, I still have to test Windows and Mac installers. > http://svn.apache.org/viewvc?rev=1789898&view=rev > > 4. Changed the Studio ApacheDS repair action. It now only does the > "repair" part, afterwards the server is stopped: > http://svn.apache.org/viewvc?rev=1789899&view=rev > > Kind Regards, > Stefan > > > * I'm unsuer which of the wrapper scripts > installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/apacheds > and > installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper/src/sh.script.in > is actually used. > -- Emmanuel Lecharny Symas.com directory.apache.org
