-
Notifications
You must be signed in to change notification settings - Fork 201
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
bz1505037: Introduce DEBUG_IGNORE_SCRIPT_FAILURES option to rescue from failure of the setup script #199
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Thanks @nak3 for reporting. Do you know about some specific case when some command in the script returns non-zero exit code? I'd rather try fix that case, than ignore the failure by setting |
Hi @hhorak I'm sorry, I should have informed the bug ticket. Below is the exact ticket. We have not found the reason why mysql returned Bug 1505037 - mysql pod is not debug friendly when passwd-change.sh failed $ oc logs mysql-1-x95v8 -c mysql
|
Another option I came up with that: in 5.x/root/usr/bin/run-mysqld
|
I understand better now, although I don't think that just turning on the debug mode should change behaviour of the image. That could lead to a situation where the image fails when the debug mode is disabled, but would work fine when debug mode is enabled, which wouldn't help debugging much. PR #202 tries to help debugging by simply putting more information, so users should see what failed when debugging mode is enabled (different env. var is used, since |
@hhorak Thank you. But unfortunately it does not address my needs. Although verbose message would be helpful, mysql pod will still not able to be RUNNING. We probably must run For example, if the deubg log informed of some grant was wrong, how we fix it? mysql pod is still not running, so we cannot access to the database/table. |
Ah, I understand better now. So, it's not only about see where the issue happened, but also how to get it into working state by some troubleshooting techniques, which, in terms of container means to change some starting scripts. For that, I believe, the new concept of making the image extensible could be helpful. For example, when you see some issue in However, even your solution to not set the |
Yes, as I have reported on the bugzilla, we have already reached the solution of re-building the image. From https://bugzilla.redhat.com/show_bug.cgi?id=1505037
However, there are so many restrictions that come up.
... etc
OK, |
Updated this PR to introduc DEBUG_IGNORE_SCRIPT_FAILURES option to rescue from failure of the setup script. cc// @hhorak |
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
[test] |
ping @hhorak |
Sorry for delay.. I think it's all right, let's merge it. |
Since run-mysqld sets
set -eu
, if commands returned non 0 resultinside passwd-change.sh, mysql container does not start. Due to this,
if mysql command starts failing inside passwd-change.sh, mysql does
not run and we cannot debug it.
This patch introduces
set +e
inside the script and ignore theuser/password creation error, so users can debug mysql after it starts
running.