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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/06_agent_create_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ case "${AGENT_E2E_TEST_BOOT_MODE}" in
# Simulate user actions as done on the webUI and start cluster installation
ocp_dir_abs_path="$(realpath "${OCP_DIR}")"
pushd agent/isobuilder/ui_driven_cluster_installation
CLUSTER_NAME=$CLUSTER_NAME BASE_DOMAIN=$BASE_DOMAIN RENDEZVOUS_IP=$rendezvousIP OCP_DIR=$ocp_dir_abs_path INGRESS_VIP=$INGRESS_VIPS API_VIP=$API_VIPS go run main.go
CLUSTER_NAME=$CLUSTER_NAME BASE_DOMAIN=$BASE_DOMAIN RENDEZVOUS_IP=$rendezvousIP OCP_DIR=$ocp_dir_abs_path INGRESS_VIP=$INGRESS_VIPS API_VIP=$API_VIPS SSH_PUB_KEY=$SSH_PUB_KEY go run main.go
Copy link
Member

Choose a reason for hiding this comment

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

Even with the ssh key set, the agent-gather fails as it's using the wrong IP (.80 instead of .20):

...
+(./agent/gather.sh:14): ssh -n -o ConnectTimeout=30 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null core@192.168.111.80 agent-gather -O
ssh: connect to host 192.168.111.80 port 22: No route to host

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The rendezvousIP was passed correctly as its then used to interact with the UI URL. Not sure how .80 IP is being used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the hosts file is getting written incorrectly. https://github.com/openshift-metal3/dev-scripts/blob/master/agent/05_agent_configure.sh#L23-L28

add_ip_host_entry "$node_ip" "$hostname"

Then gather reads this file

while read line
do
ip=$( echo "$line" | cut -d " " -f 1)
host=$( echo "$line" | cut -d " " -f 2)
echo "Trying to gather agent logs on host ${host}"
if ssh -n -o 'ConnectTimeout=30' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' core@"${ip}" agent-gather -O >agent-gather-"${host}".tar.xz; then

Copy link
Member

Choose a reason for hiding this comment

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

Note: I mentioned the right problem but in the wrong context :) the SSH key injected in this PR will be used on the must-gather only - anyhow the IP problem remains

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
Contributor Author

Choose a reason for hiding this comment

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

popd
exit 0
;;
Expand Down
14 changes: 4 additions & 10 deletions agent/isobuilder/ui_driven_cluster_installation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"path/filepath"

"errors"
"strings"
"time"

errs "github.com/pkg/errors"
Expand Down Expand Up @@ -137,20 +136,13 @@ func main() {
func clusterDetails(page *rod.Page, path string) error {
page.MustElement("#form-input-name-field").MustInput(clusterName)
page.MustElement("#form-input-baseDnsDomain-field").MustInput(baseDomain)

pullSecretPath := os.Getenv("PULL_SECRET_FILE")
secretBytes, err := os.ReadFile(pullSecretPath)
if err != nil {
return fmt.Errorf("failed to read pull secret file: %v", err)
}
pullSecret := strings.TrimSpace(string(secretBytes))
page.MustElement("#form-input-pullSecret-field").MustInput(pullSecret)
page.MustElement("#form-input-pullSecret-field").MustInput(`{"auths":{"":{"auth":"dXNlcjpwYXNz"}}}`)

// Allow UI enough time to complete the background API call to create the cluster
time.Sleep(2 * time.Second)
page.MustElement("button[name='next']").MustWaitEnabled()

err = saveFullPageScreenshot(page, path)
err := saveFullPageScreenshot(page, path)
if err != nil {
return err
}
Expand Down Expand Up @@ -191,8 +183,10 @@ func verifyStorage(page *rod.Page, path string) error {
func networkingDetails(page *rod.Page, path string) error {
apiVip := os.Getenv("API_VIP")
ingressVip := os.Getenv("INGRESS_VIP")
sshPublicKey := os.Getenv("SSH_PUB_KEY")
page.MustElement("#form-input-apiVips-0-ip-field").MustInput(apiVip)
page.MustElement("#form-input-ingressVips-0-ip-field").MustInput(ingressVip)
page.MustElement("#form-input-sshPublicKey-field").MustInput(sshPublicKey)
page.MustElement(`button[name="next"]`).MustWaitEnabled()

err := saveFullPageScreenshot(page, path)
Expand Down