-
Notifications
You must be signed in to change notification settings - Fork 29
[Feature] Adding support for port delete, also include L2/L3 neighbor delete #166
Conversation
|
||
case OperationType::UPDATE: | ||
// only delete scenario is supported now | ||
// VM was created with port specified, then delete the VM |
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.
We could discuss this option: In the VM update scenario, when PM receives the update request and determine it is a delete for the host, PM could issue a DEL. This could simplify ACA implementation. What do you think of?
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.
That's a good idea, keep in mind PM needs to determine that anyway because it needs to send down a neighbor table for the corresponding neighbor delete (same logic as port create and send down neighbor table).
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.
agreed. Let us use the same issue to track the PM change then.
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.
port delete scenario tracking issue has been updated: futurewei-cloud/alcor#103
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.
Some more comments. Look pretty good in general as we know it has been tested 👍
"add-flow br-tun \"table=4, priority=1,tun_id=" + to_string(tunnel_id) + | ||
" actions=mod_vlan_vid:" + to_string(internal_vlan_id) + ",output:\"patch-int\"\"", | ||
culminative_time, overall_rc); | ||
ACA_Vlan_Manager::get_instance().create_ovs_port(vpc_id, port_name, tunnel_id, culminative_time); | ||
|
||
if (g_demo_mode) { | ||
string cmd_string = "add-port br-int " + port_name + |
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.
My comment is to Line 194 where we start to execute the ovsdb command and system command.
This is one of the place we can start abstracting more dp related logics, for example, we have a one dp interface class with a run method, and many worker classes inheriting from this interface class with the real programming logics.
One step further, we could have one more layer of abstraction "on top of" the interface class to represent more general dp programming.
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.
yes, all the logic of parsing port configuration is already done at this point, and ready to do the dp programming. Another abstraction layer we can do is at line 191 ACA_Vlan_Manager::get_instance().create_ovs_port. If the other dp behavior is similar to ovs, we can simply call into another dataplane specific code here.
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.
sounds good. Let us plan for that and create a tracking item.
This PR added the ability to delete a port configuration on host. The change added:
Also fixes:futurewei-cloud/alcor#103