-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
If a modifier fails, the processing will just continue without those modifications:
zabbix-auto-config/zabbix_auto_config/processing.py
Lines 302 to 311 in 2b45f1c
| try: | |
| modified_host = host_modifier["module"].modify(host.copy(deep=True)) | |
| assert isinstance(modified_host, models.Host) | |
| assert hostname == modified_host.hostname, f"Modifier changed the hostname, '{hostname}' -> '{modified_host.hostname}'" | |
| host = modified_host | |
| except AssertionError as e: | |
| logging.warning("Host, '%s', was modified to be invalid by modifier: '%s'. Error: %s", hostname, host_modifier["name"], str(e)) | |
| except Exception as e: | |
| logging.warning("Error when running modifier %s on host '%s': %s", host_modifier["name"], hostname, str(e)) | |
| # TODO: Do more? |
This could lead to a weird state/unknown problems (very dependent on the modifier, obviously).
I think that the current host, that is being modified, should be discarded from the current update run (kind of like a failing collector), since we do not know what happened/what it really should look like. This would mean: Keep the host as is in the database.
This issue is also mentioned in #57
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels