{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34336","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34336/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34336/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34336/events","html_url":"https://github.com/NixOS/nixpkgs/issues/34336","id":292139139,"node_id":"MDU6SXNzdWUyOTIxMzkxMzk=","number":34336,"title":"networking.vswitches option does not work","user":{"login":"netixx","id":1488603,"node_id":"MDQ6VXNlcjE0ODg2MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/1488603?v=4","gravatar_id":"","url":"https://api.github.com/users/netixx","html_url":"https://github.com/netixx","followers_url":"https://api.github.com/users/netixx/followers","following_url":"https://api.github.com/users/netixx/following{/other_user}","gists_url":"https://api.github.com/users/netixx/gists{/gist_id}","starred_url":"https://api.github.com/users/netixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netixx/subscriptions","organizations_url":"https://api.github.com/users/netixx/orgs","repos_url":"https://api.github.com/users/netixx/repos","events_url":"https://api.github.com/users/netixx/events{/privacy}","received_events_url":"https://api.github.com/users/netixx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-27T17:54:15Z","updated_at":"2018-10-28T19:11:13Z","closed_at":"2018-10-28T19:11:13Z","author_association":"CONTRIBUTOR","body":"## Issue description\r\nWhen using `networking.vswitches` configuration keys, system fails to reliably bring up the switch.\r\n\r\nLogs show that the down script is executed just after the up script because de underlying device is down `vsint-netdev.service: Unit is bound to inactive unit sys-subsystem-net-devices-vsint.device. Stopping, too.`:\r\n\r\n> Feb 02 18:15:45 nixos systemd[1]: Starting Open vSwitch Interface vsint...\r\n> Feb 02 18:15:45 nixos vsint-netdev-start[27533]: Removing old Open vSwitch vsint...\r\n> Feb 02 18:15:45 nixos vsint-netdev-start[27533]: Adding Open vSwitch vsint...\r\n> Feb 02 18:15:45 nixos ovs-vsctl[27534]: ovs|00001|vsctl|INFO|Called as ovs-vsctl -- add-br vsint -- add-port vsint LAN --\r\n> Feb 02 18:15:45 nixos vsint-netdev-start[27533]: Adding OpenFlow rules for Open vSwitch vsint...\r\n> Feb 02 18:15:45 nixos systemd[1]: Started Open vSwitch Interface vsint.\r\n> Feb 02 18:15:45 nixos systemd[1]: vsint-netdev.service: Unit is bound to inactive unit sys-subsystem-net-devices-vsint.device. Stopping\r\n> Feb 02 18:15:45 nixos systemd[1]: Stopping Open vSwitch Interface vsint...\r\n> Feb 02 18:15:45 nixos ovs-vsctl[27550]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --if-exists del-br vsint\r\n> Feb 02 18:15:45 nixos systemd[1]: Stopped Open vSwitch Interface vsint.\r\n\r\nIf it is of any relevance, I was working with renamed interfaces (using udev), inside a Virtualbox VM:\r\n```\r\nservices.udev.extraRules= ''\r\n  KERNEL==\"eth*\", ATTR{address}==\"xx:xx:xx:xx:xx:xx\", NAME=\"LAN\"\r\n''\r\n```\r\n\r\nRemoving the `sys-subsystem-net-devices-vsint.device` dependency from `BindsTo=` seems to restore normal behaviour (although we loose unit shutdown when the device is disabled). Since the down script is basically deleting the device (maybe test this regarding flows), this dependency might not be necessary.\r\n\r\nI have the VM close by and can perform tests easily.\r\nThank you for your help\r\n### Steps to reproduce\r\n\r\n1. Configure openvswitch bridge:\r\n``\r\n  networking.vswitches = { \r\n    vsint = { \r\n      interfaces=[\"LAN\"];\r\n    };\r\n  };  \r\n``\r\n2. Rebuild system `nixos-rebuild switch`\r\n3. Run `ovs-vsctl show`, no (v)switch appears\r\n4. Reboot does not fix the problem\r\n\r\n## Technical details\r\n\r\nPlease run `nix-shell -p nix-info --run \"nix-info -m\"` and paste the\r\nresults.\r\n - system: `\"x86_64-linux\"`\r\n - host os: `Linux 4.9.65, NixOS, 17.09.2253.559ebb7ed02 (Hummingbird)`\r\n - multi-user?: `no`\r\n - sandbox: `yes`\r\n - version: `nix-env (Nix) 1.11.15`\r\n - channels(root): `\"nixos-17.09.2253.559ebb7ed02\"`\r\n - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/433732821","html_url":"https://github.com/NixOS/nixpkgs/issues/34336#issuecomment-433732821","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34336","id":433732821,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzczMjgyMQ==","user":{"login":"netixx","id":1488603,"node_id":"MDQ6VXNlcjE0ODg2MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/1488603?v=4","gravatar_id":"","url":"https://api.github.com/users/netixx","html_url":"https://github.com/netixx","followers_url":"https://api.github.com/users/netixx/followers","following_url":"https://api.github.com/users/netixx/following{/other_user}","gists_url":"https://api.github.com/users/netixx/gists{/gist_id}","starred_url":"https://api.github.com/users/netixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netixx/subscriptions","organizations_url":"https://api.github.com/users/netixx/orgs","repos_url":"https://api.github.com/users/netixx/repos","events_url":"https://api.github.com/users/netixx/events{/privacy}","received_events_url":"https://api.github.com/users/netixx/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T19:11:13Z","updated_at":"2018-10-28T19:11:13Z","author_association":"CONTRIBUTOR","body":"This issue is resolved by the referenced PR by using systemd-networkd "}}
{"actor":{"display_login":"netixx"}}