Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include GPU check validation #20840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yarunachalam
Copy link
Contributor

Include GPU check validation for NVIDIA test flavor

Copy link
Contributor

@m-dati m-dati left a comment

Choose a reason for hiding this comment

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

Please also consider an update as by suggestions in the previous PR #20723 (comment), related to Lines here starting from L261 up to L278

Copy link
Contributor Author

@yarunachalam yarunachalam left a comment

Choose a reason for hiding this comment

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

Resolved

Copy link
Contributor

@m-dati m-dati left a comment

Choose a reason for hiding this comment

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

Please, consider the proposed changes here below indicated.

tests/publiccloud/create_aistack_env.pm Outdated Show resolved Hide resolved
tests/publiccloud/create_aistack_env.pm Outdated Show resolved Hide resolved
tests/publiccloud/create_aistack_env.pm Outdated Show resolved Hide resolved
Comment on lines 269 to 275
assert_script_run("curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name");
my $curl_cmd = "curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name";
my $curl_result = script_output($curl_cmd);
record_info("http code: $curl_result \n");
if ($curl_result == 200) {
record_info("Successfully connected to the open-webui service at $curl_cmd \n");
} else {
# connect open-webui service
assert_script_run("curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name");
my $curl_cmd = "curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name";
my $curl_result = script_output($curl_cmd);
record_info("http code: $curl_result \n");
if ($curl_result == 200) {
record_info("Successfully connected to the open-webui service at $curl_cmd \n");
} else {
die "Received unexpected HTTP error code $curl_result for $curl_cmd\n";
}
die "Received unexpected HTTP error code $curl_result for $curl_cmd\n";
Copy link
Contributor

@m-dati m-dati Jan 8, 2025

Choose a reason for hiding this comment

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

Still here you repeat twice the same curl commands in a long snippet, and even added a more unclear new else-block, that all could be simplified using the validate command, as also mentioned in note #20840 (review).

Please, re-check my suggestions in
#20723 (comment) and apply here those, replacing all lines here from L269 to L277, with the suggested changes, using validate... command in place of the full if, also here re-proposed:

Suggested change
assert_script_run("curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name");
my $curl_cmd = "curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name";
my $curl_result = script_output($curl_cmd);
record_info("http code: $curl_result \n");
if ($curl_result == 200) {
record_info("Successfully connected to the open-webui service at $curl_cmd \n");
} else {
# connect open-webui service
assert_script_run("curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name");
my $curl_cmd = "curl --output /dev/null --silent --head --write-out \"%{http_code}\n\" -k -L https://$host_name";
my $curl_result = script_output($curl_cmd);
record_info("http code: $curl_result \n");
if ($curl_result == 200) {
record_info("Successfully connected to the open-webui service at $curl_cmd \n");
} else {
die "Received unexpected HTTP error code $curl_result for $curl_cmd\n";
}
die "Received unexpected HTTP error code $curl_result for $curl_cmd\n";
record_info("http check”, $host_name);
my $curl_cmd = "curl --output /dev/null --silent --head --write-out '%{http_code}\n' -k -L https://$host_name";
validate_script_output("$curl_cmd", qr/200/, fail_message => "Received unexpected HTTP error code from $host_name");

Moreover, consider that in curl you will no more need double-quotes and escaping slash \"...\" if you use single quotes '...'; try it on your console, with some test url.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@m-dati
Copy link
Contributor

m-dati commented Jan 8, 2025

After a new git-branch is pushed and updated in PR, please also post a new VR test run link in PR (possibly at every relevant update), to see the new code correctly working.

Copy link
Contributor Author

@yarunachalam yarunachalam left a comment

Choose a reason for hiding this comment

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

Resolved. Will update VR soon

@yarunachalam yarunachalam force-pushed the gpucheck branch 10 times, most recently from d924fcf to bc54dc2 Compare January 14, 2025 23:09
@yarunachalam yarunachalam force-pushed the gpucheck branch 2 times, most recently from 3e5c8c8 to 5d42e59 Compare January 15, 2025 00:15
Do not exist for log issues only pod failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants