> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/upg/latest/releases/2.0.0.md).

# UPG Manager v2.0.0 Release Notes

## Glossary

Terms used in this document:

- CRD - Custom Resource Definition, a Kubernetes API object
- CR - Custom Resource (an instance of Kubernetes Custom Resource)
- NWI - Network Instance, a term used in 3GPP and in the UPF plugin

## Features

### Upgrade VPP version to 22.02-rc1, hugepages are now required

- VPP version has been upgraded to 22.02-rc1 due to IPFIX requirements
- VPP 22.02-rc1 requires at least 2G of hugepages allocated per UPG
- there's `enableHugepagesAllocation` variable in the chart's
  `values.yaml` to enable the use of hugepages for the heap, stats and
  VPP buffers. By default, `enableHugepagesAllocation` is set to
  `true`
- With `enableHugepagesAllocation: true`, the recommended minimal
resource settings are:

```yaml
resources:
  cpu: "2"
  memory: 1Gi
  hugepages-2Mi: 4Gi
```

- With `enableHugepagesAllocation` set to `false`, UPG still requires
  `2Gi` of hugepages, so recommended minimal resource setting in this
  case are:

```yaml
resources:
  cpu: "2"
  memory: 2Gi
  hugepages-2Mi: 2Gi
```

- When `enableHugepagesAllocation` is `false`, set `hugepages-2Mi` to
  `2Gi`
- When `enableHugepagesAllocation` is `true`, set `hugepages-2Mi` to
  `heapsize` + `2Gi`

### Add Helm chart for UPG Manager

- `upg` helm chart is migrated from the `upg-helm` repository.
- CRDs (Custom Resource Definitions) have their own chart `upg-crd`
- `upg-support` chart is migrated from the `upg-helm` repository

### Add UPGConfig CR with NWI configuration

- Network Instance (NWI) must be created with `UPGConfig` Custom
  Resource (CR), not with UPG CLI
- UPG chart generates the corresponding NWIs in the `UPGConfig` CR for
  `epc` / `access`, `cp` and `sgi` (multiple `sgi`s for CG-NAT
  use-case)
- Modifying `UPGConfig` causes the corresponding UPG instance to
  restart and lose all of the sessions, so modifying NWIs "on the fly"
  is not supported right now
- Later versions of UPG will support updating UPGConfig and the NWIs
  in particular without restart

### IPFIX support

- To configure IPFIX exporter (one for each IPFIX collector),
  `IPFIXExporter` CR should be used
- `UPGConfig` CR defines IPFIX configuration for each NWI
- Refer to [IPFIX configuration guide](https://docs.cennso.com/components/upg/latest/operation-guides/ipfix.md#configuration)
  for a sample IPFIX configuration
- IPFIX data can only be sent over VPP interface. Kubernetes network
  can't be used for that purpose unless FPP is used as the primary CNI
  in the cluster (which has not been tested or tried yet)
- IPFIX collector needs to be available using FPP-CNI network
- UPG exposes two IPFIX templates:
  - `default` - mainly created for TDF use-case, with NAT information
  - `dest` - used in PGW mode
- IPFIX collectors are distinguish by their IP address, so only one
  collector per IP is supported currently (this is VPP internal
  limitation)

### Expose stats segment utilization metrics

New metrics are exposed:

- Stats segment size, `vpp_stat_seg_total_bytes`
- Stats segment used space, `vpp_stat_seg_used_bytes`
- Stats segment free space `vpp_stat_seg_free_bytes`

### Expose error, performance and connectivity metrics

For better debugging and performance profiling, the following new
metrics are reported:

- `vpp_interface_errors` metric exposes possible issues on interfaces like:
  - an interface is down,
  - traffic on a passive bond member (in active-passive configuration)
  - DPDK TX function error, TX packet drops
  - tap: pending messages in TX ring
- `vpp_interface_no_tx_slots` - not enough space in the memif TX ring
  (indicates possible performance bottlenecks)
- `vpp_arp_sent` and `vpp_arp_hw_addr_not_match_l2_frame` which
  indicates possible connectivity issues

### Use meaningful interface names

In the previous version of `upg-manager`, the interface names in VPP
were different from those specified in the Network Attachment
Definition. This was making the corresponding metrics misleading, as
generated interface names like `memif1/100` were being published.

UPG 2.0 uses `name` from the CNI config as the corresponding VPP
interface name, there are meaningful interface names visible in the
VPP CLI and in the metrics.

Below, the memif interface name will be set to the value `name`
specified in the Network Attachment Definition (GRX):

```
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
(...)
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {...},
      "name": "grx",
      "table": 100,
      "type": "fpp-cni",
      "vni": 50,
      "vppIfaceType": "memif"
    }
```

### Add ability to define PFCP rate limiter

- Rate limit for the PFCP Session Report Requests can be specified via
  `rateLimiterPPS` in `values.yaml`
- `rateLimiterPPS: 50` means that max 50 PFCP Session Report Requests
  per second will be sent towards SMF

## Fixes

### Fixes in URR timers handling

Fix stopping random timers and warn about delayed URR timer events

This fixes the bug [upg#104](https://github.com/travelping/upg/issues/104)

### Fix missing NAT metrics

NAT metrics were not present in UPG 1.4 release.
The following NAT metrics are added UPG 2.0.0:

- `vpp_nat_pool_block_size`
- `vpp_nat_pool_capacity`
- `vpp_nat_pool_info`
- `vpp_nat_pool_utilization`

## Known issues

### Kernel 5.15 and newer are not supported

UPG 2.0.0 does not work with the newer kernel versions (5.15+), which is related to the constraints of
the new layout for the control groups (cgroups) v2 files. To check if UPG works with your kernel version,
connect to your machine and check if the `/sys/fs/cgroup/cpuset/cpuset.cpus` path
is present. If not, use the newer version of UPG, since the current version will not work.

### Kubernetes 1.22+ is not supported

Since the support for the CustomResourceDefinition (CRD) **apiVersion** of `apiextensions.k8s.io/v1beta1`
was removed from Kubernetes API in release 1.22+, UPG-CRD 2.0.0 does not work on that cluster.
Please use the newer versions of UPG-CRD.

### No support for constant PCAP collection in the UPG 2.0 chart

FPP-based CNFs does not support kernel based pcap collection like
previous versions of the UPG chart provided. That is why the sidecar
container with pcap and rclone has been removed.

An alternative possibility for PCAPs collection is
[using SPAN interfaces](https://github.com/travelping/cennso/blob/main/docs/instruction-pcaps-tap.md#collecting-pcaps-from-fpp-based-cnfs),
in FPP.  Currently it was not validated by QA, so no effect on CPU or
memory consumption is known.

### `UPG Overview` dashboard can be installed only once per cluster

`upg-support` chart that includes `UPG Overview` Grafana dashboard should be
installed only once per cluster.

`ServiceMonitor` can be deployed multiple times, but dashboard should be
disabled, as in `upg-support` chart config values:

```
dashboard:
  enabled: false

prometheus:
  servicemonitor:
    enabled: true
    namespaceSelector:
      any: false
```

## Migration guide

### 1.4 -> 2.0

UPG 1.4 is deployed by [upg-helm](https://github.com/travelping/upg-helm)
chart. UPG 2.0 chart includes following changes to deployment method:

- No `vxlanController` support in UPG 2.0
- FPP deployment is enabled by default, no `fpp.enabled` value
- no `upgAgent` in UPG 2.0
- no `pcap` and `rclone` support in UPG 2.0
- `resources` are defined only for `upg-manager`
- `additionalNetworks` moved from `fpp` to top level in `values.yaml`, or per
UPG instance in `instances.<name>.networking`

For actual migration steps, please follow the instructions prepared
for [TDF migration guide](https://docs.cennso.com/components/upg/latest/releases/tdf-migration.md#migration-steps).

## KPIs

See the [Performance document](https://docs.cennso.com/components/upg/latest/performance.md) for the KPIs of UPG v2.0.0.
