> 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.2.0.md).

# User Plane Gateway 2.2.0

The new release of User Plane Gateway (UPG) provides the following features and improvements:

- Support for Kubernetes 1.22+
- Support kernel 5.15 and newer and cgroups v2
- Configuration option for logging level added
- VPP error metrics panel in Grafana dashboard
- VPP version updated to 22.02 stable release
- UPG error reporting fixed for Forwarding Policy and NAT during session establishment
- UPG Overview Grafana dashboard includes a fixed CPU utilization and CPU/Memory limits display

UPG Manager uses FPP Manager in version `1.2.0` and UPG VPP in version `1.6.1`.
To see UPG's key performance indicators (KPIs), go to the [Performance document](https://docs.cennso.com/components/upg/latest/performance.md).

## Features

### Support for Kubernetes 1.22+

Kubernetes **apiVersion** CustomResourceDefinition (CRD) was updated to version
`apiextensions.k8s.io/v1` in UPG CRD. This means that you can now install UPG 2.2.0 on Kubernetes 1.22 and newer.

You can safely migrate UPG CRD to a new one. Only new attributes, which are not mandatory, are added to the object
definitions. You can safely update UPG CRD to a new one. The CRDs are backward-compatible with UPG 2.1, that is,
they don't remove any existing attributes and only add new ones, and UPG 2.1 can run with the new CRDs installed in the
cluster.

To update UPG CRD, apply the UPG CRD chart in version 2.2.0 on the cluster. The chart supports Kubernetes 1.16 and newer.

### Support kernel 5.15 and newer and cgroups v2

Cgroups v2 introduces a new file layout for the cgroup filesystem, which is used by UPG for VPP CPU pinning. If your Linux
kernel uses cgroups v2, use UPG 2.2.0 which supports the new cgroup filesystem layout. Earlier UPG versions will fail
with the following message in the UPG pod logs:

```
ERRO[0000] unable to start VPP                           error="error getting available CPU cores: can't parse \"sys/fs/cgroup/cpuset/cpuset.cpus\": bad cpu list: \"\"" logger=setup
```

To check cgroup version used by the kernel on the node, run the following command on the machine:

```bash
grep cgroup /proc/mounts
```

In case the system uses v2 cgroups, the output will be

```
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
```

With cgroups v1, the output will be

```
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
...
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
...
```

UPG 2.1 supports only cgroups v1, and UPG 2.2 supports both v1 and v2 cgroups versions.

Kernel versions from 5.4 to 5.13 use the cgroups v1 (Ubuntu 18.04.5, 20.04.4).
Ubuntu 22.04 and 20.04.5 use kernel 5.15. UPG 2.2.0 supports both old and newer kernels.

### Configuration option for logging level added

The new U{G} version introduces the following logging level values: `trace`, `debug`, `info`, and `error` (the latter also applies to warnings).
Up to now, the `trace` level was the only possible option. Since UPG 2.2, the `debug` level is configured as default. To change the log level,
specify the value of the **logLevel** parameter in the `values.yaml`:

```yaml
# -- Sets verbosity of the logging, possible values trace/debug/info/error
logLevel: debug
```

### VPP error metrics panel in Grafana dashboard

UPG 2.2 now exposes VPP error metrics as values, not labels as before.
Based on that, you can see the interface error rate on the new Grafana panel called `Interface Errors` located in the **Error indicators** row.

## Fixes

### UPG Error Reporting Fix

Previously, there was incorrect error information present in PFCP Session Establishment Response and Session Modification Response
when a non-existent Forwarding Policy was specified, or when there was a problem with NAT binding. `0` was passed instead of
failed FAR ID, and the Travelping-specific error message IE was absent. This problem is fixed in UPG 2.2.0.

### CPU and Memory Resource Utilization panel fix

Grafana dashboard was using removed metrics for CPU utilization and CPU/Memory resource limits. Metrics that were removed:

- `node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate`
- `kube_pod_container_resource_limits_cpu_cores` and `kube_pod_container_resource_limits_memory_bytes`

In UPG 2.2.0, UPG Overview `CPU Usage` and `RAM Usage` panels use updated metrics:

- `container_cpu_usage_seconds_total` for CPU utilization
- `kube_pod_container_resource_limits` for CPU and Memory limits

## Migration guide

### 2.1.0 -> 2.2.0

> **Warning**
>
> Updating the UPG Helm chart will restart the currently running UPG instance causing all active sessions to be dropped.

> **Warning**
>
> UPG 2.2.0 requires FPP-CRD in version at least 1.2.0 to be installed in the Kubernetes cluster.

Follow these steps to upgrade UPG to version 2.2.0:

1. Install the `upg-crd` Helm chart in version 2.2.0.
1. Ensure that the Kubernetes cluster has FPP-CRD installed in version at least 1.2.0
1. Remove the `upg-support` Helm chart in version 2.1.0. This also removes the `UPG Overview` Grafana dashboard.
1. Install the `upg-support` Helm chart in version 2.2.0 with the enabled dashboard.
1. Install the `upg` Helm chart in version 2.2.0.
