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

Clean-resources did not report correctly to Argus #9543

Open
pehala opened this issue Dec 12, 2024 · 2 comments · May be fixed by scylladb/argus#540
Open

Clean-resources did not report correctly to Argus #9543

pehala opened this issue Dec 12, 2024 · 2 comments · May be fixed by scylladb/argus#540
Assignees
Labels
Bug Something isn't working right GCE Infrastructure

Comments

@pehala
Copy link
Contributor

pehala commented Dec 12, 2024

I tried clean-resources jenkins job (https://jenkins.scylladb.com/view/QA/job/QA-tools/job/hydra-clean-test-resources/76/) to clean up resources from https://argus.scylladb.com/tests/scylla-cluster-tests/dbb7a2e1-b4b3-4062-a97e-f3e8ffe7196d. But it failed with API Error.

I am not able to reproduce locally, because I am not sure how I can clean resources created by QA user.

09:58:24  Capacity reservation is not enabled. Skipping reservation.
09:58:25  Going to get all instances from GCE
09:58:26  Done. Found total of 1 instances.
09:58:26  Going to delete: sct-runner-1-8-instance-dbb7a2e1 (gcp-sct-project-1 project)
09:58:28  Failure to communicate resource deletion to Argus
09:58:28  Traceback (most recent call last):
09:58:28    File "/tmp/jenkins/workspace/QA-tools/hydra-clean-test-resources/scylla-cluster-tests/sdcm/utils/argus.py", line 50, in terminate_resource_in_argus
09:58:28      client.terminate_resource(name=resource_name, reason="clean-resources: Graceful Termination")
09:58:28    File "/tmp/jenkins/workspace/QA-tools/hydra-clean-test-resources/scylla-cluster-tests/argus/client/sct/client.py", line 194, in terminate_resource
09:58:28      self.check_response(response)
09:58:28    File "/tmp/jenkins/workspace/QA-tools/hydra-clean-test-resources/scylla-cluster-tests/argus/client/base.py", line 68, in check_response
09:58:28      raise ArgusClientError(
09:58:28  argus.client.base.ArgusClientError: ('API Error encountered using endpoint: POST /api/v1/client/sct/dbb7a2e1-b4b3-4062-a97e-f3e8ffe7196d/resource/sct-runner-1-8-instance-dbb7a2e1/terminate', 'Resource not found')
09:58:28  sct-runner-1-8-instance-dbb7a2e1 deleted=<google.cloud.compute_v1.services.instances.client.InstancesClient.delete.<locals>._CustomOperation object at 0x7f8afe0c8850>
09:58:28  Cleanup for the {'TestId': 'dbb7a2e1-b4b3-4062-a97e-f3e8ffe7196d'} resources has been finished

@pehala pehala added Bug Something isn't working right GCE Infrastructure labels Dec 12, 2024
@pehala pehala removed their assignment Dec 12, 2024
@pehala pehala changed the title Clean-resources does not work with GCE Clean-resources did not report correctly to Argus Dec 12, 2024
@fruch
Copy link
Contributor

fruch commented Dec 12, 2024

@k0machi

can you cross check with Argus why this is failing to report back about the resources ?

@k0machi
Copy link
Contributor

k0machi commented Dec 16, 2024

We are currently not adding the sct-runner to the resource table, which is what causes this issue. I'll do a PR in argus to add SCT runner to the table so that it can be correctly marked as terminated by clean-resources

k0machi added a commit to k0machi/argus that referenced this issue Dec 16, 2024
This commit adds logic to add SCT runner to the resource table and also
adds client support for its name. Additionally, it adds a workaround for
older client versions, where SCT runner will be submitted without a
name.

Fixes scylladb/scylla-cluster-tests#9543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working right GCE Infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants