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

Please document how to configure multiple dc test and the config option syntax #9278

Closed
asias opened this issue Nov 19, 2024 · 8 comments · Fixed by #9280
Closed

Please document how to configure multiple dc test and the config option syntax #9278

asias opened this issue Nov 19, 2024 · 8 comments · Fixed by #9280
Assignees

Comments

@asias
Copy link
Contributor

asias commented Nov 19, 2024

For example:

availability_zone: 'a,b,c'
n_db_nodes: '6 6'
n_loaders: '2 1'

Why is the availability_zone separated by "," while the others are separated by space.

How do we specify multiple dc region or ami ids?

region_name: 'eu-west-1 us-east-1'
ami_id_db_scylla: 'ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9'

On the jenkins web, e.g., https://jenkins.scylladb.com/job/scylla-master/job/tier1/job/longevity-multidc-schema-topology-changes-12h-test/46/parameters/, it also has the region configs, but the syntax is different. And It fails to start the test if I set scylla_ami_id. I have to left scylla_ami_id to be empty and I have to set region with a different syntax (it can not be empty)

region: ["eu-west-1", "us-east-1"]
scylla_ami_id: must be empty

@asias asias assigned fruch and unassigned asias Nov 19, 2024
@asias
Copy link
Contributor Author

asias commented Nov 19, 2024

Update: Setting scylla_ami_id to be empty will not work either. It failed

09:03:35  + [[ aws == *\k\8\s* ]]
09:03:35  + echo 'need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO'
09:03:35  need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO

@asias
Copy link
Contributor Author

asias commented Nov 19, 2024

I tested the config in the web like below:
region: ["eu-west-1", "us-east-1"]
scylla_ami_id: ["ami-095382b4272f46bd6", "ami-09a5ff7a28934eab"]

It failed with:

07:21:45    File "/home/ubuntu/scylla-cluster-tests/sdcm/sct_config.py", line 2514, in verify_configuration_urls_validity
07:21:45      if not ami_built_by_scylla(ami_id, region_name):
07:21:45    File "/home/ubuntu/scylla-cluster-tests/sdcm/utils/common.py", line 1568, in ami_built_by_scylla
07:21:45      all_tags = get_ami_tags(ami_id, region_name)
07:21:45    File "/home/ubuntu/scylla-cluster-tests/sdcm/utils/common.py", line 1586, in get_ami_tags
07:21:45      new_test_image.reload()
07:21:45    File "/usr/local/lib/python3.10/site-packages/boto3/resources/factory.py", line 564, in do_action
07:21:45      response = action(self, *args, **kwargs)
07:21:45    File "/usr/local/lib/python3.10/site-packages/boto3/resources/action.py", line 88, in __call__
07:21:45      response = getattr(parent.meta.client, operation_name)(*args, **params)
07:21:45    File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 534, in _api_call
07:21:45      return self._make_api_call(operation_name, kwargs)
07:21:45    File "/usr/local/lib/python3.10/site-packages/botocore/client.py", line 976, in _make_api_call
07:21:45      raise error_class(parsed_response, operation_name)
07:21:45  botocore.exceptions.ClientError: An error occurred (InvalidAMIID.Malformed) when calling the DescribeImages operation: Invalid id: "[ami-095382b4272f46bd6," (expecting "ami-...")

@asias
Copy link
Contributor Author

asias commented Nov 19, 2024

I tried:

web:
region: ["eu-west-1", "us-east-1"]
scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9
yaml:
region_name: 'eu-west-1 us-east-1'
ami_id_db_scylla: 'ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9'
n_db_nodes: '2 2'

Failed too:

09:20:51  + export SCT_CLUSTER_BACKEND=aws

09:20:51  + SCT_CLUSTER_BACKEND=aws

09:20:51  + [[ -n [eu-west-1,us-east-1] ]]

09:20:51  + export 'SCT_REGION_NAME=[eu-west-1,us-east-1]'

09:20:51  + SCT_REGION_NAME='[eu-west-1,us-east-1]'

09:20:51  + export 'SCT_CONFIG_FILES=["test-cases/performance/perf-regression-latency-650gb-with-nemesis.yaml", "configurations/disable_kms.yaml"]'

09:20:51  + SCT_CONFIG_FILES='["test-cases/performance/perf-regression-latency-650gb-with-nemesis.yaml", "configurations/disable_kms.yaml"]'

09:20:51  + export SCT_AVAILABILITY_ZONE=a

09:20:51  + SCT_AVAILABILITY_ZONE=a

09:20:51  + [[ -n '' ]]

09:20:51  + export [email protected]

09:20:51  + [email protected]

09:20:51  + [[ false == \t\r\u\e ]]

09:20:51  + [[ ! -z '' ]]

09:20:51  + [[ ! -z ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9 ]]

09:20:51  + export SCT_AMI_ID_DB_SCYLLA=ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

09:20:51  + SCT_AMI_ID_DB_SCYLLA=ami-09952611d7ecc2ebd

09:20:51  /tmp/jenkins/workspace/scylla-staging/Asias/auto-repair/scylla-cluster-tests@tmp/durable-4b505462/script.sh.copy: line 33: export: `ami-0ed83900fba44c6a9': not a valid identifier

I am out of idea what is the correct way to set multiple amis.

@fruch
Copy link
Contributor

fruch commented Nov 19, 2024

it's a bug in the perf pipeline, that dates to 2019, when it was introduced

                                                         if [[ ! -z "${params.byo_scylla_branch}" ]] ; then
                                                            echo "Skipping 'scylla_ami_id', 'scylla_version' and 'scylla_repo' checks because BYO ScyllaDB was enabled"
                                                        elif [[ ! -z "${params.scylla_ami_id}" ]] ; then
                                                            export SCT_AMI_ID_DB_SCYLLA=${params.scylla_ami_id}
                                                        elif [[ ! -z "${supportedVersions}" ]]; then
                                                            export SCT_SCYLLA_VERSION=${supportedVersions}
                                                        elif [[ ! -z "${params.scylla_version}" ]] ; then
                                                            export SCT_SCYLLA_VERSION=${params.scylla_version}
                                                        elif [[ ! -z "${params.scylla_repo}" ]] ; then
                                                            export SCT_SCYLLA_REPO=${params.scylla_repo}
                                                        elif [[ "${params.backend ? params.backend : ''}" == *"k8s"* ]] ; then
                                                            echo "Kubernetes backend can have empty scylla version. It will be taken from defaults of the scylla helm chart"
                                                        else
                                                            echo "need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO"
                                                            exit 1
                                                        fi

the values of the exports should be escaped with ", as in the other pipelines

fruch pushed a commit to fruch/scylla-cluster-tests that referenced this issue Nov 19, 2024
this pipeline was never used for multidc cases, and was missing
multiple feature that exists on longevity pipeline, like handling correctly
the regions, and quoting correctly possible space seperated
pipeline parameters

Fixes: scylladb#9278
@fruch
Copy link
Contributor

fruch commented Nov 19, 2024

@asias
care to try this PR ?
#9280

and the expect way should be configure:

from jenkins:
region: ["eu-west-1", "us-east-1"]
scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

the failure:

echo "need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO"

we introduce long ago, to make sure we fail fast on if one didn't supply those, which is the main usage case of SCT jobs.
i.e. someone is trigger and stating which exact version or AMI it's gonna test, and not something we hardcore in any test.

anyhow we dropped this check from longevity pipeline, and can consider dropping it from all pipelines

asias pushed a commit to asias/scylla-cluster-tests that referenced this issue Nov 19, 2024
this pipeline was never used for multidc cases, and was missing
multiple feature that exists on longevity pipeline, like handling correctly
the regions, and quoting correctly possible space seperated
pipeline parameters

Fixes: scylladb#9278
(cherry picked from commit 30305d8)
@asias
Copy link
Contributor Author

asias commented Nov 19, 2024

@asias care to try this PR ? #9280

and the expect way should be configure:

from jenkins: region: ["eu-west-1", "us-east-1"] scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

Id' be more than happy to try it.

jenkins, should I use

scylla_ami_id: 'ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9'

or

scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

the failure:

echo "need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO"

we introduce long ago, to make sure we fail fast on if one didn't supply those, which is the main usage case of SCT jobs. i.e. someone is trigger and stating which exact version or AMI it's gonna test, and not something we hardcore in any test.

anyhow we dropped this check from longevity pipeline, and can consider dropping it from all pipelines

@fruch
Copy link
Contributor

fruch commented Nov 19, 2024

@asias care to try this PR ? #9280
and the expect way should be configure:
from jenkins: region: ["eu-west-1", "us-east-1"] scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

Id' be more than happy to try it.

jenkins, should I use

scylla_ami_id: 'ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9'

or

scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

the 2nd, you shouldn't need to quote it

the failure:

echo "need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO"

we introduce long ago, to make sure we fail fast on if one didn't supply those, which is the main usage case of SCT jobs. i.e. someone is trigger and stating which exact version or AMI it's gonna test, and not something we hardcore in any test.
anyhow we dropped this check from longevity pipeline, and can consider dropping it from all pipelines

@asias
Copy link
Contributor Author

asias commented Nov 19, 2024

@asias care to try this PR ? #9280
and the expect way should be configure:
from jenkins: region: ["eu-west-1", "us-east-1"] scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

Id' be more than happy to try it.
jenkins, should I use
scylla_ami_id: 'ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9'
or
scylla_ami_id: ami-09952611d7ecc2ebd ami-0ed83900fba44c6a9

the 2nd, you shouldn't need to quote it

OK. So far so good. It seems the PR has fixed the issue. It has passed the point where it failed previously.

Btw, can we make jekins take the same format of space separated parameter for region.

the failure:

echo "need to choose one of SCT_AMI_ID_DB_SCYLLA | SCT_SCYLLA_VERSION | SCT_SCYLLA_REPO"

we introduce long ago, to make sure we fail fast on if one didn't supply those, which is the main usage case of SCT jobs. i.e. someone is trigger and stating which exact version or AMI it's gonna test, and not something we hardcore in any test.
anyhow we dropped this check from longevity pipeline, and can consider dropping it from all pipelines

fruch pushed a commit that referenced this issue Nov 20, 2024
this pipeline was never used for multidc cases, and was missing
multiple feature that exists on longevity pipeline, like handling correctly
the regions, and quoting correctly possible space seperated
pipeline parameters

Fixes: #9278
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 a pull request may close this issue.

2 participants