scylladb / scylla-machine-image

Apache License 2.0
19 stars 26 forks source link

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

Closed syuu1228 closed 4 months ago

syuu1228 commented 6 months ago

On https://github.com/scylladb/scylla-machine-image/issues/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 https://github.com/scylladb/scylla-machine-image/issues/505

yaronkaikov commented 6 months ago

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

yaronkaikov commented 6 months ago

Also please paste your verification

yaronkaikov commented 5 months ago

@syuu1228 ping

yaronkaikov commented 5 months ago

@syuu1228 please rebase and run verification

syuu1228 commented 4 months ago

Rebased, running next-machine-image at: https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/328/

yaronkaikov commented 4 months ago

@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 commented 4 months ago

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 commented 4 months ago

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