> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/6.15/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/tposs/6.15/releases/6.12.0.md).

# Travelping Open Subscriber Server 6.12.0

In this release of Travelping Open Subscriber Server (TPOSS), we provide the following features, fixes, and deprecated features:

- Deprecation of the `vxlan` container and the related configuration options
- Deprecation of metrics
- Removal of TPOSS API Gateway dependency
- Rootless TPOSS and SFTP containers
- New B2BInternet tariff
- The liveness and readiness probes are enabled by default
- Possibility to configure liveness and readiness probes
- TPOSS API Gateway updated to version `v1.6.4`
- Optimization of the IMEI change during subscriber authorization
- Possibility to specify configuration options for the underlying BEAM virtual machine
- Redundant Diameter options removed
- The `nettools` container version updated
- Database and Diameter metrics improvements
- Possibility to disable the idle timer
- Possibility to disable the global lock
- PCS and CCS cache
- Possibility to not use a separate database table to store Framed-IP addresses
- Possibility to cache DNS queries when sending RADIUS Disconnect requests
- Fixed time units for the database histogram metrics

>**CAUTION:** TPOSS 6.12.0 provides significant number of changes, such as new metrics, new configuration options, and deprecated features. Read the [Migration guide](#migration-guide) carefully before upgrading your deployments.

## Deprecations

### Deprecation of the `vxlan` container and the related configuration options

>**CAUTION:** The `vxlan` configuration options are deprecated and will be removed in the next 4 months or 3 minor releases.

For more information, see the [Migration guide](#deprecation-of-the-vxlan-container).

### Deprecation of metrics

>**CAUTION:** Some of Diameter metrics are deprecated since this release and will be removed in the next 4 months or 3 minor releases.

The deprecated metrics are:

- `diameter_requests_gx_rejects_total` - use the `diameter_requests_gx_total` metric instead with the respective `code` label
- `diameter_requests_nasreq_rejects_total` - use the `diameter_nasreq_errors_total` metric instead with the respective `code` label
- `diameter_requests_nasreq_unknown_session_total` - use the `diameter_nasreq_errors_total` metric instead with the respective `code` label

For more information, see the [Migration guide](#metrics-update).

### Removal of TPOSS API Gateway dependency

TPOSS API Gateway will be removed as a dependency of the TPOSS chart. The future TPOSS API Gateway deployments should be deployed using the TPOSS API Gateway chart. The next version of TPOSS will provide instructions on how to configure and deploy TPOSS API Gateway using a separate chart.

## Features

### Rootless TPOSS and SFTP containers

>**CAUTION:** The configuration of SFTP container has incompatible changes. Read the paragraph and the [Migration guide](#rootless-sftp-container) carefully before upgrading.

Since the TPOSS 6.12.0 release, both TPOSS and SFTP containers are rootless.

The TPOSS container is launched by the `runner` user with UID and GID `1000`. The SFTP container is launched by the `sftp` user with the same UID and GID.

The username of the SFTP user is set to `sftp` and can't be changed anymore. You can still provide the password of the SFTP user using the **sftp.sftpConfig.password** configuration option, but it must be always hashed using the `crypt` algorithm. Since the TPOSS version 6.12.0, the whole configuration of the SFTP user supports only the **sftp.sftpConfig.password** option.

For more information, see the [Migration guide](#rootless-sftp-container).

If you still need to do something that requires `root` permissions, enable the `networkUtility` sidecar container using the following configuration options:

```yaml
networkUtility:
  enabled: false
  image:
    repository: quay.io/travelping/nettools
    tag: v1.12.0
    pullPolicy: IfNotPresent
```

For more information about the `networkUtility` container, go to the [TPOSS chart configuration](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#debug-container-with-network-utilities) document.

### New B2BInternet tariff

TPOSS in version 6.12.0 introduces a new tariff - `B2BInternet`. TPOSS provisions the tariff during start-up as all other tariffs. TPOSS allocates both time and volume quota for the subscribers with the new tariff based on the following configuration parameters:

```yaml
scg:
  rating_groups_validity_time:
    b2binternet: 180

  b2b_internet_quota: 1073741824
```

You can use these new configuration options to configure the rating group associated with the new tariff:

```yaml
scg:
  adc_rules:
    b2binternet: "B2BInternet"

  rating_groups:
    b2binternet: 3225
```

For more information, see the [Charging rules configuration](https://docs.cennso.com/components/tposs/6.15/configuration/charging.md#charging-rules-configuration) section.

### The liveness and readiness probes are enabled by default

As the Kubernetes liveness and readiness probes are required in the TPOSS cluster, they were enabled by default since TPOSS 6.12.0. You can still disable them using the following configuration option:

```yaml
probes:
  enabled: true
```

For more information, see the [TPOSS chart configuration](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#tposs-liveness-and-readiness-probes-configuration) document.

### Possibility to configure liveness and readiness probes

TPOSS in version 6.12.0 provides the possibility to not only enable or disable the liveness and readiness probes, but also to customize their behaviour. To do so, use these new configuration options:

```yaml
probes:
  liveness:
    initialDelaySeconds: 15
    timeoutSeconds: 3
    periodSeconds: 10
    failureThreshold: 3
  readiness:
    initialDelaySeconds: 20
    timeoutSeconds: 3
    periodSeconds: 10
    failureThreshold: 3
```

For more information, see the [TPOSS chart configuration](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#tposs-liveness-and-readiness-probes-configuration) document and the [Official Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes).

### TPOSS API Gateway updated to version `v1.6.4`

TPOSS API Gateway chart was updated to version `1.6.4` and the image was updated to version `v1.6.4`. The main change is the introduction of a rootless image of TPOSS API Gateway. That change does not bring any significant impact since TPOSS API Gateway does not use any persistent volumes or operations that must be executed by the root user.

### Optimization of the IMEI change during subscriber authorization

Previous TPOSS versions fetched an IMEI of the user from the database to check that it was not changed during authorization or accounting procedures. The new version of TPOSS skips the unnecessary database queries to fetch an IMEI if it was already prefetched before.

### Possibility to specify configuration options for the underlying BEAM virtual machine

TPOSS in version `6.12.0` allows you to specify configuration options for the underlying BEAM virtual machine:

```yaml
tposs_elixir_erl_options: ""
```

To learn more about the available configuration options, read the [official Erlang documentation](https://www.erlang.org/docs/27/apps/erts/erl_cmd.html#flags).

### Redundant Diameter options removed

The following Diameter options were redundant and removed as a result:

- `scg.diameter.scg_origin_host`
- `scg.diameter.scg_origin_realm`
- `scg.diameter.scg_listener`
- `scg.diameter.redirection_url`

This has no impact on the future deployments since these configuration options were not used by TPOSS for a long time.

### The `nettools` container version updated

The `nettools` container was updated to version `v1.12.0`. The container is used as a base image of the [init script](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#tposs-init-script-configuration) and the [debug container](https://docs.cennso.com/components/tposs/6.15/installation/configuration.md#debug-container-with-network-utilities). There is no expected impact as a result of this version update.

### Database and Diameter metrics improvements

TPOSS in version `6.12.0` provides significant metrics improvements.

#### jemalloc metrics

New [jemalloc](https://jemalloc.net/) metrics were added to track memory consumption of IP pools. For more information about the `jemalloc` metrics, see the [Metrics](https://docs.cennso.com/components/tposs/6.15/metrics.md#jemalloc-metrics) document.

#### New metrics

>**NOTE:** The official TPOSS dashboard that is distributed along with the official chart uses new metrics. If you use a custom dashboard, make sure that you have adjusted it to use new metrics.

TPOSS in version `6.12.0` provides the following new metrics:

- `cluster_nodes`
- `ip_pool_block_used_ips_pct`
- `ip_pool_block_total`
- `diameter_rar_errors_total`
- `diameter_nasreq_errors_total`
- `diameter_requests_rtt_milliseconds_bucket`
- `rating_group_total`

The existing Diameter metrics such as `diameter_requests_gx_total`, `diameter_requests_gy_total`, and `diameter_requests_nasreq_total` have a new label - `type`. The label value represents the type of Diameter request received by TPOSS.

The existing Diameter metrics such as `diameter_requests_gx_errors_total`, `diameter_requests_gy_errors_total`, and `diameter_nasreq_errors_total` have a new label - `code`. The label value represents the `Result-Code` value with which the request was failed.

For more information, see the [Metrics](https://docs.cennso.com/components/tposs/6.15/metrics.md) document.

#### New metrics configuration

New configuration options were added to control the size of buckets for the histogram metrics. You can use the following configuration parameter to control the size of buckets for the time TPOSS takes to handle RADIUS requests:

```yaml
radius:
  # The prometheus histogram buckets where RADIUS requests handling time collected (in milliseconds)
  rtt_histogram_buckets: "10, 30, 50, 75, 100, 1000, 2000"
```

You can use the following configuration parameter to control the size of buckets for the time TPOSS takes to handle Diameter requests:

```yaml
scg:
  diameter:
    rtt_buckets: "10, 30, 50, 75, 100, 1000, 2000"
```

You can use the following configuration parameters to control the size of buckets for the time the database takes to handle queries executed by TPOSS and the time queries spent in a queue before TPOSS can find a free database connection:

```yaml
database:
  # The values configure upper limits of time intervals in milliseconds of round trip time of database queries
  # and translated into prometheus histogram buckets.
  query_histogram_buckets: "5, 20, 50, 100, 250, 500"
  # The values configure upper limits of time intervals in milliseconds spent by queries in the queue
  # and translated into prometheus histogram buckets.
  queue_histogram_buckets: "1, 5, 20, 50, 100, 200"
```

### Possibility to disable the idle timer

>**NOTE:** This feature is experimental. The new behaviour is disabled by default to preserve backward compatibility with the previous versions of TPOSS.

TPOSS in version `6.12.0` provides the possibility to disable the [idle timer](https://docs.cennso.com/components/tposs/6.15/configuration/session.md#idle-sessions). You can do it using the new configuration option:

```yaml
sessions:
  idle_timer_enabled: true
```

TPOSS does not create idle timers if the value of this configuration option is set to `false`. If idle timers are switched off, the performance improves since TPOSS does not have to maintain idle timers and execute respective database queries. If update requests do not arrive to TPOSS, such sessions are still stored in the TPOSS database. Such sessions are terminated using either the usual termination path or when a sessions duplication case appears.

### Possibility to disable the global lock

>**NOTE:** This feature is experimental. The new behavior is disabled by default to preserve backward compatibility with the previous versions of TPOSS.

TPOSS uses a global lock across all the TPOSS instances within the cluster to avoid potential race conditions. In the new version of TPOSS, we provide this new configuration option to disable the lock:

```yaml
sessions:
  global_lock_enabled: true
```

If the value of this option is set to `false`, the lock is disabled. The main advantage of switching off the global lock is reducing resource consumption (CPU). At the same time, it may lead to the unexpected behaviour if TPOSS receives two RADIUS (or Diameter) requests associated with the same identifier (`IMSI` or `Session-Id`).

### PCS and CCS cache

>**NOTE:** Both of these features are experimental. The new behavior is disabled by default to preserve backward compatibility with the previous versions of TPOSS.

TPOSS in version `6.12.0` provides two types of in-memory caches to improve performance and reduce the database queries:

- PCS cache
- CCS cache

The PCS cache is used for service and network sessions and is controlled by the following configuration option:

```yaml
sessions:
  cache: false
  cache_backend: ets
  redis:
    host: "localhost"
    port: 6379
    username: nil
    password: nil
    connections: 50
```

If the cache is enabled, TPOSS uses the internal in-memory storage to store sessions during the establishment period. In other words, the sessions are not inserted into database when handling the Diameter NASREQ-AAR, Gx-I, and Gy-I requests. The session is inserted into the database only after it is fully established - when handling the Diameter NASREQ-ACR request.

Two types of cache backends are currently supported:

- `ets`
- `redis`

>**NOTE:** If the **sessions.cache_backend** is set to `ets`, it is important to use the `sticky sessions` feature of Diameter Proxy. Otherwise, the behaviour of TPOSS is undefined. For more information about the Diameter Proxy feature, see the [Diameter Proxy transports and routing configuration](https://docs.cennso.com/docs/components/dpr/1.1.0/configuration/routing#transports-and-routing-configuration).

The new feature is added to reduce the number of database queries that are executed when handling charging requests - `CCS cache`. You can control this feature by this new configuration option:

```yaml
ccs:
  cache:
    enabled: false
```

If the CCS cache is enabled, TPOSS stores charging account and balance in the in-memory cache when handling charging requests.

### Possibility to not use separate database table to store Framed-IP addresses

>**NOTE:** This feature is experimental. The new behavior is disabled by default to preserve backward compatibility with the previous versions of TPOSS.

By default, TPOSS stores Framed-IP addresses in the separate `ip` table. In the new version of TPOSS, you can disable this behavior to reduce the number of database queries. You can control this behaviour using this new configuration option:

```yaml
sessions:
  store_ip_within_network_sessions: false
```

If the value of the option is set to `true`, the Framed-IP addresses are stored only in the network sessions table and only this table is used to manage IP addresses.

## Fixes

### Possibility to cache DNS queries when sending RADIUS Disconnect requests

TPOSS in version 6.12.0 uses DNS cache to resolve a hostname of a RADIUS endpoint when possible. That significantly reduces CPU usage in the case when a high rate of RADIUS requests are sent by TPOSS.

### Fix the time units for the database histogram metrics

The previous versions of TPOSS contained inaccurate values in the database histogram metrics because of the wrong conversion between different time units. This inaccuracy is fixed in TPOSS 6.12.0.

## Migration guide

### `6.11.0` -> `6.12.0`

The new version of TPOSS does not require a database migration.

The default values of all new configuration options that were introduced in the release do not change the behavior of TPOSS in comparison to the previous versions. The main reason of this is to preserve backward compatibility. If you want to enable any new configuration option, read the release notes carefully since some of the new options are **experimental** and may lead to the unexpected behaviour.

The new release provides significant changes that may affect your deployments:

- Rootless SFTP container
- Metrics update
- Deprecation of the `vxlan` container

### Rootless SFTP container

On of the most significant change is that both TPOSS and SFTP containers are rootless. The main impact is visible after the update of the SFTP container.

In the previous versions of TPOSS you could specify SFTP user credentials:

```yaml
sftp:
  sftpConfig:
    username: sftp
    password: password
    encrypted: false
    uid: 1000
    gid: 1000
```

In the new version of TPOSS, you can only specify the password:

```yaml
sftp:
  sftpConfig:
    password: "{GENERATED-PASSWORD}"
```

>**NOTE:** The username of the SFTP user is `sftp` and can not be changed anymore. The value of the **sftp.sftpConfig.password** must be hashed with the `crypt` algorithm.

For example:

```yaml
sftp:
  sftpConfig:
    password: "$1$RsBlW1hk$/ISHFEK0yrEX8M7x9.lbB1"
```

`$1$RsBlW1hk$/ISHFEK0yrEX8M7x9.lbB1` is the hashed clear-text `sftp-pass` password. You can get the hash of a password given in plain text using this command:

```
openssl passwd {PASSWORD}
```

>**NOTE:** The SFTP key pair used by the server is regenerated in the new release. The client accepts new keys when establishing a connection to the updated SFTP server.

### Metrics update

The update of metrics does not lead to any breakage after the deployment of the new version of TPOSS. All the changes are backward compatible. However, some metrics are deprecated and will be removed in the next TPOSS releases. For more information, see the [Deprecation notice](#Deprecation-of-metrics) in the release notes. Make sure that you migrated your dashboard to use new metrics. For more information about the new metrics, see the [list of new metrics](#new-metrics) in the release notes and go to the [Metrics](https://docs.cennso.com/components/tposs/6.15/metrics.md) document.

### Deprecation of the `vxlan` container

Since this release of TPOSS, the `vxlan` container and all the related configuration options are deprecated and will be removed in the future releases. It is recommended to use [Kubernetes services](https://kubernetes.io/docs/concepts/services-networking/service/) to communicate with the TPOSS cluster. TPOSS chart does not provide abilities to communicate with external clusters. Make sure that this feature is not used in your setup and prepare a proper replacement. For more information about deprecation, see the [Deprecation notice](#deprecation-of-the-vxlan-container-and-the-related-configuration-options) in the release notes.
