[Compass] Move cacert docker copy after chown in fetch_os_creds 75/37575/3
authorwutianwei <wutianwei1@huawei.com>
Sun, 16 Jul 2017 04:14:32 +0000 (12:14 +0800)
committerwutianwei <wutianwei1@huawei.com>
Sun, 16 Jul 2017 09:48:41 +0000 (17:48 +0800)
sometimes it can't copy os_cacert but copy opnfv_openrc.
it cause an issue and didn't execute the command chown.
so the opnfv_openrc will belong to root, which will cause errors next time.

Change-Id: I2955ba347d399d65c9e5cd566235be06fb7c30af
Signed-off-by: wutianwei <wutianwei1@huawei.com>
utils/fetch_os_creds.sh

index 1ee8b84..8374edb 100755 (executable)
@@ -157,8 +157,8 @@ elif [ "$installer_type" == "apex" ]; then
 elif [ "$installer_type" == "compass" ]; then
     if [ "${BRANCH}" == "master" ]; then
         sudo docker cp compass-tasks:/opt/openrc $dest_path &> /dev/null
-        sudo docker cp compass-tasks:/opt/os_cacert $os_cacert &> /dev/null
         sudo chown $(whoami):$(whoami) $dest_path
+        sudo docker cp compass-tasks:/opt/os_cacert $os_cacert &> /dev/null
     else
         verify_connectivity $installer_ip
         controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \