Open ymolists opened 7 years ago
Can you provide a copy of the script and your edward.json? Or an equivalent small example.
Just Great !
{
"name": "namenode-init",
"commands": {
"build": "./hadoop-2.6.0-cdh5.4.10/bin/hdfs --config conf/conf000 namenode -format"
}
},
{
"name": "namenode-server",
"commands": {
"launch": "./hadoop-2.6.0-cdh5.4.10/sbin/hadoop-daemon.sh --config ${PWD}/conf/conf000 start namenode"
},
"launch_checks": {
"ports": [
8020
]
}
},
This ^^^ is what i have in my edward.json file. The ./sbin/hadoop-daemon.sh start a java process in the background then exits. I might be in uncharted territory here with java an all ... Please let me know if this is something you can support :))
Ah, I understand. What's happening is that Edward expects the process it launches to continue running to indicate that the "service" is still running.
It would make sense to allow for the launch checks to be considered when determining if a service is still running or not, so we would check for the port as a backup if the process Edward launched stopped. I'll see if I can put something together to that effect.
As a hack for now, you could wrap your current script in another script that runs hadoop-daemon.sh then waits for an interrupt to exit. Edward can then monitor that script.
Side note, arenamenode-init
and namenode-server
completely separate? Or is there something in your workflow that required you to separate the build and launch phases?
Are you saying that edward will be able to detect the port as well when i do edward status
after the hack ?
namenode-init is supposed to be run once to initialize the hdfs file system. from time to time i need to run it again to start with a clean filesystem.
p.s. If you are on slack in the gopher stratosphere we can talk :))
Ah, makes sense. We have similar setups for rewriting config files.
Using the port checks in edward status
would also be a goal. However, you would need to provide a stop script to be able to stop the service.
I'm in the Gopher's slack as telliott.
when i start a process from a script in the background edward thinks that the process exited. So the status shows as non running. It should see that the process started another pocess that is listening on a certain port.