Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Install script is noisy about errors, which seem to not be true errors but polling results #110

Open
barecode opened this issue Oct 23, 2019 · 2 comments
Labels
good first issue Good for newcomers

Comments

@barecode
Copy link

This happens repeatedly... I'm assuming its polling for status as it exits successfully eventually... it just looks bad and I would strongly recommend we supress the error or reword it because my first thought was "oh crap what did I break?"

+ oc get crd services.serving.knative.dev
No resources found.
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "services.serving.knative.dev" not found
+ sleep 1

I think this output as-is is very confusing (as I said, I initially thought I made a mistake somewhere). I would strongly recommend an alternative would be to print a message that says something to the effect of "Waiting for Knative services to be available..." or something to that effect.

@stevenschader
Copy link
Contributor

stevenschader commented Oct 25, 2019

Also there could a an infinite loop using these constructs:

Need to wait for knative serving CRDs before installing tekton webhook extension

until oc get crd services.serving.knative.dev
do
sleep $SLEEP_SHORT
done

Seems my CRC env lost it's auth during the processing and it's just plain stuck looping.....
[kevin@svtcrc-16749-1 ocp42]$ oc get crd services.serving.knative.dev
error: You must be logged in to the server (Unauthorized)
[kevin@svtcrc-16749-1 ocp42]$ echo $?
1

One possible solution:

KFCOUNT="${KFCOUNT:-99}"
counter=1
until [ $counter -gt $KFCOUNT ] || oc get crd services.serving.knative.dev
do
sleep $SLEEP_SHORT
((counter++))
done
[ $counter -gt $KFCOUNT ] && echo "Error encounterd" || true

@dacleyra
Copy link
Contributor

dacleyra commented Nov 6, 2019

The script is re-written for 0.3.0
set -x is still in effect
Infinite loop checks still exist
Install script can be run multiple times without negative consequence

https://github.com/kabanero-io/kabanero-operator/releases/download/0.3.0-rc.1/install.sh

Note this issue with OLM can delay the install process while it waits for the catalog source to be ready
operator-framework/operator-lifecycle-manager#1098

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants