{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15682","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15682/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15682/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15682/events","html_url":"https://github.com/NixOS/nixpkgs/issues/15682","id":156638951,"node_id":"MDU6SXNzdWUxNTY2Mzg5NTE=","number":15682,"title":"When enable private network, NixOS container fail to start if hostname too long","user":{"login":"yuchangyuan","id":1221448,"node_id":"MDQ6VXNlcjEyMjE0NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1221448?v=4","gravatar_id":"","url":"https://api.github.com/users/yuchangyuan","html_url":"https://github.com/yuchangyuan","followers_url":"https://api.github.com/users/yuchangyuan/followers","following_url":"https://api.github.com/users/yuchangyuan/following{/other_user}","gists_url":"https://api.github.com/users/yuchangyuan/gists{/gist_id}","starred_url":"https://api.github.com/users/yuchangyuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuchangyuan/subscriptions","organizations_url":"https://api.github.com/users/yuchangyuan/orgs","repos_url":"https://api.github.com/users/yuchangyuan/repos","events_url":"https://api.github.com/users/yuchangyuan/events{/privacy}","received_events_url":"https://api.github.com/users/yuchangyuan/received_events","type":"User","site_admin":false},"labels":[{"id":6314750,"node_id":"MDU6TGFiZWw2MzE0NzUw","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/0.kind:%20bug","name":"0.kind: bug","color":"84b6eb","default":false},{"id":60265212,"node_id":"MDU6TGFiZWw2MDI2NTIxMg==","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":{"login":"edolstra","id":1148549,"node_id":"MDQ6VXNlcjExNDg1NDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1148549?v=4","gravatar_id":"","url":"https://api.github.com/users/edolstra","html_url":"https://github.com/edolstra","followers_url":"https://api.github.com/users/edolstra/followers","following_url":"https://api.github.com/users/edolstra/following{/other_user}","gists_url":"https://api.github.com/users/edolstra/gists{/gist_id}","starred_url":"https://api.github.com/users/edolstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolstra/subscriptions","organizations_url":"https://api.github.com/users/edolstra/orgs","repos_url":"https://api.github.com/users/edolstra/repos","events_url":"https://api.github.com/users/edolstra/events{/privacy}","received_events_url":"https://api.github.com/users/edolstra/received_events","type":"User","site_admin":false},"assignees":[{"login":"edolstra","id":1148549,"node_id":"MDQ6VXNlcjExNDg1NDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1148549?v=4","gravatar_id":"","url":"https://api.github.com/users/edolstra","html_url":"https://github.com/edolstra","followers_url":"https://api.github.com/users/edolstra/followers","following_url":"https://api.github.com/users/edolstra/following{/other_user}","gists_url":"https://api.github.com/users/edolstra/gists{/gist_id}","starred_url":"https://api.github.com/users/edolstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolstra/subscriptions","organizations_url":"https://api.github.com/users/edolstra/orgs","repos_url":"https://api.github.com/users/edolstra/repos","events_url":"https://api.github.com/users/edolstra/events{/privacy}","received_events_url":"https://api.github.com/users/edolstra/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-05-25T00:31:45Z","updated_at":"2018-10-16T17:22:49Z","closed_at":"2017-11-08T20:35:09Z","author_association":"NONE","body":"## Issue description\n\nThe container will fail to start if hostname too long and privateNetwork = true.  Due the length limitation of network interface name, final created veth device name will not match \"ve-$hostname\", so cause container fail to start. I think we should check hostname length and warn user when this happen. \n### Steps to reproduce\n\nCreate any container on a machine which networking.hostName no less than 13 character, and enable private network.\n## Technical details\n- System: 16.03.836.aff03ae (Emu)\n- Nix version: nix-env (Nix) 1.11.2\n- Nixpkgs version: 16.03.836.aff03ae\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/430323732","html_url":"https://github.com/NixOS/nixpkgs/issues/15682#issuecomment-430323732","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15682","id":430323732,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDMyMzczMg==","user":{"login":"fkjogu","id":13063485,"node_id":"MDQ6VXNlcjEzMDYzNDg1","avatar_url":"https://avatars1.githubusercontent.com/u/13063485?v=4","gravatar_id":"","url":"https://api.github.com/users/fkjogu","html_url":"https://github.com/fkjogu","followers_url":"https://api.github.com/users/fkjogu/followers","following_url":"https://api.github.com/users/fkjogu/following{/other_user}","gists_url":"https://api.github.com/users/fkjogu/gists{/gist_id}","starred_url":"https://api.github.com/users/fkjogu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkjogu/subscriptions","organizations_url":"https://api.github.com/users/fkjogu/orgs","repos_url":"https://api.github.com/users/fkjogu/repos","events_url":"https://api.github.com/users/fkjogu/events{/privacy}","received_events_url":"https://api.github.com/users/fkjogu/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T17:22:49Z","updated_at":"2018-10-16T17:22:49Z","author_association":"NONE","body":"I just ran into this again with this (simplified) config:\r\n```\r\ncontainers.anamelongerthanten = {\r\n    # network configuration\r\n    privateNetwork = true;\r\n    hostAddress = \"10.0.1.21\";\r\n    localAddress = \"10.0.2.21\";\r\n    autoStart = true;\r\n\r\n    config =\r\n         { config, pkgs, ... }: { ...};\r\n};\r\n```\r\nI'm not too familiar with nix, does the assertion in #30127 also work when the interface name is derived from the container name?"}}
{"actor":{"display_login":"fkjogu"}}