{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/1402","labels_url":"https://api.github.com/repos/systemd/systemd/issues/1402/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/1402/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/1402/events","html_url":"https://github.com/systemd/systemd/pull/1402","id":108836414,"number":1402,"title":"login: allow re-using users","user":{"login":"dvdhrm","id":623857,"avatar_url":"https://avatars.githubusercontent.com/u/623857?v=3","gravatar_id":"","url":"https://api.github.com/users/dvdhrm","html_url":"https://github.com/dvdhrm","followers_url":"https://api.github.com/users/dvdhrm/followers","following_url":"https://api.github.com/users/dvdhrm/following{/other_user}","gists_url":"https://api.github.com/users/dvdhrm/gists{/gist_id}","starred_url":"https://api.github.com/users/dvdhrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvdhrm/subscriptions","organizations_url":"https://api.github.com/users/dvdhrm/orgs","repos_url":"https://api.github.com/users/dvdhrm/repos","events_url":"https://api.github.com/users/dvdhrm/events{/privacy}","received_events_url":"https://api.github.com/users/dvdhrm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/login","name":"login","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-29T10:02:57Z","updated_at":"2015-10-23T13:12:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/1402","html_url":"https://github.com/systemd/systemd/pull/1402","diff_url":"https://github.com/systemd/systemd/pull/1402.diff","patch_url":"https://github.com/systemd/systemd/pull/1402.patch"},"body":"A bunch of commits to clean up the User object in systemd-logind, and eventually allow calling `user_start()` on a user that is already stopping. This is required to allow new login while the user is currently shutting down.\r\n\r\nNote that this series does not *really* fix the issue. However, I cannot see how the series makes anything worse, so I think we can safely apply it. Anyway, the issue that is left, is:\r\n\r\n```\r\nSep 29 11:55:03 david-t2 systemd[1]: Requested transaction contradicts existing jobs: Transaction is destructive.\r\nSep 29 11:55:03 david-t2 systemd-logind[734]: Failed to start user slice: Transaction is destructive.\r\nSep 29 11:55:03 david-t2 su[1980]: pam_systemd(su-l:session): Failed to create session: Resource deadlock avoided\r\n```\r\n\r\nThat is, if the user-service is still shutting down, queing \"START\" for the slice (which is still running, but queued for removal) causes this transaction-error. I could make systemd-logind wait for the queued jobs to finish, before re-queuing the START jobs. However, I really cannot understand why pid1 cannot figure it out. This should not be the burden of the user, but of pid1 to resolve, or what am I missing?\r\n\r\nIdeas?"},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/150567146","html_url":"https://github.com/systemd/systemd/pull/1402#issuecomment-150567146","issue_url":"https://api.github.com/repos/systemd/systemd/issues/1402","id":150567146,"user":{"login":"dvdhrm","id":623857,"avatar_url":"https://avatars.githubusercontent.com/u/623857?v=3","gravatar_id":"","url":"https://api.github.com/users/dvdhrm","html_url":"https://github.com/dvdhrm","followers_url":"https://api.github.com/users/dvdhrm/followers","following_url":"https://api.github.com/users/dvdhrm/following{/other_user}","gists_url":"https://api.github.com/users/dvdhrm/gists{/gist_id}","starred_url":"https://api.github.com/users/dvdhrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvdhrm/subscriptions","organizations_url":"https://api.github.com/users/dvdhrm/orgs","repos_url":"https://api.github.com/users/dvdhrm/repos","events_url":"https://api.github.com/users/dvdhrm/events{/privacy}","received_events_url":"https://api.github.com/users/dvdhrm/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T13:12:02Z","updated_at":"2015-10-23T13:12:02Z","body":"Did you test this based on this branch, or on master? Because your snippet does not fix the issue entirely, but it does help on top of this branch.\r\n\r\nHowever, your snippet breaks on pid1-reloading (which spills out JobRemoved regardless whether it was removed). I'm not entirely sure what to do there, @poettering? I mean, what happens if you reload/reexecute pid1 if there are queued jobs? Do you get JobRemoved followed by JobNew? What is logind supposed to do? This doesn't make much sense to me and looks broken right now."}}