check status logic.
Change-Id: I0242005c0de8bb2d57f2db75c22c63307c4cbc91
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
+
+ echo -n "executing the reltionship within charms ."
while [ $retval -eq 0 ]; do
while [ $retval -eq 0 ]; do
- sleep 30
- juju status > status.txt
- if [ "$(grep -c "waiting" status.txt )" -ge 3 ]; then
- echo " still waiting for machines ..."
+ if juju status | grep -q $waitstatus; then
+ echo -n '.'
if [ $timeoutiter -ge 240 ]; then
if [ $timeoutiter -ge 240 ]; then
fi
timeoutiter=$((timeoutiter+1))
else
fi
timeoutiter=$((timeoutiter+1))
else
# with JUJU 2.0 bundles has to be deployed only once.
juju deploy bundles.yaml --debug
sleep 120
# with JUJU 2.0 bundles has to be deployed only once.
juju deploy bundles.yaml --debug
sleep 120
+ check_status allocating
# seeing issue related to number of open files.
count=`juju status nodes --format=short | grep nodes | wc -l`
c=0
# seeing issue related to number of open files.
count=`juju status nodes --format=short | grep nodes | wc -l`
c=0
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
retval=0
timeoutiter=0
echo -n "executing the reltionship within charms ."
while [ $retval -eq 0 ]; do
retval=0
timeoutiter=0
echo -n "executing the reltionship within charms ."
while [ $retval -eq 0 ]; do
- sleep 30
- if juju status | grep -q "executing"; then
+ if juju status | grep -q $waitstatus; then
echo -n '.'
if [ $timeoutiter -ge 120 ]; then
echo 'timed out'
retval=1
echo -n '.'
if [ $timeoutiter -ge 120 ]; then
echo 'timed out'
retval=1
fi
timeoutiter=$((timeoutiter+1))
else
fi
timeoutiter=$((timeoutiter+1))
else
juju expose ceph-radosgw || true
#juju ssh ceph/0 \ 'sudo radosgw-admin user create --uid="ubuntu" --display-name="Ubuntu Ceph"'
fi
juju expose ceph-radosgw || true
#juju ssh ceph/0 \ 'sudo radosgw-admin user create --uid="ubuntu" --display-name="Ubuntu Ceph"'
fi
echo "...... deployment finishing ......."
echo "...... deployment finishing ......."
echo "...... deployment started ......"
deploy
echo "...... deployment started ......"
deploy
echo "...... deployment finished ......."
echo "...... deployment finished ......."
sudo ../juju/get-cloud-images || true
../juju/joid-configure-openstack || true
sudo ../juju/get-cloud-images || true
../juju/joid-configure-openstack || true
+ if grep -q 'openbaton' bundles.yaml; then
+ juju add-relation openbaton keystone
+ fi
+
elif ([ $opnfvmodel == "kubernetes" ]); then
./k8.sh
fi
elif ([ $opnfvmodel == "kubernetes" ]); then
./k8.sh
fi