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

exit with 1 when Exception catched and raise exception when HTTP error code is client error #511

Merged
merged 2 commits into from
May 29, 2024

Conversation

syuu1228
Copy link
Contributor

On #498, status of scylla-image-post-start.service is NOT "failed" even
the script causing error, because scylla_post_start.py catches all
exceptions and just logging it, so the script finishes without error.

To getting notify users the script failed operation during running, we
should sys.exit(1) when the exception catched.

Also, when curl catched HTTP error 4xx = client error such as "404 Not Found"
or "403 Forbidden", it likely our script bug not server side issue, we
should re-raise exception immediately instead of retrying.

fixes #505

@yaronkaikov yaronkaikov changed the base branch from master to next March 18, 2024 13:30
@yaronkaikov
Copy link
Collaborator

@syuu1228 I have changed to base branch to next please rebase

@yaronkaikov
Copy link
Collaborator

Also please paste your verification

@yaronkaikov
Copy link
Collaborator

@syuu1228 ping

@yaronkaikov
Copy link
Collaborator

@syuu1228 please rebase and run verification

On scylladb#498, status of scylla-image-post-start.service is NOT "failed" even
the script causing error, because scylla_post_start.py catches all
exceptions and just logging it, so the script finishes without error.

To getting notify users the script failed operation during running, we
should sys.exit(1) when the exception catched.

fixes scylladb#505
When curl catched HTTP error 4xx = client error such as "404 Not Found"
or "403 Forbidden", it likely our script bug not server side issue, we
should re-raise exception immediately instead of retrying.

related scylladb#505
@syuu1228 syuu1228 force-pushed the exit_1_when_http_error_occurs branch from 003f509 to 2522ec8 Compare May 22, 2024 18:45
@syuu1228
Copy link
Contributor Author

@yaronkaikov
Copy link
Collaborator

@syuu1228 Running full verification failed twice, https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/330/ , please make sure it's not related to your changes

@syuu1228
Copy link
Contributor Author

I found that full verification actually can pass with May 27, 2024 version of scylla-master/next build (It was the latest build on scylla-master/next when I tested).

Test result: https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/339/

I guess the error is not related this patch.

@yaronkaikov
Copy link
Collaborator

I found that full verification actually can pass with May 27, 2024 version of scylla-master/next build (It was the latest build on scylla-master/next when I tested).

Test result: https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/339/

I guess the error is not related this patch.

https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/340/ passed

@yaronkaikov yaronkaikov merged commit 0e23d55 into scylladb:next May 29, 2024
1 check passed
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.

scylla_post_start.py and scylla_configure.py should not exit with 0 when HTTP Error occurs
2 participants