-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into misc/ansible-remove
- Loading branch information
Showing
556 changed files
with
17,504 additions
and
8,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
# How to contribute to OpenKilda project | ||
The folder contains OpenKilda contributor licenses agreemetns and tips for contributors. | ||
The folder contains OpenKilda contributor licenses agreements and tips for contributors. | ||
|
||
# OpenKilda design documents | ||
The folder contains the main use case digrams and their descriptions. | ||
The folder contains the main use case diagrams and their descriptions. | ||
|
||
# Release notes | ||
The folder contains OpenKilda release notes | ||
The folder contains OpenKilda release notes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Flow pings | ||
## The idea | ||
Use our link validation mechanism to validate the whole flow. We can inject | ||
validation packet on edge switch, it will be "routed" using flow rules on all | ||
intermediate switches and cached on the edge switch on other side of flow | ||
("packet out" message must specify special out port called "TABLE" to pass | ||
packet via existing on switch open flow rules). | ||
|
||
## Goals | ||
* measure flow latency | ||
* one more way to verify switch availability (detect control plane issues) | ||
|
||
# Ping topology | ||
## Periodic pings | ||
Periodic pings are initiated by kilda system periodically, with interval defined by `flow.ping.interval` configuration option. Pings for both directions for all existing flows are created on each iteration. | ||
|
||
If ping success - it's latency is stored into OTSDB, in metric `pen.flow.latency`, with tags flowid and direction. | ||
|
||
If there is no successful pings for `flow.ping.fail.delay` seconds - flow failure will be reported in logs also `PingReport` message will be send into kafka topic defined in `kafka.topic.flow.status` configuration option. | ||
|
||
To simplify flow status log filtration, all flow status log message are prefixed with `{FLOW-PING}` keyword. | ||
|
||
Example of `PingReport` message: | ||
```json | ||
{ | ||
"clazz": "org.openkilda.messaging.info.InfoMessage", | ||
"payload": { | ||
"clazz": "org.openkilda.messaging.info.flow.FlowPingReport", | ||
"report": { | ||
"flowid": "flowping-alpha", | ||
"status": "OPERATIONAL" | ||
}, | ||
"timestamp": 1531157435563 | ||
}, | ||
"timestamp": 1531157435563, | ||
"correlation_id": "435ed47d-2438-4037-b432-d1d0cb01a709" | ||
} | ||
``` | ||
|
||
![pediodic pings](./periodic-ping-sequence-diagram.png "Periodic ping sequence diagram") | ||
|
||
## On demand pings | ||
This kind of flow ping is initiated via NorthBound API. The only mandatory input parameter if flowId. On this request kilda will initiate 2 pings, one in forward direction and one in reverse direction. | ||
|
||
NorthBound endpoint - ulr path `/flows/{flow_id}/ping`, method PUT. In request body you can pass additional ping options. | ||
|
||
Request body example: | ||
```json | ||
{ | ||
"timeout": 2000 | ||
} | ||
``` | ||
|
||
`timeout` - how long time wait for response (in milliseconds). If not defined - the default value 2000 will be used. | ||
|
||
Successful ping call response: | ||
```json | ||
{ | ||
"flow_id": "flowping-alpha", | ||
"forward": { | ||
"ping_success": true, | ||
"error": null, | ||
"latency": 5 | ||
}, | ||
"reverse": { | ||
"ping_success": true, | ||
"error": null, | ||
"latency": 2 | ||
}, | ||
"error": null | ||
} | ||
``` | ||
|
||
Failure in forward direction: | ||
```json | ||
{ | ||
"flow_id": "flowping-alpha", | ||
"forward": { | ||
"ping_success": false, | ||
"error": "No ping for reasonable time", | ||
"latency": 0 | ||
}, | ||
"reverse": { | ||
"ping_success": true, | ||
"error": null, | ||
"latency": 1 | ||
}, | ||
"error": null | ||
} | ||
``` | ||
|
||
![on-demand pings](./on-demand-ping-sequence-diagram.png "On demand ping sequence diagram") | ||
|
||
## Common part for all kinds of pings | ||
![common pings](./ping-sequence-diagram.png "All ping kinds common part sequence diagram") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@startuml | ||
title ON DEMAND flow pings | ||
|
||
participant NB | ||
|
||
control kilda.ping | ||
|
||
participant InputDecoder | ||
participant InputRouter | ||
|
||
participant FlowFetcher | ||
participant Neo4j | ||
|
||
participant PING | ||
participant ResultDispatcher | ||
participant OnDemandResultManager | ||
participant GroupCollector | ||
|
||
participant NorthboundEncoder | ||
|
||
control kilda.northbound | ||
|
||
NB -> kilda.ping: json{FlowPingRequest} | ||
kilda.ping -> InputDecoder: json{FlowPingRequest} | ||
|
||
activate InputDecoder | ||
InputDecoder -> InputRouter: FlowPingRequest | ||
deactivate InputDecoder | ||
|
||
activate InputRouter | ||
InputRouter -> FlowFetcher: FlowPingRequest | ||
deactivate InputRouter | ||
|
||
activate FlowFetcher | ||
FlowFetcher -> Neo4j: fetch flow\nby flowId | ||
activate Neo4j | ||
Neo4j -> FlowFetcher: BidirectionalFlow | ||
deactivate Neo4j | ||
|
||
note right of FlowFetcher: make PingContext(kind=ON_DEMAND) | ||
FlowFetcher -> PING: PingContext | ||
deactivate FlowFetcher | ||
|
||
activate PING | ||
note right of PING: see details\nin "The Ping" diagram | ||
PING -> ResultDispatcher: PingContext | ||
deactivate PING | ||
|
||
activate ResultDispatcher | ||
ResultDispatcher -> OnDemandResultManager: PingContext | ||
deactivate ResultDispatcher | ||
|
||
activate OnDemandResultManager | ||
OnDemandResultManager -> GroupCollector: PingContext (groupId grouping) | ||
deactivate OnDemandResultManager | ||
|
||
activate GroupCollector | ||
alt when ping group is completed | ||
GroupCollector -> OnDemandResultManager: Group | ||
end | ||
deactivate GroupCollector | ||
|
||
activate OnDemandResultManager | ||
note right of OnDemandResultManager: make FlowPingResponse | ||
OnDemandResultManager -> NorthboundEncoder: FlowPingResponse | ||
deactivate OnDemandResultManager | ||
|
||
activate NorthboundEncoder | ||
NorthboundEncoder -> kilda.northbound: json{FlowPingResponse} | ||
deactivate NorthboundEncoder | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.