airshipit / treasuremap

Reference Airship manifests, CICD, and reference architecture.
http://openstack.org
Apache License 2.0
52 stars 39 forks source link

Site doc validation fails #89

Closed manojkva closed 3 years ago

manojkva commented 3 years ago

On running tools/document/validate_site_docs.sh, airshipctl adds an additional “airshipctl” parameter which is leading to “no such file” error.

During call to any of the airshipctl command, it looks like "airshipctl" is appended in between as show in the below file location. This leads to no file error.

/home/zuul/src/opendev.org/airship/treasuremap/airshipctl/manifests/site/test-site/metadata.yaml

Log of validate_site_docs.sh

+ : ../airshipctl
+ export MANIFEST_ROOT=/home/zuul/src/opendev.org/airship/treasuremap
+ MANIFEST_ROOT=/home/zuul/src/opendev.org/airship/treasuremap
+ export SITE_ROOTS=/manifests/site
+ SITE_ROOTS=/manifests/site
+ cd ../airshipctl
+ ./tools/validate_docs
+ : /home/zuul/src/opendev.org/airship/treasuremap
+ : /manifests/site
+ echo 'Fetching kind from ...'
Fetching kind from ...
++ KIND_URL=
++ ./tools/document/get_kind.sh
+ TMP=/tmp/tmp.OlSHHWIpNU
+ export KIND=/tmp/tmp.OlSHHWIpNU/kind
+ KIND=/tmp/tmp.OlSHHWIpNU/kind
+ export KUBECTL_URL
+ for site_root in ${SITE_ROOTS}
++ ls /home/zuul/src/opendev.org/airship/treasuremap//manifests/site
+ for site in $(ls ${MANIFEST_ROOT}/${site_root})
+ echo -e '\nValidating site: /home/zuul/src/opendev.org/airship/treasuremap//manifests/site/test-site\n****************'

Validating site: /home/zuul/src/opendev.org/airship/treasuremap//manifests/site/test-site
****************
+ MANIFEST_ROOT=/home/zuul/src/opendev.org/airship/treasuremap
+ SITE_ROOT=/manifests/site
+ SITE=test-site
+ ./tools/document/validate_site_docs.sh
+ : /home/zuul/src/opendev.org/airship/treasuremap
+ : /manifests/site
+ : test-site
+ : kind-airship
+ : /home/zuul/.airship/kubeconfig
+ : /usr/local/bin/kubectl
++ mktemp -d
+ TMP=/tmp/tmp.doKQHm5OiZ
+ '[' -f bin/airshipctl ']'
++ which airshipctl
+ AIRSHIPCTL_DEFAULT=/usr/local/bin/airshipctl
+ : /tmp/tmp.doKQHm5OiZ/config
+ : /tmp/tmp.doKQHm5OiZ/kubeconfig
+ : /usr/local/bin/airshipctl
+ ACTL='/usr/local/bin/airshipctl --airshipconf /tmp/tmp.doKQHm5OiZ/config --kubeconfig /tmp/tmp.doKQHm5OiZ/kubeconfig'
+ export KUBECONFIG
+ trap cleanup EXIT
+ generate_airshipconf default
+ cluster=default
+ cat
++ airshipctl --airshipconf /tmp/tmp.doKQHm5OiZ/config plan list
++ grep PhasePlan
++ awk -F / '{print $2}'
++ awk '{print $1}'
open /home/zuul/src/opendev.org/airship/treasuremap/airshipctl/manifests/site/test-site/metadata.yaml: no such file or directory
jezogwza commented 3 years ago

Gate jobs using this script appear to be passing, can you elaborate as to when you are experiencing this. And the steps to reproduce this.

mattmceuen commented 3 years ago

The gate is passing for airshipctl, but is failing for treasuremap. Ruslan A worked on these scripts recently and if he could take a look at it he might spot the issue quickly (I can't find Ruslan's github ID)

eak13 commented 3 years ago

@raliev12 any chance you can take a look? Thanks!

raliev12 commented 3 years ago

Validation scripts were configured properly for airshipctl repository, however there is need to adjust some of variables to run validation against treasuremap sites. It was already done here, but now there is an issue with secret generation, which is not related to validation script itself.

matthew-fuller commented 3 years ago

Please assign this to me.

eak13 commented 3 years ago

@matthew-fuller all yours, just lmk what t-shirt you want to add once you've had a chance to assess. Thanks!

matthew-fuller commented 3 years ago

It looks like most of the issues related to this change have already been solved. I just made a small change to modify the default value for MANIFEST_ROOT to dirname ${PWD} so the script can be run locally from the treasuremap directory without needing to explicitly set the root first. That was really the only issue I ran into when trying to run the script locally. https://review.opendev.org/c/airship/treasuremap/+/780064