{"action":"created","issue":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/426","labels_url":"https://api.github.com/repos/os-autoinst/openQA/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/os-autoinst/openQA/issues/426/comments","events_url":"https://api.github.com/repos/os-autoinst/openQA/issues/426/events","html_url":"https://github.com/os-autoinst/openQA/pull/426","id":102510431,"number":426,"title":"allow ISO to be a URL, download if needed","user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-22T06:56:05Z","updated_at":"2015-08-24T14:55:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/os-autoinst/openQA/pulls/426","html_url":"https://github.com/os-autoinst/openQA/pull/426","diff_url":"https://github.com/os-autoinst/openQA/pull/426.diff","patch_url":"https://github.com/os-autoinst/openQA/pull/426.patch"},"body":"This is an extremely stupid PoC implementation; it blocks the\r\nPOST request until the download is done, which likely isn't\r\nwhat we want. But for some value of 'work', it does work: when\r\nI tried it, the 'client' command returned some ERROR, but the\r\nISO was downloaded and the job scheduled and ran successfully.\r\n\r\nI think a sane implementation might use this 'GRU' thing I'm\r\nnow trying to grok. It might look something like 'create the\r\njobs, tell the GRU to download the ISO and notify workers when\r\nit's done, return job IDs'. It occurs to me that might be\r\nrather racy, though - if any other job-create-y type thing\r\nhappens while the ISO is downloading, workers will presumably\r\ntry and pick up the jobs and Bad Stuff will happen.\r\n\r\nPerhaps jobs should have some kind of 'not ready yet' attribute\r\nwhich workers could look for, and skip if it's set? Perhaps\r\nthey already do and I don't know about it?\r\n\r\nThis is probably also some kind of security hole if you don't\r\ntrust people who are authorized to run POSTs, but I think the\r\ndesign is broadly that only trusted people should be allowed\r\nto do that.\r\n\r\nComments welcome!\r\n\r\nedit: further thoughts: a proper implementation would of course also check if the ISO is already downloaded and skip the download if so, and I'd also want it to allow specifying a target name (because Fedora has hilarious collisions for `boot.iso`); have to figure the best way to allow that. If the way to do this is through the GRU, it should also presumably be able to delete the jobs if it can't manage to download the ISO."},"comment":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/comments/134233222","html_url":"https://github.com/os-autoinst/openQA/pull/426#issuecomment-134233222","issue_url":"https://api.github.com/repos/os-autoinst/openQA/issues/426","id":134233222,"user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T14:55:14Z","updated_at":"2015-08-24T14:55:14Z","body":"Good call on the Mojo useragent. If not with another state, how do we keep the jobs from being started until they're ready?"}}