{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/50443","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/50443/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/50443/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/50443/events","html_url":"https://github.com/NixOS/nixpkgs/issues/50443","id":381414904,"node_id":"MDU6SXNzdWUzODE0MTQ5MDQ=","number":50443,"title":"kubelet service doesn't start on a system with swap","user":{"login":"MasseGuillaume","id":921490,"node_id":"MDQ6VXNlcjkyMTQ5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/921490?v=4","gravatar_id":"","url":"https://api.github.com/users/MasseGuillaume","html_url":"https://github.com/MasseGuillaume","followers_url":"https://api.github.com/users/MasseGuillaume/followers","following_url":"https://api.github.com/users/MasseGuillaume/following{/other_user}","gists_url":"https://api.github.com/users/MasseGuillaume/gists{/gist_id}","starred_url":"https://api.github.com/users/MasseGuillaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasseGuillaume/subscriptions","organizations_url":"https://api.github.com/users/MasseGuillaume/orgs","repos_url":"https://api.github.com/users/MasseGuillaume/repos","events_url":"https://api.github.com/users/MasseGuillaume/events{/privacy}","received_events_url":"https://api.github.com/users/MasseGuillaume/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-16T02:00:06Z","updated_at":"2018-11-22T02:12:22Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Steps to reproduce\r\n\r\n```\r\n  # machine with swapDevices\r\n\r\n  # kubernetes default config\r\n  services = {\r\n    kubernetes = {\r\n      roles = [\"master\" \"node\"];\r\n    };\r\n  };\r\n```\r\n\r\n```bash\r\n sudo journalctl -u kubelet.service | grep \"failed to run\"\r\n\r\nNov 15 20:10:05 nixos kubelet[1391]: F1115 20:10:05.994998    1391 server.go:262] failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename                                Type                Size        Used        Priority /dev/sda2                               partition        8388604        0        -2]\r\n```\r\n\r\nMore details: https://github.com/kubernetes/kubeadm/issues/610\r\n\r\nWorkaround: Disable swap: `sudo swapoff -a` & Restart service: `sudo systemctl restart kubelet.service`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/440891395","html_url":"https://github.com/NixOS/nixpkgs/issues/50443#issuecomment-440891395","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/50443","id":440891395,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDg5MTM5NQ==","user":{"login":"MasseGuillaume","id":921490,"node_id":"MDQ6VXNlcjkyMTQ5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/921490?v=4","gravatar_id":"","url":"https://api.github.com/users/MasseGuillaume","html_url":"https://github.com/MasseGuillaume","followers_url":"https://api.github.com/users/MasseGuillaume/followers","following_url":"https://api.github.com/users/MasseGuillaume/following{/other_user}","gists_url":"https://api.github.com/users/MasseGuillaume/gists{/gist_id}","starred_url":"https://api.github.com/users/MasseGuillaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasseGuillaume/subscriptions","organizations_url":"https://api.github.com/users/MasseGuillaume/orgs","repos_url":"https://api.github.com/users/MasseGuillaume/repos","events_url":"https://api.github.com/users/MasseGuillaume/events{/privacy}","received_events_url":"https://api.github.com/users/MasseGuillaume/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T02:12:22Z","updated_at":"2018-11-22T02:12:22Z","author_association":"CONTRIBUTOR","body":"@johanot \r\n\r\nyou mean: `services.kubernetes.kubelet.extraOpts = \"--fail-swap-on=false\";`\r\n\r\n(it's a string for some reason\r\nhttps://github.com/NixOS/nixpkgs/blob/21517c60d948106b53becc9bd26e893c13f1a58c/nixos/modules/services/cluster/kubernetes/default.nix#L482).\r\n\r\nI think ideally this should be in the default configuration if we detect a swap device. This way, it would work out of the box.\r\n\r\n"}}
{"actor":{"display_login":"MasseGuillaume"}}