dougmcclure / ILA-Open-Beta

Expiriments with ILA and DevOps, IT Operations and Automation Tools
1 stars 1 forks source link

Scenario2 Preview Issue - hanging provisioning script for box1 #14

Closed dougmcclure closed 11 years ago

dougmcclure commented 11 years ago

For some reason, during the vagrant up process for box1 the final provisioning script (box1_installScenario2.sh) doesn't cleanly end and return back to the Windows command prompt. Everything processes fine and I've had to CNTRL-C out to get back to the prompt. Not sure why this is happening - and only for box1.

c835722 commented 11 years ago

This seems like a close match. https://github.com/mitchellh/vagrant/issues/603

I also note some java exceptions in /var/log/messages of box1 which may be benign.

dougmcclure commented 11 years ago

Trying to follow Alex's comment in that thread. What's he mean by "bootstrap.sh example"?

It's likely due to I/O from the script causing SSH to hang up. I have a bootstrap.sh example that starts up a java process and closes stdin and redirects the rest to a log file.

(   exec 0>&- # close stdin
    /etc/init.d/myservice start ;# start my app service.
) &> /var/log/vagrant/bootstrap.log # redirect stdout/err to a log.

This does not hang nor prevent a second shell script from firing in my provisioning process.

c835722 commented 11 years ago

Just for fun, what happens if you take it out? (Given its an open bug we want to test whether maneuvering ILA-Open-Beta project components to see if we can prevent it occurring).

dougmcclure commented 11 years ago

It's definitely related to the portion where I start things back up with sudo -u scla ./unity.sh -start.

I got it to spin up and move to next provisioners in the pipeline using this:

( exec 0>&- # close stdin sudo -u $USERNAME ./unity.sh -start ;# start SCAA ) &> $BASE_DIR/scenario2-startup.log

I'll be updating files in the branch soon and merging into master. I've got scenario3 pretty much ready as well to put into a branch off that.