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

[change] Notify users of background subnet division rule errors #837

Open
nemesifier opened this issue Feb 19, 2024 · 0 comments · May be fixed by #865
Open

[change] Notify users of background subnet division rule errors #837

nemesifier opened this issue Feb 19, 2024 · 0 comments · May be fixed by #865

Comments

@nemesifier
Copy link
Member

Some errors happen in the background and get logged as errors but are not notified to users.

Eg: Cannot create more subnets of <name> <subnet>.

We need to notify users about this and probably we can also stop logging with error level.

I am also not sure if we should do the same for:

@shared_task
def provision_subnet_ip_for_existing_devices(rule_id):
try:
rule = SubnetDivisionRule.objects.get(id=rule_id)
except SubnetDivisionRule.DoesNotExist as error:
logger.warning(
'Failed to provision IPs on existing devices for Subnet '
f'Division Rule with id: "{rule_id}", reason: {error}'
)
return
else:
rule.rule_class.provision_for_existing_objects(rule)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants