...
- The first thing first, make all hypervisors use the same resource base for Virtual Router.
- Introduce a new interface to network elements, named "AggregatedCommandExecutor"
- If the network element is an "AggregatedCommandExecutor", "prepareAggregatedExecution(Network)" would be called when developer want all the following commands to be aggregated executed.
- The designed scenario is VR rebooting or re-create.
- After the aggregated period past, "completeAggregatedExecution(Network)" would be called, then network element would start to execute the all commands in it's queue
- The queue would be formed into one command in VR's case, then give to VirtualRoutingResource for execution.
- prepareAggregatedExecution and completeAggregatedExecution() must be called in pair.
- Another function abortAggregatedExecution(Network) should be called if completeAggregatedExecution() cannot be called(e.g. some commands failed to generated during the process), to clean up the queue and fail the task.
- Call prepareAggregatedExecution() alone would result in all the following commands failed to executed and blocked forever.
- Virtual Router implemenation:
- All the following executed commands would be put in a queue(per VR) in the mgmt server, waiting to be executed
- Currently we would still return true for each commands for backward compatibility
- But the result of "aggregated command" is the real result.
- The aggregated commands would form a new command
- VirtualRouting would execute the aggregated command in following sequence:
- Get all the preparation done.
- e.g. Plug in nics or find nic no, dependence on the hypervisors
- Generate a configuration file represent all the commands in the aggregated command
- Some commands are a little different, e.g. configure load balancer, which would require copy files to VR, which may need extra process since the file would be overrided in the VR by other configure load balancer command later.
- Send the configuration to VR to execute
- Get the clean up done.
- Mind the gap!
- Order is extremely important!
- Every commands called in original order should happen in the exactly same order in aggregated execution.
- We don't want to program firewall before ipassoc.
- No other command should be executed before VR complete the aggregated execution
- It can be guaranteed if the aggregated command has been executed earlier in VR, because it would hold the VR lock inside.
- Reboot of VR should clean the queue.
- If the failure happened in the execution process, it should provide enough debug information
- e.g. which command failed with what's parameter, and what's the error message.
- No other concurrent operation should happen to the same VR
- Currently only support two state of execution result: Success, or Fail.
- The result and debug info can be get, but partial success won't be supported.
Notes:
- If we want to do it for other elements in the future, we can introduce a new interface to network elements, named "AggregatedCommandExecutor"
- If the network element is an "AggregatedCommandExecutor", "prepareAggregatedExecution(Network)" would be called when developer want all the following commands to be aggregated executed.
- After the aggregated period past, "completeAggregatedExecution(Network)" would be called, then network element would start to execute the all commands in it's queue
- The queue would be formed into one command in VR's case, then give to VirtualRoutingResource for execution.
- prepareAggregatedExecution and completeAggregatedExecution() must be called in pair.
- Another function abortAggregatedExecution(Network) should be called if completeAggregatedExecution() cannot be called(e.g. some commands failed to generated during the process), to clean up the queue and fail the task.
- Call prepareAggregatedExecution() alone would result in all the following commands failed to executed and blocked forever.
- For the current VR, since it's not the network orchestrator program the rule, this interface can be left to the future.
Web Services APIs
No API
UI flow
...
{"serverDuration": 180, "requestCorrelationId": "7678e4de390a6aa8"}