diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2019-11-24 20:53:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-24 20:53:44 +0000 |
commit | e315f34bb35eac4118ccedc18bec483fb56cc65a (patch) | |
tree | 130117155e9e02b3b81b6a6af9ee4160fe441b5c /nixos | |
parent | 013b9a853bbfb7ba00a88e49e48f8df4730b10ff (diff) | |
parent | 0f5366d9e5cdfbb058566f0fdb8d55ab305fcee0 (diff) | |
download | nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar.gz nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar.bz2 nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar.lz nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar.xz nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.tar.zst nixlib-e315f34bb35eac4118ccedc18bec483fb56cc65a.zip |
Merge pull request #53032 from netixx/update-openvswitch-2.9.2
openvswitch: 2.5.4 -> 2.12.0
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/virtualisation/openvswitch.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/openvswitch.nix b/nixos/modules/virtualisation/openvswitch.nix index edec37402308..6b8ad83661fe 100644 --- a/nixos/modules/virtualisation/openvswitch.nix +++ b/nixos/modules/virtualisation/openvswitch.nix @@ -42,6 +42,9 @@ in { default = false; description = '' Whether to start racoon service for openvswitch. + Supported only if openvswitch version is less than 2.6.0. + Use <literal>virtualisation.vswitch.package = pkgs.openvswitch-lts</literal> + for a version that supports ipsec over GRE. ''; }; }; @@ -89,6 +92,13 @@ in { "${cfg.package}/share/openvswitch/vswitch.ovsschema" fi chmod -R +w /var/db/openvswitch + if ${cfg.package}/bin/ovsdb-tool needs-conversion /var/db/openvswitch/conf.db | grep -q "yes" + then + echo "Performing database upgrade" + ${cfg.package}/bin/ovsdb-tool convert /var/db/openvswitch/conf.db + else + echo "Database already up to date" + fi ''; serviceConfig = { ExecStart = @@ -133,7 +143,7 @@ in { }; } - (mkIf cfg.ipsec { + (mkIf (cfg.ipsec && (versionOlder cfg.package.version "2.6.0")) { services.racoon.enable = true; services.racoon.configPath = "${runDir}/ipsec/etc/racoon/racoon.conf"; @@ -172,5 +182,4 @@ in { ''; }; })])); - } |