Skip to content

Upgrades

This site summarizes breaking changes you should consider when upgrading between major releases. You should also check the ChangeLog for a complete list of changes.

IfState 2.0

Cleanup by default

In the previos major release IfState did not touch settings by default when they were not specified in the configuration. With this major release the parameters.defaults_builtin setting will cleanup varius settings by default:

parameters:
  defaults_builtin:
    - match:
      - ifname: ''
      clear_addresses: true
      clear_fdb: true
      clear_neighbours: true
      clear_tc: true
      link:
        state: down
        master: null

Configuration filename

The default configuration filename has been changed.

/etc/ifstate/ifstate.yaml

/etc/ifstate/config.yml

Configuration schema

The configuration schema got severial breaking changes so you must upgrade the configuration:

Moved settings

The cshaper, defaults and ignore settings has been moved into the parameters hierarchy:

parameters:
  cshaper: # …
  defaults: # …
  ignore: # …

interfaces: # …
cshaper: # …
defaults: # …
ignore: # …


interfaces: # …

Interfaces settings

The interfaces settings have been changed from a list to an object with the interface's names as keys. The properties in the link section which where used to identify physical interfaces (permaddr and businfo) are now replaced with a dedicated identify section (including device tree support).

interfaces:
  # per interface settings
  eth0:
    # ip addresses (`ip address`)
    addresses:
    - 192.0.2.254/24
    # link settings (`ip link`)
    link:
      state: up
      kind: physical
    identify:
      parent_dev_name: 0000:00:1f.6
      parent_dev_bus_name: pci
interfaces:
  # list of interface settings
  - name: eth0
    # ip addresses (`ip address`)
    addresses:
    - 192.0.2.254/24
    # link settings (`ip link`)
    link:
      state: up
      kind: physical

      # implicit PCI bus address
      businfo: 0000:00:1f.6

Sysctl settings

The sysctl setting have been moved one level up in the hierarchy.

sysctl:
  all:
    ipv6:
      forwarding: 1
# …


namespaces:
  sysctl:
    all:
      ipv6:
        forwarding: 1
  # …
options:
  sysctl:
    all:
      ipv6:
        forwarding: 1
# …
namespaces:
  options:
    sysctl:
      all:
        ipv6:
          forwarding: 1
  # …

Wireguard settings

The peers setting have been changed from a list to an object where the peer's public keys are used as keys.

interfaces:
  wg0:
    addresses:
    - 192.0.2.1/25
    link:
      state: up
      kind: wireguard
    wireguard:
      private_key: !include /etc/wireguard/peer_A.key
      peers:
        oef+ZSlMWWCF1bEHPaw04TmjPyHKcz2b81njwIQI0xA=:
          endpoint: 198.51.100.2:4711
          allowedips:
          - 192.0.2.128/25
interfaces:
  - name: wg0
    addresses:
    - 192.0.2.1/25
    link:
      state: up
      kind: wireguard
    wireguard:
      private_key: !include /etc/wireguard/peer_A.key
      peers:
        - public_key: oef+ZSlMWWCF1bEHPaw04TmjPyHKcz2b81njwIQI0xA=
          endpoint: 198.51.100.2:4711
          allowedips:
          - 192.0.2.128/25