CentaurusInfra / arktos

Arktos for large-scale cloud platform
Apache License 2.0
245 stars 69 forks source link

Cannot get runtime deployment file when run arktos #308

Open ZongbaoLiu opened 4 years ago

ZongbaoLiu commented 4 years ago

What happened: execute hack/arktos-up.sh, then the following happened:

Getting runtime deployment file  images.yaml
--2020-05-23 13:31:05--  https://raw.githubusercontent.com/futurewei-cloud/arktos-vm-runtime/release-0.5/deploy/images.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.228.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.228.133|:443... failed: Connection refused.
!!! [0523 13:31:05] Call tree:
!!! [0523 13:31:05]  1: /home/liuzongbao/go/src/github.com/arktos/hack/lib/common.sh:79 copyRuntimeDeploymentFile(...)
!!! [0523 13:31:05]  2: hack/arktos-up.sh:66 source(...)
!!! Error in /home/liuzongbao/go/src/github.com/arktos/hack/lib/common.sh:69
  Error in /home/liuzongbao/go/src/github.com/arktos/hack/lib/common.sh:69. '((i<4-1))' exited with status 4
Call stack:
  1: /home/liuzongbao/go/src/github.com/arktos/hack/lib/common.sh:69 copyRuntimeDeploymentFile(...)
  2: /home/liuzongbao/go/src/github.com/arktos/hack/lib/common.sh:79 source(...)
  3: hack/arktos-up.sh:66 main(...)
Exiting with status 1

Environment:

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"


- Kernel (e.g. `uname -a`):

[root@cento1908 arktos]# uname -a Linux cento1908 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

ZongbaoLiu commented 4 years ago

in hack/lib/common.sh, it need to get six runtime deployment files and maybe fail with connection refused.

# local function to download runtime deployment file
copyRuntimeDeploymentFile() {
  if [[ $# != 2 ]]; then
    echo "Invalid args in copyRuntimeDeploymentFile"
    exit 1
  fi

  fileName=$1
  pathInSrc=$2
  if [[ (${OVERWRITE_DEPLOYMENT_FILES} == "true") || (! -f ${VIRTLET_DEPLOYMENT_FILES_DIR}/${fileName}) ]]; then 
    echo "Getting runtime deployment file " ${fileName}
    wget -O ${VIRTLET_DEPLOYMENT_FILES_DIR}/${fileName}  ${VIRTLET_DEPLOYMENT_FILES_SRC}/${pathInSrc}
  fi
}
# Get runtime deployment files
copyRuntimeDeploymentFile "libvirt-qemu" "apparmor/libvirt-qemu"
copyRuntimeDeploymentFile "libvirtd" "apparmor/libvirtd"
copyRuntimeDeploymentFile "virtlet" "apparmor/virtlet"
copyRuntimeDeploymentFile "vms" "apparmor/vms"
copyRuntimeDeploymentFile "vmruntime.yaml" "data/virtlet-ds.yaml"
copyRuntimeDeploymentFile "images.yaml" "images.yaml"

It need to add a retry count in code

wget -O ${VIRTLET_DEPLOYMENT_FILES_DIR}/${fileName}  ${VIRTLET_DEPLOYMENT_FILES_SRC}/${pathInSrc}

Maybe it's like this

wget -t 10 -O ${VIRTLET_DEPLOYMENT_FILES_DIR}/${fileName}  ${VIRTLET_DEPLOYMENT_FILES_SRC}/${pathInSrc}
ZongbaoLiu commented 4 years ago

It can be solved, like this

wget --no-check-certificate -O ${VIRTLET_DEPLOYMENT_FILES_DIR}/${fileName}  ${VIRTLET_DEPLOYMENT_FILES_SRC}/${pathInSrc}