scylla-machine-image icon indicating copy to clipboard operation
scylla-machine-image copied to clipboard

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

Open syuu1228 opened this issue 11 months ago • 6 comments

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

syuu1228 avatar Mar 18 '24 12:03 syuu1228

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

yaronkaikov avatar Mar 18 '24 13:03 yaronkaikov

Also please paste your verification

yaronkaikov avatar Mar 18 '24 13:03 yaronkaikov

@syuu1228 ping

yaronkaikov avatar Apr 17 '24 20:04 yaronkaikov

@syuu1228 please rebase and run verification

yaronkaikov avatar May 02 '24 18:05 yaronkaikov

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

syuu1228 avatar May 22 '24 18:05 syuu1228

@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

yaronkaikov avatar May 23 '24 05:05 yaronkaikov

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.

syuu1228 avatar May 28 '24 13:05 syuu1228

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 avatar May 29 '24 05:05 yaronkaikov