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

Decouple alarms declaration #947

Merged
merged 3 commits into from
Sep 19, 2017
Merged

Conversation

dpino
Copy link
Member

@dpino dpino commented Sep 18, 2017

Fixes #925.

Alarms are declared throughout the codebase, usually within the module that uses the alarm. The alarm declaration defines its involved resources, alarm-type-id and alarm-qualifier for the alarm. In the case of the ARP and NDP alarms, the resource was named after a feature of the lwAFTR. The naming should be decoupled. In addition, the alarm_text message to help the operator to fix the issue also refer to the internals of the lwAFTR. This should be decoupled too.

To better refine alarms for the lwAFTR, this PR defines an apps.lwaftr.alarms module that uses the alarms API to overwrite an existing alarm. When declare_alarm finds an alarm has already been declared, it overwrites its values or adds new ones. This way we can reuse existing alarms and customize messages (or other attributes) for the lwAFTR.

@dpino dpino force-pushed the decouple-alarms-declaration branch from da4ee68 to 9321ef6 Compare September 19, 2017 08:50
@dpino dpino force-pushed the decouple-alarms-declaration branch from 9321ef6 to 6643388 Compare September 19, 2017 11:12
Copy link

@wingo wingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the nit that perhaps the apps.lwaftr.alarms module should move to program/lwaftr.

'address of the next-hop directly. To do it so, set '..
'external-interface.next-hop.mac to the value of the MAC address.',
},
alarm_text = 'Make sure you can ARP resolve IP addresses on NIC',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird indentation here

@@ -0,0 +1,25 @@
module(..., package.seeall)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps place in program/lwaftr ? I mean, it's more about the lwaftr network function as a whole and not the apps. Dunno tho.

@dpino dpino merged commit ff9e2d9 into Igalia:lwaftr Sep 19, 2017
@dpino dpino deleted the decouple-alarms-declaration branch September 19, 2017 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple alarms declaration
2 participants