telstra/open-kilda

Misconfigured meters on WB switch(rate: 65) after their reinstallation in the scope of sync due to the previous rules+meters deletion

yuliiamir opened this issue · 0 comments

Misconfigured meters on WB switch(rate: 65) after their reinstallation in the scope of sync due to the previous rules+meters deletion.

TC: SwitchSyncSpec: Able to synchronize switch (install missing rules and meters)
STR:

  1. Select non-neighboring switches.
  2. Create flow.
    Due to our current topology(hardware env), WB switch has been selected as a source switch.
  3. Delete rules/meters on all involved switches.
    Step: Drop all rules an meters from related switches (both default and non-default)
  4. Sync all involved switches.

Actual result:
WB switch has a discrepancy (misconfigured meters) after sync. Only additional sync solves the issue.

Expected result:
All switches have been synced successfully and passed validation. All discrepancies have been fixed during the first sync operation.

Details:
For example, meter 22
Before deleting rules/meters:

{
      "clazz": "org.openkilda.messaging.info.meter.MeterEntry",
      "meter_id": 22,
      "rate": 64, // GOOD
      "burst_size": 3200,
      "version": "OF_13",
      "flags": [
        "KBPS",
        "BURST",
        "STATS"
      ],
      "timestamp": 1713260221896
    }
    

WB_AllMetersBeforeDeletion.json

After deleting rules+meters and executing sync:
sync cor id: “fn-tests-c5ea4399-a304-4f88-b2cc-9c1aa696dfbc”
date: Apr 16, 2024 @ 11:37:55.371
Floodlight sent correct data in the scope of sync request:
push OF message to 00:00:00:90:fb:64:cd:4a: OFMeterModVer13(xid=247129, command=ADD, flags=[KBPS, STATS, BURST], meterId=22, meters=[OFMeterBandDropVer13(rate=64, burstSize=3200)])

DiscrepancyAfterDeletionRulesAndMetersHardware
InstalledMetersAfterSync

WB_ValidationAfterSyncMetersDiscrepancy.json

"meters": {
    "asExpected": false,
    "missing": [],
    "misconfigured": [
      {
        "id": "16",
        "expected": {
          "meter_id": 16,
          "flags": [
            "BURST",
            "KBPS",
            "STATS"
          ],
          "rate": 64,
          "burst_size": 9600
        },
        "discrepancies": {
          "rate": 65
        }
    ...
      },
      {
        "id": "22",
        "expected": {
          "meter_id": 22,
          "flags": [
            "BURST",
            "KBPS",
            "STATS"
          ],
          "rate": 64,
          "burst_size": 3200
        },
        "discrepancies": {
          "rate": 65
        }
      }
 

BUT this meter had rate:65

{
      "clazz": "org.openkilda.messaging.info.meter.MeterEntry",
      "meter_id": 22,
      "rate": 65,
      "burst_size": 3195,
      "version": "OF_13",
      "flags": [
        "KBPS",
        "BURST",
        "STATS"
      ],
      "timestamp": 1713260359054
    }

WB_AllMetersAfterSyncRate65.json