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

configd: T6608: report uncaught config script exceptions as commit error #3876

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/services/vyos-configd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import json
import typing
import logging
import signal
import traceback
import importlib.util
import io
from contextlib import redirect_stdout
Expand Down Expand Up @@ -136,9 +137,10 @@ def run_script(script_name, config, args) -> tuple[int, str]:
except ConfigError as e:
logger.error(e)
return R_ERROR_COMMIT, str(e)
except Exception as e:
logger.critical(e)
return R_ERROR_DAEMON, str(e)
except Exception:
tb = traceback.format_exc()
logger.error(tb)
return R_ERROR_COMMIT, tb

return R_SUCCESS, ''

Expand Down
Loading