Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion agent/01_agent_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISCSI" ]]; then
fi

if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
sudo dnf -y install xorriso coreos-installer syslinux skopeo
sudo dnf install -y epel-release
sudo dnf -y install chromium skopeo
fi
38 changes: 6 additions & 32 deletions agent/06_agent_create_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -646,41 +646,15 @@ case "${AGENT_E2E_TEST_BOOT_MODE}" in

check_assisted_install_UI

# Temporarily create a dummy kubeconfig and kubeadmin-password file for the CI
auth_dir=$SCRIPTDIR/$OCP_DIR/auth
mkdir -p $auth_dir
cfg=$auth_dir/kubeconfig
cat << EOF >> ${cfg}
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBGSUNBVLS0tLQo=
server: https://api.test.redhat.com:6443
name: test
contexts:
- context:
cluster: test
user: admin
name: admin
current-context: admin
preferences: {}
users:
- name: admin
user:
client-certificate-data: LS0tLS1CRUdJTiBNBVEUtLS0tLQo=
client-key-data: LS0tLS1CRUdJTiURSBVktLS0tLQo=
EOF
echo "dummy-kubeadmin-password" > $auth_dir/kubeadmin-password
mkdir -p $OCP_DIR/auth
rendezvousIP=$(getRendezvousIP)
get_vips
# Simulate user actions as done on the webUI and start cluster installation
CLUSTER_NAME=$CLUSTER_NAME BASE_DOMAIN=$BASE_DOMAIN RENDEZVOUS_IP=$rendezvousIP OCP_DIR=$OCP_DIR INGRESS_VIP=$INGRESS_VIPS API_VIP=$API_VIPS go run -mod=vendor agent/isobuilder/ui_driven_cluster_installation.go
exit 0
;;
esac

if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
# Current goal is to only verify if the nodes are booted fine,
# TUI sets the rendezvous IP correctly and UI is accessible.
# The next goal is to simulate adding the cluster details via UI
# and complete the cluster installation.
exit 0
fi

if [ ! -z "${AGENT_TEST_CASES:-}" ]; then
run_agent_test_cases
fi
Expand Down
7 changes: 5 additions & 2 deletions agent/agent_post_install_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

source $SCRIPTDIR/common.sh

# Temp code skip the execution flow as cluster is not really installed
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
exit 0
oc wait clusterversion version --for=condition=Available=True --timeout=60m
oc get csv -A
oc get packagemanifests -n openshift-marketplace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these two commands for? It doesn't seem they are testing anything. I was expecting a more explicit check on the list of installed operators

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oc get csv -A is not useful seems like. oc get packagemanifests -n openshift-marketplace gives a list of operators , e.g.

oc get packagemanifests -n openshift-marketplace 
Member
NAME                                CATALOG   AGE
kubernetes-nmstate-operator                   3d20h
kubevirt-hyperconverged                       3d20h
node-healthcheck-operator                     3d20h
fence-agents-remediation                      3d20h
mtv-operator                                  3d20h
cluster-kube-descheduler-operator             3d20h
node-maintenance-operator                     3d20h

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these two commands for? It doesn't seem they are testing anything. I was expecting a more explicit check on the list of installed operators

Could you suggest what else we should be testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you suggest what else we should be testing?

Sorry missed that comment. This part must be changed to verify that the expected list of OLM operators have been successfully installed.
Specifically, the script must check that for each operator listed here (the list can be hard-coded, since it's not going to change so often)

fi

installed_control_plane_nodes=$(oc get nodes --selector=node-role.kubernetes.io/master | grep -v AGE | wc -l)
Expand All @@ -18,3 +19,5 @@ if (( $NUM_MASTERS != $installed_control_plane_nodes )); then
echo "Post install validation failed. Expected $NUM_MASTERS control plane nodes but found $installed_control_plane_nodes."
exit 1
fi

oc get clusterversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this to be a good way to see the cluster version
e.g. oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.19.7 True False 3d19h Error while reconciling 4.19.7: the cluster operator insights is not available

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be preferable, for each required OLM operator, to explicitly verify if it was installed or not, and report it.

Loading