From 3700dbd91de48e9adf52536b44c38ed422549784 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Tue, 26 Sep 2017 14:57:27 -0500 Subject: chmod + script execution issues in docker Change-Id: I96f942cab9d220418be6fe622c86b4bb3eb4e6c9 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez --- policy-drools/do-start.sh | 4 +--- policy-drools/docker-install.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'policy-drools') diff --git a/policy-drools/do-start.sh b/policy-drools/do-start.sh index 450fe872..e1857441 100644 --- a/policy-drools/do-start.sh +++ b/policy-drools/do-start.sh @@ -23,9 +23,6 @@ else mkdir -p $POLICY_HOME/etc/ssl cp config/policy-keystore $POLICY_HOME/etc/ssl - # this should probably be done by install.sh - mvn install:install-file archetype:crawl -Dfile="archetype-closedloop-demo-rules-1.0.0-SNAPSHOT.jar" -DgroupId=org.onap.policy.archetype -DartifactId=archetype-closedloop-demo-rules -Dversion="1.0.0-SNAPSHOT" -Dpackaging=jar -DgeneratePom=true -DupdateReleaseInfo=true - if [[ -x config/drools-tweaks.sh ]] ; then echo "Executing tweaks" # file may not be executable; running it as an @@ -35,6 +32,7 @@ else # wait for DB up ./wait-for-port.sh mariadb 3306 + # now that DB is up, invoke database upgrade: # sql provisioning scripts should be invoked here. fi diff --git a/policy-drools/docker-install.sh b/policy-drools/docker-install.sh index de2d7070..a1794543 100644 --- a/policy-drools/docker-install.sh +++ b/policy-drools/docker-install.sh @@ -881,7 +881,17 @@ function do_install() # base drools installation from the drools apps # is executed here + # sync and sleep is used to make sure file system + # syncronization happens. When running within docker back + # to back operations on the same file such as + # chmod and then script execution, it has been + # seen that the script execution returns "text busy" + # OS error. + chmod +x ./apps-installer + + sync + sleep 5s ./apps-installer fi -- cgit 1.2.3-korg