{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixops/issues/445","repository_url":"https://api.github.com/repos/NixOS/nixops","labels_url":"https://api.github.com/repos/NixOS/nixops/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixops/issues/445/comments","events_url":"https://api.github.com/repos/NixOS/nixops/issues/445/events","html_url":"https://github.com/NixOS/nixops/issues/445","id":158476661,"number":445,"title":"send_keys seems to run before users and groups are created","user":{"login":"k0001","id":3302,"avatar_url":"https://avatars.githubusercontent.com/u/3302?v=3","gravatar_id":"","url":"https://api.github.com/users/k0001","html_url":"https://github.com/k0001","followers_url":"https://api.github.com/users/k0001/followers","following_url":"https://api.github.com/users/k0001/following{/other_user}","gists_url":"https://api.github.com/users/k0001/gists{/gist_id}","starred_url":"https://api.github.com/users/k0001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0001/subscriptions","organizations_url":"https://api.github.com/users/k0001/orgs","repos_url":"https://api.github.com/users/k0001/repos","events_url":"https://api.github.com/users/k0001/events{/privacy}","received_events_url":"https://api.github.com/users/k0001/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixops/labels/bug","name":"bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-04T00:17:48Z","updated_at":"2016-06-07T12:02:50Z","closed_at":"2016-06-07T12:02:50Z","body":"When trying to add a key to `deployment.keys` and have it assigned to a particular user and group, send_keys fails to find that user and group.\r\n\r\nExample:\r\n\r\nIn my my logical network description:\r\n\r\n```nix\r\n      users.extraGroups.foo = {\r\n        gid = 4636;\r\n      };\r\n      users.extraUsers.foo = {\r\n        uid = 4636;\r\n        name = \"foo\";\r\n        group = \"foo\";\r\n      };\r\n```\r\n\r\nIn my VirtualBox physical network description:\r\n\r\n```nix\r\n       deployment.keys = {                                                        \r\n         \"credentials1\" = {                                        \r\n           permissions = \"0600\";                                                  \r\n           user = \"foo\";                                                          \r\n           group = \"foo\";                                                         \r\n           text = \"example\";\r\n         };                                                                       \r\n       };  \r\n```\r\n\r\nI get this error when running `nixos deploy`:\r\n\r\n```\r\nthe-one-host> uploading key ‘credentials1’...\r\nthe-one-host> chown: invalid user: ‘foo:foo’\r\nthe-one-host> error: command ‘['ssh', '-oControlPath=/tmp/nixops-ssh-tmpa9S61S/master-socket', '-p', '22', '-i', '/tmp/nixops-tmp5lhMzD/id_nixops-the-one-host', '-p', '22', '-i', '/tmp/nixops-tmp5lhMzD/id_nixops-the-one-host', '-x', 'root@192.168.56.101', '--', u\"chown 'foo:foo' '/run/keys/credentials1' && chmod '0600' '/run/keys/credentials1'\"]’ failed on machine ‘the-one-host’ (exit code 1)\r\n```"},"comment":{"url":"https://api.github.com/repos/NixOS/nixops/issues/comments/224259746","html_url":"https://github.com/NixOS/nixops/issues/445#issuecomment-224259746","issue_url":"https://api.github.com/repos/NixOS/nixops/issues/445","id":224259746,"user":{"login":"domenkozar","id":126339,"avatar_url":"https://avatars.githubusercontent.com/u/126339?v=3","gravatar_id":"","url":"https://api.github.com/users/domenkozar","html_url":"https://github.com/domenkozar","followers_url":"https://api.github.com/users/domenkozar/followers","following_url":"https://api.github.com/users/domenkozar/following{/other_user}","gists_url":"https://api.github.com/users/domenkozar/gists{/gist_id}","starred_url":"https://api.github.com/users/domenkozar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenkozar/subscriptions","organizations_url":"https://api.github.com/users/domenkozar/orgs","repos_url":"https://api.github.com/users/domenkozar/repos","events_url":"https://api.github.com/users/domenkozar/events{/privacy}","received_events_url":"https://api.github.com/users/domenkozar/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T12:02:50Z","updated_at":"2016-06-07T12:02:50Z","body":"Thanks, let's have only one issue open."}}
{"actor":{"display_login":"domenkozar"}}