Skip to content

Commit

Permalink
Merge branch 'release-1.125.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
niksv committed Oct 20, 2022
2 parents 369819b + 84d1288 commit b54ef1c
Show file tree
Hide file tree
Showing 86 changed files with 2,486 additions and 235 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v1.125.0 (19/10/2022)

### Features:
- [#4958](https://github.com/telstra/open-kilda/pull/4958) Added LACP replies for LAG ports [**floodlight**][**northbound**][**storm-topologies**]
- [#4959](https://github.com/telstra/open-kilda/pull/4959) Added functional tests for LACP feature (Issues: [#2882](https://github.com/telstra/open-kilda/issues/2882) [#3439](https://github.com/telstra/open-kilda/issues/3439)) [**tests**]

For the complete list of changes, check out [the commit log](https://github.com/telstra/open-kilda/compare/v1.124.0...v1.125.0).

### Affected Components:
nb, swmanager, fl

### Upgrade notes:
OrientDB schema have been changed in this release. You need to apply schema migration. Please follow [migration instructions](https://github.com/telstra/open-kilda/tree/develop/docker/db-migration/migrations).

---

## v1.124.0 (07/09/2022)

### Features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ org.openkilda.floodlight.pathverification.PathVerificationService.hmac256-secret
org.openkilda.floodlight.pathverification.PathVerificationService.verification-bcast-packet-dst={{ getv "/kilda_floodlight_broadcast_mac_address" }}
org.openkilda.floodlight.KildaCore.flow-ping-magic-src-mac-address={{ getv "/kilda_floodlight_flow_ping_magic_src_mac_address" }}
org.openkilda.floodlight.KildaCore.server42-flow-rtt-udp-port-offset={{ getv "/kilda_floodlight_server42_flow_rtt_udp_port_offset" }}
org.openkilda.floodlight.KildaCore.server42-isl-rtt-udp-port-offset={{ getv "/kilda_floodlight_server42_isl_rtt_udp_port_offset" }}
org.openkilda.floodlight.KildaCore.server42-isl-rtt-magic-mac-address={{ getv "/kilda_floodlight_server42_isl_rtt_magic_mac_address" }}
org.openkilda.floodlight.KildaCore.lacp-system-id={{ getv "/kilda_floodlight_lacp_system_id" }}
org.openkilda.floodlight.KildaCore.lacp-system-priority={{ getv "/kilda_floodlight_lacp_system_priority" }}
org.openkilda.floodlight.KildaCore.lacp-port-priority={{ getv "/kilda_floodlight_lacp_port_priority" }}
org.openkilda.floodlight.switchmanager.SwitchManager.environment-naming-prefix={{ getv "/kilda_environment_naming_prefix" }}
org.openkilda.floodlight.switchmanager.SwitchManager.connect-mode=AUTO
org.openkilda.floodlight.switchmanager.SwitchManager.broadcast-rate-limit=200
Expand Down
3 changes: 3 additions & 0 deletions confd/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ kilda_floodlight_flow_ping_magic_src_mac_address: "00:26:E1:FF:FF:FE"
kilda_floodlight_server42_flow_rtt_udp_port_offset: 5000
kilda_floodlight_server42_isl_rtt_udp_port_offset: 10000
kilda_floodlight_server42_isl_rtt_magic_mac_address: "00:26:E1:FF:FF:FD"
kilda_floodlight_lacp_system_id: "00:00:00:00:00:01"
kilda_floodlight_lacp_system_priority: 1
kilda_floodlight_lacp_port_priority: 1

kilda_floodlight_ovs_meters_enabled: true

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
databaseChangeLog:
- changeSet:
id: tag
author: snikitin
changes:
- tagDatabase:
tag: 023-add-lacp-reply-into-lag-class

- changeSet:
id: add_lacp_reply_into_lag_class
author: snikitin
changes:
- sql: "CREATE PROPERTY lag_logical_port.lacp_reply IF NOT EXISTS BOOLEAN"
- sql: "UPDATE lag_logical_port SET lacp_reply = true"
- sql: "CREATE INDEX lag_logical_port.lacp_reply NOTUNIQUE_HASH_INDEX"
- sql: "DROP INDEX lag_logical_port_unique"
- sql: "CREATE INDEX lag_logical_port_unique on lag_logical_port (switch_id, logical_port_number, lacp_reply) UNIQUE_HASH_INDEX"
rollback:
- sql: "DROP INDEX lag_logical_port.lacp_reply"
- sql: "DROP INDEX lag_logical_port_unique"
- sql: "CREATE INDEX lag_logical_port_unique on lag_logical_port (switch_id, logical_port_number) UNIQUE_HASH_INDEX"
- sql: "DROP PROPERTY lag_logical_port.lacp_reply IF EXISTS"
3 changes: 3 additions & 0 deletions docker/db-migration/migrations/root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ databaseChangeLog:
- include:
relativeToChangelogFile: true
file: 022-add-port-class.yaml
- include:
relativeToChangelogFile: true
file: 023-add-lacp-reply-into-lag-class.yaml
Binary file modified docs/design/hub-and-spoke/lag/create/create-lag-port-fsm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ CREATE_LAG_IN_DB --> GRPC_COMMAND_SEND : next
CREATE_LAG_IN_DB --> FINISHED_WITH_ERROR : error
CREATE_LAG_IN_DB : enter / validate LAG port request, create GRPC commands

GRPC_COMMAND_SEND --> FINISHED : lag_installed
GRPC_COMMAND_SEND --> SPEAKER_COMMAND_SEND : lag_installed
GRPC_COMMAND_SEND --> FINISHED_WITH_ERROR : error
GRPC_COMMAND_SEND : enter / send GRPC commands

SPEAKER_COMMAND_SEND --> FINISHED : skip_speaker_commands_installation
SPEAKER_COMMAND_SEND --> FINISHED : speaker_entities_installed
SPEAKER_COMMAND_SEND --> FINISHED_WITH_ERROR : error
SPEAKER_COMMAND_SEND : enter / send speaker commands

FINISHED : enter / send-successful-response

FINISHED_WITH_ERROR : enter / [LAG port created in DB] delete created LAG port, send-error-response
Expand Down
Binary file modified docs/design/hub-and-spoke/lag/create/h&s-create-lag-port.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion docs/design/hub-and-spoke/lag/create/h&s-create-lag-port.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ boundary Northbound as NB
participant SwitchManager << Hub >>
participant SpeakerWorker
participant GRPC
participant Floodlight
database DB

User -> NB : Create LAG
Expand All @@ -25,7 +26,16 @@ GRPC -> SpeakerWorker : CreateLogicalPortResponse
activate SpeakerWorker
SpeakerWorker -> SwitchManager : CreateLogicalPortResponse
deactivate SpeakerWorker
SwitchManager ->> NB: LagPortResponse
SwitchManager -> SpeakerWorker : OfCommands
activate SpeakerWorker
SpeakerWorker -> Floodlight : OfCommands
deactivate SpeakerWorker
Floodlight -> Floodlight : Installing rules\nand meter
Floodlight -> SpeakerWorker : OfResponse
activate SpeakerWorker
SpeakerWorker -> SwitchManager : OfResponse
deactivate SpeakerWorker
SwitchManager -> NB : LagPortResponse
deactivate SwitchManager
NB -> User: LagPortDto
deactivate NB
Expand Down
Binary file modified docs/design/hub-and-spoke/lag/delete/delete-lag-port-fsm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions docs/design/hub-and-spoke/lag/delete/delete-lag-port-fsm.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ title LAG port delete FSM

[*] --> START

START --> CREATE_GRPC_COMMAND : next
START --> VALIDATE_REMOVE_REQUEST : next
START --> FINISHED_WITH_ERROR : error

CREATE_GRPC_COMMAND --> REMOVE_LAG_FROM_DB : lag_removed
CREATE_GRPC_COMMAND --> FINISHED_WITH_ERROR : error
CREATE_GRPC_COMMAND : enter / validate delete LAG port request, create GRPC command
VALIDATE_REMOVE_REQUEST --> SPEAKER_COMMAND_SEND : next
VALIDATE_REMOVE_REQUEST --> FINISHED_WITH_ERROR : error
VALIDATE_REMOVE_REQUEST : enter / validate delete LAG port request, create GRPC command

SPEAKER_COMMAND_SEND --> GRPC_COMMAND_SEND : skip_speaker_entities_removal
SPEAKER_COMMAND_SEND --> GRPC_COMMAND_SEND : speaker_entities_removed
SPEAKER_COMMAND_SEND --> FINISHED_WITH_ERROR : error
SPEAKER_COMMAND_SEND : enter / send remove commands to speaker

GRPC_COMMAND_SEND --> REMOVE_LAG_FROM_DB : lag_removed
GRPC_COMMAND_SEND --> FINISHED_WITH_ERROR : error
GRPC_COMMAND_SEND : enter / send command to GRPC

REMOVE_LAG_FROM_DB --> FINISHED : next
REMOVE_LAG_FROM_DB --> FINISHED_WITH_ERROR : error
Expand Down
Binary file modified docs/design/hub-and-spoke/lag/delete/h&s-delete-lag-port.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions docs/design/hub-and-spoke/lag/delete/h&s-delete-lag-port.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ actor User
boundary Northbound as NB
participant SwitchManager << Hub >>
participant SpeakerWorker
participant Floodlight
participant GRPC
database DB

Expand All @@ -14,8 +15,15 @@ activate NB
NB -> SwitchManager : DeleteLagPortRequest
activate SwitchManager
SwitchManager -> SwitchManager : Request validation
SwitchManager -> DB : Delete LAG from DB
DB -> SwitchManager
SwitchManager -> SpeakerWorker : OfCommands
activate SpeakerWorker
SpeakerWorker -> Floodlight : OfCommands
deactivate SpeakerWorker
Floodlight -> Floodlight : Remove rules\nand meter
Floodlight -> SpeakerWorker : OfResponse
activate SpeakerWorker
SpeakerWorker -> SwitchManager : OfResponse
deactivate SpeakerWorker
SwitchManager -> SpeakerWorker : DeleteLogicalPortRequest
activate SpeakerWorker
SpeakerWorker -> GRPC : DeleteLogicalPortRequest
Expand All @@ -25,6 +33,8 @@ GRPC -> SpeakerWorker : DeleteLogicalPortResponse
activate SpeakerWorker
SpeakerWorker -> SwitchManager : DeleteLogicalPortResponse
deactivate SpeakerWorker
SwitchManager -> DB : Delete LAG from DB
DB -> SwitchManager
SwitchManager ->> NB: LagPortResponse
deactivate SwitchManager
NB -> User: LagPortDto
Expand Down
2 changes: 2 additions & 0 deletions docs/design/multi-table-pipelines/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Constraints:
|`0x8000_0000_0000_001C`|`SERVER_42_ISL_RTT_OUTPUT_COOKIE`|Sends ISL RTT packet back to server42|
|`0x8000_0000_0000_001D`|`SERVER_42_ISL_RTT_TURNING_COOKIE`|Sends ISL RTT packet back to IN_PORT|
|`0x8000_0000_0000_001E`|`SERVER_42_FLOW_RTT_VXLAN_TURNING_COOKIE`|Catches flow RTT packet for VXLAN Flows, swaps ETH src and dst and sends back to IN_PORT|
|`0x8000_0000_0000_001F`|`DROP_SLOW_PROTOCOLS_LOOP_COOKIE`| Catches and drops LACP reply packet if ETH_SRC of this packet is equal to switch ID (packet returned to switch which sent it. It means we have a loop)|
|`0x8010_0000_XXXX_XXXX`|`LLDP_INPUT_CUSTOMER`|Marks LLDP packets from port XXX by metadata|
|`0x8020_0000_XXXX_XXXX`|`MULTI_TABLE_ISL_VLAN_EGRESS`|Moves Vlan packets received from ISL port XXX from input table to egress table|
|`0x8030_0000_XXXX_XXXX`|`MULTI_TABLE_ISL_VXLAN_EGRESS`|Moves VXLAN packets received from ISL port XXX from input table to egress table|
Expand All @@ -164,6 +165,7 @@ Constraints:
|`0x8090_0000_XXXX_XXXX`|`SERVER_42_FLOW_RTT_INPUT`|Receives server42 flow RTT packet from port XXX, puts timestamp into packet (if switch has such support) and move packet to pre-ingress table|
|`0x80A0_0000_0000_0000`|`APPLICATION_MIRROR_FLOW`|Flow mirror traffic for application purposes.|
|`0x80D0_0000_XXXX_XXXX`|`SERVER_42_ISL_RTT_INPUT`|Forwards server42 ISL RTT packet to ISL port XXX|
|`0x80E0_0000_XXXX_XXXX`|`LACP_REPLY_INPUT`|Catches LACP request packet from port XXX, sends it to Floodlight for modiffication and sending back to port|
|`0x4000_0000_000X_XXXX`|`INGRESS_FORWARD`|Receives Customer packets, push transit encapsulation if needed and sends to port. Path direction - forward, XXX - path unmasked cookie|
|`0x2000_0000_000X_XXXX`|`INGRESS_REVERSE`|Receives Customer packets, push transit encapsulation if needed and sends to port. Path direction - reverse, XXX - path unmasked cookie|
|`0x4008_0000_000X_XXXX`|`FLOW_LOOP_FORWARD`|Makes flow loop for forward direction (sends all customer traffic back to IN_PORT). XXX - path unmasked cookie|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@

package org.openkilda.floodlight.api.request.rulemanager;

import static java.lang.String.format;

import org.openkilda.model.SwitchId;
import org.openkilda.rulemanager.FlowSpeakerData;
import org.openkilda.rulemanager.GroupSpeakerData;
import org.openkilda.rulemanager.MeterSpeakerData;
import org.openkilda.rulemanager.SpeakerData;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;

import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;

@JsonTypeInfo(use = Id.NAME, property = "clazz")
@JsonSubTypes({
@Type(value = FlowCommand.class,
Expand All @@ -38,4 +48,23 @@ public abstract class OfCommand {
public abstract void buildModify(OfEntityBatch builder, SwitchId switchId);

public abstract void buildDelete(OfEntityBatch builder, SwitchId switchId);


/**
* Converts SpeakerData to OfCommand.
*/
public static OfCommand toOfCommand(SpeakerData speakerData) {
if (speakerData instanceof FlowSpeakerData) {
return new FlowCommand((FlowSpeakerData) speakerData);
} else if (speakerData instanceof MeterSpeakerData) {
return new MeterCommand((MeterSpeakerData) speakerData);
} else if (speakerData instanceof GroupSpeakerData) {
return new GroupCommand((GroupSpeakerData) speakerData);
}
throw new IllegalStateException(format("Unknown speaker data type %s", speakerData));
}

public static List<OfCommand> toOfCommands(Collection<SpeakerData> speakerData) {
return speakerData.stream().map(OfCommand::toOfCommand).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.openkilda.floodlight.service.FeatureDetectorService;
import org.openkilda.floodlight.service.IService;
import org.openkilda.floodlight.service.connected.ConnectedDevicesService;
import org.openkilda.floodlight.service.lacp.LacpService;
import org.openkilda.floodlight.service.of.InputService;
import org.openkilda.floodlight.service.session.SessionService;
import org.openkilda.floodlight.service.zookeeper.ZooKeeperService;
Expand Down Expand Up @@ -55,6 +56,7 @@ public KildaCore() {
.put(SessionService.class, new SessionService())
.put(FeatureDetectorService.class, new FeatureDetectorService())
.put(ConnectedDevicesService.class, new ConnectedDevicesService())
.put(LacpService.class, new LacpService())
.put(ZooKeeperService.class, new ZooKeeperService())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import com.sabre.oss.conf4j.annotation.Default;
import com.sabre.oss.conf4j.annotation.Key;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

public interface KildaCoreConfig {
@Key("command-processor-workers-count")
@Default("4")
Expand Down Expand Up @@ -58,15 +61,18 @@ public interface KildaCoreConfig {
@Converter(EnumLowerCaseConverter.class)
FloodlightRole getRole();

/**
* This offset is used for encoding ISL in_port number into udp_src port of Server 42 ISL RTT packets.
*/
@Key("server42-isl-rtt-udp-port-offset")
@Default("10000")
int getServer42IslRttUdpPortOffset();
@Key("lacp-system-id")
@Default("00:00:00:00:00:01")
@NotBlank
String getLacpSystemId();

@Key("server42-isl-rtt-magic-mac-address")
@Default("00:26:E1:FF:FF:FD")
String getServer42IslRttMagicMacAddress();
@Key("lacp-system-priority")
@Min(1)
@Default("1")
int getLacpSystemPriority();

@Key("lacp-port-priority")
@Min(1)
@Default("1")
int getLacpPortPriority();
}
Loading

0 comments on commit b54ef1c

Please sign in to comment.