diff options
author | Harry Huang <huangxiangyu5@huawei.com> | 2017-03-20 10:59:42 +0800 |
---|---|---|
committer | Harry Huang <huangxiangyu5@huawei.com> | 2017-03-21 16:40:51 +0800 |
commit | f809fd6d07d3447af62297377f963e1c6e4556e3 (patch) | |
tree | 514fd3c2779f0af6a10373c9f602100d074ce364 | |
parent | f1ef7f43d12751b10314a7e07c3e3ae815057a39 (diff) |
Add delay when upload csar package fail
There is occasional failure when upload csar package.
Add 10 second 10 retries to workaroud this problem.
Change-Id: I0d081699d744bc2a3f93d23fa5afea48f426beff
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rwxr-xr-x | conf/admin-openrc.sh | 2 | ||||
-rwxr-xr-x | juju/juju_launch.sh | 3 | ||||
-rwxr-xr-x | open-o/openo_docker.sh | 4 | ||||
-rwxr-xr-x | opera/openo_connect.py | 4 |
4 files changed, 8 insertions, 5 deletions
diff --git a/conf/admin-openrc.sh b/conf/admin-openrc.sh index 1f3309f..bb0932c 100755 --- a/conf/admin-openrc.sh +++ b/conf/admin-openrc.sh @@ -3,6 +3,6 @@ export OS_USER_DOMAIN_NAME=default export OS_USERNAME=admin export OS_PASSWORD=console export OS_PROJECT_NAME=admin -export OS_AUTH_URL=http://192.168.104.222:5000/v3 +export OS_AUTH_URL=http://192.168.104.222:35357/v3 export OS_IDENTITY_API_VERSION=3 export OS_REGION_NAME=RegionOne diff --git a/juju/juju_launch.sh b/juju/juju_launch.sh index 2aff57e..766ebfe 100755 --- a/juju/juju_launch.sh +++ b/juju/juju_launch.sh @@ -78,7 +78,8 @@ function juju_client_prepare() $OS_REGION_NAME: endpoint: $OS_AUTH_URL' > clouds.yaml" - local cmd1="juju add-cloud openstack clouds.yaml --replace" + local cmd1="juju remove-cloud openstack; \ + juju add-cloud openstack clouds.yaml --replace" exec_cmd_on_client $cmd1 if [[ ! $(exec_cmd_on_client "juju list-clouds | grep openstack") ]]; then diff --git a/open-o/openo_docker.sh b/open-o/openo_docker.sh index 7cd6eb6..b857988 100755 --- a/open-o/openo_docker.sh +++ b/open-o/openo_docker.sh @@ -69,7 +69,7 @@ function docker_pull() do echo "Try again" done - until docker pull openoint/nfvo-driver-vnfm-juju + until docker pull huangxiangyu/nfvo-driver-vnfm-juju:$OPENO_VERSION do echo "Try again" done @@ -194,7 +194,7 @@ function docker_run() docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-sdnc-zte openoint/nfvo-driver-sdnc-zte:$OPENO_VERSION docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vim openoint/nfvo-driver-vim:$OPENO_VERSION docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-huawei openoint/nfvo-driver-vnfm-huawei:$OPENO_VERSION - docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-juju -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_PORT:8483 -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_MYSQL_PORT:3306 openoint/nfvo-driver-vnfm-juju + docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-juju -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_PORT:8483 -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_MYSQL_PORT:3306 huangxiangyu/nfvo-driver-vnfm-juju:$OPENO_VERSION docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-zte openoint/nfvo-driver-vnfm-zte:$OPENO_VERSION docker run -d -e MSB_ADDR=$msb_ip -e MYSQL_ADDR=$tosca_inventory_ip:3306 --name nfvo-lcm -p $OPENO_IP:8403:8403 openoint/nfvo-lcm:$OPENO_VERSION docker run -d -e MSB_ADDR=$msb_ip --name nfvo-resmanagement openoint/nfvo-resmanagement:$OPENO_VERSION diff --git a/opera/openo_connect.py b/opera/openo_connect.py index 4e9e4fb..aa50562 100755 --- a/opera/openo_connect.py +++ b/opera/openo_connect.py @@ -151,9 +151,11 @@ def upload_csar(msb_ip, package): files = {'file': open(package, 'rb')} res = requests.post(csar_url, files=files) if res.status_code != 200: - retry = 5 + retry = 10 while retry != 0: + time.sleep(5) delete_csars(msb_ip) + time.sleep(5) retry_res = requests.post(csar_url, files=files) if retry_res.status_code == 200: break |