Gradiant / 5g-charts

Helm charts for 5G Technologies
Apache License 2.0
108 stars 42 forks source link

Get various hostnames with smf-upf-pfcp values config #143

Closed rodrigosanzsanz closed 3 months ago

rodrigosanzsanz commented 7 months ago

Hello!

I had success in launch an additional UPF usign OpenVerso charts, and changing config values from outside. This is a great job and allow me to use different configuration from base chart.

But actually , I have the following problem, when I update with 'helm upgrade...' as follows:

helm upgrade open5gs open5gs --values new-config-2dnn.yaml

The part of SMF config gets only the last Hostname define (in the case below 'internet2'

... smf: config: pcrf: enabled: false

subnetList:
  - addr: 10.45.0.1/16
    dnn: internet
  - addr: 10.46.0.1/16
    dnn: internet2
upf:      
  pfcp:
    hostname: "open5gs-upf-pfcp"
    dnn: internet
    hostname: "open5gs-upf2-pfcp"
    dnn: internet2

...

Maybe it is needed to change something in the values config map to allow to get both hostnames?? I hope you can check if there is any issue to get both upf-pfcp--> 2xhostnames

Thanks in advance!

avrodriguezgrad commented 7 months ago

Hi Rodrigo!

Glad to hear that you were able to deploy an additional UPF. For helping you, can you show me your new-config-2dnn.yaml?

rodrigosanzsanz commented 7 months ago

5gconfig-upd-2upf-2dnn.txt

Please, find attached the complete config file, with txt extension.

image

Any help is welcome :)

Take into account that if the order of upf-pfcp is interchanged, the upf selection considered is only the last one.

Regards

rodrigosanzsanz commented 7 months ago

Additional comment: In a 2 UPF scenario, I can pass traffic by UPF 1 with DNN1, and traffic with UPF2 with DNN2. But when I change to configuration above with 2 UPF configured at the same time, it seems the subnetList cannot get it completely....just one UPF, not the complete list..

cgiraldo commented 7 months ago

Hi Rodrigo,

This is because the pfcp section is a yaml object expecting a single field called hostname and a single field called dnn. The chart did not support multiple hostnames in the pfcp section.

To suppport that the pfcp value section must be a list (with "-"), and the smf config template should be modified to "range" the list of pfcp. Here is the line to modify:

https://github.com/Gradiant/openverso-charts/blob/a332f4d04c3205aa1af9199dca06105163be165b/charts/open5gs-smf/resources/config/smf.yaml#L64

If you are in a hurry you can try to modify the code yourself, PR are welcome. If not, we will try to include this in the following weeks.

rodrigosanzsanz commented 7 months ago

Thanks Carlos!, Yes, this was the issue, I will make some test, but issue is clear. I will make some make around at the moment but if I have some time to prepara a PR I will let you know. Thanks!

rodrigosanzsanz commented 6 months ago

Hello! After solve the issue related to name and hostname, we have a similar issue. Maybe it is the same problem.

We want to check if smf sends traffic to one on other upf with same dnn/cellid/tac config. It is supposed it is with Round Robin (rr=1 by default). But when we have the following config, the traffic it is send to the first item ( in this case 10.43.1/16).

Following config in values info:

image

Following mapping info in smf.yaml. Is sure the "subnet" attribute is getting a list object with 2 elements? I am not sure about that so maybe you can provide me. any idea. It is expected after get the list, with Round Robin algorithm the UPF will be selected, if the config is the same.

image

Any help is welcome to check if is the same issue of the topic.

Thanks in advance!

avrodriguezgrad commented 6 months ago

Hi Rodrigo,

Sorry for the delay. You can see the configmap of the SMF using kubectl get cm <configmap-name> -o yaml and, there, you can check if the subnetList is working.

I cannot check yet if its working or not, but the behavior is the same as the slice list, and that's working.

If you solved it, feel free to PR if it's needed.

Thanks again for using both charts and images projects!