All notable changes to the flow_manager NApp project will be documented in this file.
- Only update flows as
'installed'
if they were'pending'
. This fixed processing late barrier replies correctly even if there was a recent related flow deletion.
- Added new requests
POST v2/flows_by_switch
andDELETE v2/flows_by_switch
to modify flows by switch. Both have the parameterforce
as a boolean to ignore switch connectivity errors.
- Changed alien flows to have
alien
as owner. Alien flow deletion is now paced bysend_flow_mod.alien
. - Increased
telemetry_int
pacing rate to 300/second - Added
switches
proterty to requestsPOST v2/flows
andDELETE v2/flows
to add flows to all switches in the list fromswitches
- Increased
settings.FLOWS_DICT_MAX_SIZE
to 70k
- Logged flow xid key error on barrier reply as an error
- Added pacing for sending flow mods. Pacing can be configured in
ACTION_PACES
in the NApp'ssetings.py
file.
- Updated python environment installation from 3.9 to 3.11
- Added
kytos.flow_manager.flows.single.(install|delete)
handler withpool="dynamic_single"
- Added new script
scripts/db/2024.1.0/000_hard_delete_old.py
, it's a general purpose script to hard delete flows that have been soft deleted before a given string UTC datetime.
You're are encouraged to use this script from time to time until flow_manager provides an automatic functionality for this procedure.
- Added new script scripts/db/2024.1.0/001_update_match_id.py
to update flows ids (match ids), it'll update by inserting new flows and deleting old ones. Check out scripts/db/2024.1.0/README.md
for more information. Before using this script, it's recommended that you run scripts/db/2024.1.0/000_hard_delete_old.py
to clean up old flows first.
- Augmented
GET v2/stored_flows
cookie_range
to accept an even list of ranges - Augmented
GET v2/stored_flows
cookie_range
to accept this filter via json body too. If bothcookie_range
query arg and body are set, the body values will have a higher preference.
- Fixed updating flow installed state when handling
kytos/of_core.flow_stats.received
- Added support for VLAN with mask.
dl_vlan
now also supports a string"vlan/mask"
. - Added two new fields to the collection
flows
.owner
has the name of the NApp that created the flow.table_group
is the classification of a flow, for example:epl
,base
andevpl
. - Added basic validation for
cookie
andcookie_mask
when installing or removing flows. - Augmented
GET v2/stored_flows
state query filter to support a list of values.
- Update endpoint
GET v2/stored_flows
to return the flows in order bypriority
descending andupdated_at
ascending. - Update endpoint
GET v2/stored_flows
to return the flows in descending order by priority. - When creating a flow,
actions
andinstruction
are not allowed to be present at the same time. - Reduced the number of flows shown in the logs. Maximum number of shown flows is 200.
@rest
endpoints are now run bystarlette/uvicorn
instead offlask/werkzeug
.- Added new script
scripts/pipeline_related.py
to add new fieldsowner
andtable_group
to the flows on the collectionflows
on MongoDB. If you are planning to usekytos/of_multi_table
NApp and is upgrading to 2023.1 from 2022.3, you should use this script scripts/drop_compound_index.py
can be used to drop a compound index that has changed. If you tried to upgrade to2022.3.2
before and it ended up creating'flow.priority_1'
index, then you also want to delete it by runningCMD=drop_index INDEX_NAME=flow.priority_1 python3 drop_compound_index.py
- Fixed matching flows when trying to delete flows with specified
table_id
.
- Handled
PackException
to return bad request if a flow can't be packed. - Fixed not iterable error when sending a FlowMod during OpenFlow connection.
- Added endpoint
GET v2/stored_flows
for listing flows from flows collection. Query parameter filter for state and dpid is supported. A list of flows per switch is returned. - Added query parameter filter for cookie_range to the endpoint
GET v2/stored_flows
. - Added query parameter filter for state to the endpoint
GET v2/stored_flows
.
- Added flow quantity as
total_length
in logs for flow deletion and adittion through request and event.
- Fixed handling
OFPT_ERROR
correctly when OF negotiation fails - Fixed consistency check to run immediately when FlowStats is first received.
- Fixed flow
instructions
to be stored. - Handled connection exception corner case before an OpenFlow handshake
- Removed support for OpenFlow 1.0
- Removed
serializers
package
- MongoDB integration with
pymongo
- Added and soft deleted flows are stored now on MongoDB
flows
collections. - Consistency checks executions are stored on MongoDB
flow_checks
collection - FlowController and DB models
- Added log.info entry for kytos.flow_manager.flows.(install|delete) handler for troubleshooting
CONSISTENCY_MIN_VERDICT_INTERVAL
, granular control for the minimum expected interval that consistency check should wait before detecting inconsistencies
- Refactored consistency check to leverage
flow_id
andmatch_id
- Refactored flows upsert and delete operations to use bulk_write instead for higher performance based on the expected workload
- Endpoint /flow_manager/v2/flows/ writes first to the database now to optimize consistency for bulk operations.
- Set KytosEvent priority for OFPT_FLOW_MOD and OFPT_BARRIER_REQUEST
- OFPT_BARRIER_REQUEST is sent in bulk once per flows
- Consistency check will act slower than
FLOW_STATS
to enhance consistency
- Storehouse file system backend
- Storehouse backend and its locks
match13_strict
to simplify application logic since match strict was primarily for matching an exact flow, which without wildcards is simpler to do and maintain by usingflow_id
(flow.id) instead- Removed in memory archived_flows
scripts/storehouse_to_mongo.py
can be used to migrate data from storehouse to MongoDB
- Adapted consistency check to skip recent deleted flows
- Extracted
is_recent_flow
static method - Changed
_del_matched_flows_store
to also archive flows - Changed consistency check to also archive alien flows
- Added archived_flows and its lock to store in memory
- Added
_add_Archived_flows
method
- Adding Lock to avoid race conditions at flow_manager's storehouse
- New versioning schema, following kytos core versioning
- Subscribed to
on_connection_lost
event to reset consistency check executions
- Added support for retrying
kytos/core.openflow.connection.error
- Added retry configuration options
- Added an upper bound rotating limit for the number of barrier replies
- Changed
_flow_mods_sent_error_locks
,_pending_barrier_locks
, and_check_consistency_locks
to be safer
- Added support for ofpt_barrier_request and ofpt_barrier_reply
- Mapped barrier reply xid with flow mod xid to correlate them, and to also to confirm installed flows in an event-driver manner.
- Stored in memory errors of flow mod xids to correlate them when a barrier reply is received.
- Added thread locks accordingly for the dictionaries used.
- Added support to delete the stored_flow once an ofpt_error when receiving a barrier reply, to avoid this flow to keep being sent via consistency check.
- Added thread concurrency control per switch when executing check_consistency
- Started listening to
kytos/core.openflow.connection.error
and propagating the error - Added listen_to for ofpt_flow_removed
- Publish the event
kytos/flow_manager.flow.removed
on OFPT_FLOW_REMOVED - Parametrized and added
_id
on stored flows to confirm flow operations - Parametrized the flow on
SwitchNotConnectedError
exception - Added support to update flow
state
and flows are confirmed by the consistency check
- Publish the event
kytos/flow_manager.flow.added
only when the flow is confirmed
- Added support for
force
option when sending flow mods
- Augmented
_add_flow_store
to overwrite overlapping flows
stored_flows
are now indexed by cookie, issue 34- Changed the
flow_persistence
data structured on storehouse - Refactored the consistency checks methods accordingly to use cookie indexes
- The prior
flow_persistence
data structure isn't supported anymore. It's required to delete thekytos.flow.persistence
folder, upgrading won't be supported this time.
- Fixed issue 28, early return on
match13_no_strict
- Removed 'delete' command persistency
- Faster filtering when removing stored flows
- Fixed
match13_no_strict
issue 13
- Added support to handle with OpenFlow error
OFPBAC_BAD_OUT_PORT
. - Added attempt limits to try to recover box from storehouse, avoiding a possible thread lock condition.
- Added consistency mechanism information in README file.
- Added support for non-strict exclusion in the consistency check.
- Add support for the list of exceptions in the consistency mechanism.
- Add validation to data sent by REST endpoints in requests to install flows.
- Add support for install or remove flows in the switches using Kytos Events.
- Update consistency check to use
DELETE_STRICT
to remove 'alien' flows in switches. - Consistency check routine to recreate the flows when the switch reconnects to Kytos.
- New method to cast
UBInt
type to int to solve JSON serialization error. - Fix the HTTP status code returned when the switch is not found.
- Added new consistency check to guarantee the consistency of installed flows between switches and the controller.
- Added persistence mechanism to save in storehouse all the
flows installed by
kytos/flow_manager
. - Added mechanism to resend stored flows in Kytos bootstrap.
- Include the original command in the list of sent flow mods.
- Updated flow installation to allow removal of flows from disabled switches.
- Changed setup.py to alert when a test fails on Travis.
- Added unit tests, increasing coverage to 97%.
- Added listener to handle OpenFlow errors sent by
of_core
. - Added HTTP DELETE method support to REST API on
/flows
. - Added the error code of the flow mod message to the content of the resulting event.
- Started to use
FlowFactory
to check which version ofFlow
to use. - Added
@tags
decorator to run tests by type and size.
- Continuous integration enabled at scrutinizer.
- Improve code organization and fix some linter issues.
- Fix flow being used outside of its scope when installing a flow.
- Send flow_mod to only enabled switches.
- Change enabled attributes to use the method is_enabled.
- Update kytos.json version form 2.0.0 to 2.1.0.
- Send flow_mod to only enabled switches.
- Return 404 status code when dpid is not found.
- Fix actions to have correct type and value pair.
- Fix OpenAPI.yml.
- Some type fixes.
- Add REST API Version.
- Send app specific events when sending a flow_mod.
- Add documentation for of_flow_manager.
- Implement endpoint for add/delete/list flows.
- Added methods to deal with 1.0/1.3 flows.
- Adding dependencies in kytos.json.
- Change request body of the rest api.
- Change rest api to return Response with mimetype='application/json'.
- Change list of flows to dictitonary.
- Change actions field from dict to list in bodies.
- Standardize models and examples.
- Change 'Response' to 'Flows'.
- Change HTTP success code for add flows.
- Change Napp name to kytos/flow_manager and tags
- Added examples of requests/replies to of_flow_manager REST endpoints.
- Added rest api endpoints and JSON input/output.
- Created application to register REST endpoints to manage flows.