-
Notifications
You must be signed in to change notification settings - Fork 280
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
SDAF calculate subnets #20203
SDAF calculate subnets #20203
Conversation
89e6909
to
e33402b
Compare
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
=back | ||
|
||
Replaces placeholder pattern B<%OPENQA_VARIABLE%> with corresponding OpenQA variable value. | ||
If OpenQA variable is not set, placeholder is replaced with empty value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is different in comparision to what HanaSR is doing
9509e6d
to
dbd2d83
Compare
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
my ($tfvars_file) = @_; | ||
croak 'Variable "$tfvars_file" undefined' unless defined($tfvars_file); | ||
my @variables = split("\n", script_output("grep -oP \'(\?<=%)[A-Z_]+(?=%)\' $tfvars_file")); | ||
my %to_replace = map { '%' . $_ . '%' => get_var($_, '') } @variables; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK that this can end up replacing some of the placeholders for empty strings if the settings are not defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a new ticket to review whole tfvars mechanism: TEAM-9786
This was a function to provide a good enough solution for development purposes. There will be a need for something more flexible than template and placeholders.
83d92d2
to
e75f876
Compare
VRs with latest changes, both running in parallel: |
c1fe600
to
d633344
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lib/sles4sap/azure_cli.pm
Outdated
); | ||
|
||
my $lease_id = script_output($az_cmd, proceed_on_failure => 1); | ||
return ($lease_id) if qesap_az_validate_uuid_pattern($lease_id); # Return only valid output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to add one more sentence about the fact that process can fails and in this case ...
|
||
=back | ||
|
||
Acquire network lease for a blob. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please describe the return value, seems that it could be nothing or a single element list (why an array is needed if it only has one element?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Acquire network lease for a blob. Returns blob lease UUID which is later required for getting permission to modify
blob file.
lib/sles4sap/sap_deployment_automation_framework/configure_tfvars.pm
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e617dda
to
79fca1c
Compare
79fca1c
to
55dc9bd
Compare
55dc9bd
to
995c27e
Compare
Executing new VRs with suggestions applied
Test B:
|
Current SDAF test use static network space settings which prevents running
multiple concurrent tests. This PR adds functionality to create and assign
unique addess space for each test using 'lease' file and a set of rules inside Azure container
named 'network-spaces'.
3 parallel tests:
Start condition:
2 lease files older than 7200s:
192.168.39.192
192.168.42.128
Test 1:
Found both lease files available
https://openqaworker15.qa.suse.cz/tests/298290#step/deploy_workload_zone/75
Picked 192.168.39.192
https://openqaworker15.qa.suse.cz/tests/298290#step/deploy_workload_zone/95
Test 2:
https://openqaworker15.qa.suse.cz/tests/298288#step/deploy_workload_zone/75
192.168.42.128 - is taken as 192.168.39.192 is already used by Test 1
https://openqaworker15.qa.suse.cz/tests/298288#step/deploy_workload_zone/95
Test 3.
No file older than 7200s available - new file created
https://openqaworker15.qa.suse.cz/tests/298292#step/deploy_workload_zone/76