omec-project / smf

10 stars 34 forks source link

Cached AMBR being served after update #228

Closed markbeierl closed 2 months ago

markbeierl commented 7 months ago

Steps to Reproduce

Provision Data

Subscriber

for IMSI in `seq 81 82`; do 
  curl -v ${WEBUI_IP}:5000/api/subscriber/imsi-2089301000074${IMSI} \
  --header 'Content-Type: text/plain' \
  --data "{
    \"UeId\":\"2089301000074${IMSI}\",
    \"opc\":\"981d464c7c52eb6e5036234984ad0bcf\",
    \"key\":\"5122250214c33e723a5dd523fc145fc0\",
    \"sequenceNumber\":\"16f3b3f70fc2\"
  }"
done

Device Group

Note the value of "10000000 bps"

curl -v ${WEBUI_IP}:5000/config/v1/device-group/DG-1 \
--header 'Content-Type: application/json' \
--data '{
    "imsis": [
        "208930100007481"
    ],
    "site-info": "site-1",
    "ip-domain-name": "domain1",
    "ip-domain-expanded": {
        "dnn": "internet",
        "ue-ip-pool": "172.1.0.0/16",
        "dns-primary": "8.8.8.8",
        "mtu": 1348,
        "ue-dnn-qos": {
            "dnn-mbr-uplink":   1,
            "dnn-mbr-downlink": 1,
            "bitrate-unit": "mbps",
            "traffic-class": {
                "name": "platinum",
                "arp": 6,
                "pdb": 300,
                "pelr": 6,
                "qci": 8
            }
        }
    }
}'

Slice

curl -v ${WEBUI_IP}:5000/config/v1/network-slice/Slice-1 \
--header 'Content-Type: application/json' \
--data '
{
  "SliceName": "Slice-1",
  "slice-id": {
    "sst": "1",
    "sd": "010203"
  },
  "site-device-group": [
    "DG-1"
  ],
  "site-info": {
    "site-name": "demo",
    "plmn": {
      "mcc": "208",
      "mnc": "93"
    },
    "gNodeBs": [
      {
        "name": "gnbsim-gnbsim-gnbsim",
        "tac": 1
      }
    ],
    "upf": {
      "upf-name": "upf.mgmt",
      "upf-port": "8805"
    }
  }
}'

## Procedure

Initiate a new PDU using the subscriber.  
Disconnect the UE.  
Update the Device Group to be 5 mbit/s

```bash
curl -v ${WEBUI_IP}:5000/config/v1/device-group/DG-1 \
--header 'Content-Type: application/json' \
--data '{
    "imsis": [
        "208930100007481"
    ],
    "site-info": "site-1",
    "ip-domain-name": "domain1",
    "ip-domain-expanded": {
        "dnn": "internet",
        "ue-ip-pool": "172.1.0.0/16",
        "dns-primary": "8.8.8.8",
        "mtu": 1348,
        "ue-dnn-qos": {
            "dnn-mbr-uplink":   5,
            "dnn-mbr-downlink": 5,
            "bitrate-unit": "mbps",
            "traffic-class": {
                "name": "platinum",
                "arp": 6,
                "pdb": 300,
                "pelr": 6,
                "qci": 8
            }
        }
    }
}'

Note the following in the SMF log:

2024-02-28T21:09:03.246Z [smf] 2024-02-28T21:09:03Z [INFO][SMF][GRPC] received updateConfig in the smf app: RestartCounter:990553651 NetworkSlice:{Name:"Slice-1" Nssai:{Sst:"1" Sd:"010203"} DeviceGroup:{Name:"DG-1" IpDomainDetails:{Name:"pool1" DnnName:"internet" UePool:"172.1.0.0/16" DnsPrimary:"8.8.8.8" Mtu:1348 UeDnnQos:{DnnMbrUplink:5000000 DnnMbrDownlink:5000000 TrafficClass:{Name:"platinum" Qci:8 Arp:6 Pdb:300 Pelr:6}}} Imsi:"208930100007481"} Site:{SiteName:"demo" Gnb:{Name:"gnbsim-gnbsim-gnbsim" Tac:1} Plmn:{mcc:"208" mnc:"93"} Upf:{UpfName:"upf.mgmt"}} AppFilters:{PccRuleBase:{FlowInfos:{FlowDesc:"permit out ip from any to assigned" TosTrafficClass:"IPV4" FlowDir:BIDIRECTIONAL} RuleId:"DefaultRule" Qos:{Var5qi:9 Arp:{PL:1 PC:MAY_PREEMPT PV:PREEMPTABLE}} Priority:255}}} ConfigUpdated:1

Setup a new PDU with the UE. Note the following in the SMF log:

2024-02-28T21:09:50.155Z [smf] Session Rules: 
2024-02-28T21:09:50.155Z [smf] [name:[internet1], SessRule:[RuleId:[internet1], Ambr:[Dl:[10000 Kbps], Ul:[10000 Kbps]], AuthDefQos:[Var5QI:[8], PriorityLevel:[0], ARP:[&{6  }]]]]
2024-02-28T21:09:50.155Z [smf] QosData: 
2024-02-28T21:09:50.155Z [smf] [name:[1], QosData:[QosId:[1], Var5QI:[9], MaxBrUl:[10000 Kbps], MaxBrDl:[10000 Kbps], GBrUl:[], GBrDl:[], PriorityLevel:[0], ARP:[&{1 MAY_PREEMPT PREEMPTABLE}], DQFI:[true]]]

Bitrate characteristics in the SCTP pcap of session setup shows the same.

imsi-81-after-update.pcapng.gz

onf-bot commented 6 months ago

This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.

thakurajayL commented 5 months ago

Checking

thakurajayL commented 5 months ago

HI @markbeierl , PCF is the which enforces this QoS updates. We would need some debug logs at PCF and webconsole pod. It seems PCF is handling update as long as update Slice trigger is generated by webconsole. But need to review webconsole code as well.

gatici commented 3 months ago

Hello @gab-arrobo @thakurajayL ,

I made a PR to fix the issue in PCF. https://github.com/omec-project/pcf/pull/125 This is tested and confirmed that issue is solved. Please review. Thank you!

gab-arrobo commented 3 months ago

Hello @gab-arrobo @thakurajayL ,

I made a PR to fix the issue in PCF. omec-project/pcf#125 This is tested and confirmed that issue is solved. Please review. Thank you!

I am currently on vacation. I can review it when I am back. In the meantime, @thakurajayL can you review the PCF PR that fixes thos issue? Thanks!

thakurajayL commented 3 months ago

Yes. I have reviewed PCF and added 1 comment.