-
Notifications
You must be signed in to change notification settings - Fork 3
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
Save/restore vlan reservations #244
Conversation
Running pyright/mypy, and handling some quick warnings
Pull Request Test Coverage Report for Build 12038444933Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For its said purpose, it looks nice. But-:) we may need to have
(1) the instructions for sdx-controller to use the two methods? why the sdx-controller needs to restore the vlan table during startup? who creates the table and calls the setter?
(2) the second scenario: sdx-controller works for some time with some connection provisioned (ie, some vlans allocated from some or all domains), then it crashes and needs a restart: right now, I think the logic is to read the topologies from DB, the existing bandwidth and vlan allocation information are lost?
@YufengXin Good catches. Thank you!
SDX Controller will have to maintain the table, because state management is better left to the application. As long as PCE is a library, it should not be maintaining any state between process restarts. Currently SDX Controller already restores some PCE state (topologies), and it should do the rest of it too.
True, we need to restore that also. Thank you for the reminder! Perhaps that could be implemented with a separate issue and PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
A PR in SDX-controller for the corresponding state persistence.
-
Another PR for persistent state after crash recovery
Perhaps we could add a new temanager.restore_state(
topologies = [topology1, topology2, topology3],
vlan_table = vlan_table,
bandwidth_allocation = bandwidth_allocation,
latency_allocation = latency_allocation
) This could be even simpler if we have a corresponding # At various SDX Controller checkpoints:
state = temanager.get_state()
db.upsert("temanager-state", state) # During SDX Controller startup:
state = db.read("temanager-state")
temanager.restore_state(state) Basically SDX Controller would have to call Just thinking aloud. Perhaps there is a better way to do this. |
Resolves #215. The API is really simple, and is implemented using
@property
:We do some checks in the setter, such as: the input data is in the expected shape, and that we have no existing allocations. The assumption is that SDX Controller would attempt to restore VLAN allocation state only during startup.