{"action":"created","issue":{"url":"https://api.github.com/repos/m-lab/epoxy/issues/27","repository_url":"https://api.github.com/repos/m-lab/epoxy","labels_url":"https://api.github.com/repos/m-lab/epoxy/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/m-lab/epoxy/issues/27/comments","events_url":"https://api.github.com/repos/m-lab/epoxy/issues/27/events","html_url":"https://github.com/m-lab/epoxy/pull/27","id":294631649,"number":27,"title":"Add server support for stage2, stage3, and report targets","user":{"login":"stephen-soltesz","id":1085316,"avatar_url":"https://avatars3.githubusercontent.com/u/1085316?v=4","gravatar_id":"","url":"https://api.github.com/users/stephen-soltesz","html_url":"https://github.com/stephen-soltesz","followers_url":"https://api.github.com/users/stephen-soltesz/followers","following_url":"https://api.github.com/users/stephen-soltesz/following{/other_user}","gists_url":"https://api.github.com/users/stephen-soltesz/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-soltesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-soltesz/subscriptions","organizations_url":"https://api.github.com/users/stephen-soltesz/orgs","repos_url":"https://api.github.com/users/stephen-soltesz/repos","events_url":"https://api.github.com/users/stephen-soltesz/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-soltesz/received_events","type":"User","site_admin":false},"labels":[{"id":751665177,"url":"https://api.github.com/repos/m-lab/epoxy/labels/in%20progress","name":"in progress","color":"00a7ed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-06T04:50:34Z","updated_at":"2018-02-06T16:37:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/m-lab/epoxy/pulls/27","html_url":"https://github.com/m-lab/epoxy/pull/27","diff_url":"https://github.com/m-lab/epoxy/pull/27.diff","patch_url":"https://github.com/m-lab/epoxy/pull/27.patch"},"body":"This change adds new targets to the epoxy server for handling stage2, stage3, and report.\r\n\r\nThis change includes significant revisions to the storage.Host type and associated tests. These name updates are needed to support a three stage boot sequence (previously two were planned).\r\n\r\nAdditionally, this change removes the propagation of errors due to failed reads from `rand.Reader`. These reads are extremely unlikely in normal environments, and even in those cases, the panic will cause the HTTP request to fail.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/m-lab/epoxy/27)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/m-lab/epoxy/issues/comments/363482428","html_url":"https://github.com/m-lab/epoxy/pull/27#issuecomment-363482428","issue_url":"https://api.github.com/repos/m-lab/epoxy/issues/27","id":363482428,"user":{"login":"pboothe","id":143798,"avatar_url":"https://avatars1.githubusercontent.com/u/143798?v=4","gravatar_id":"","url":"https://api.github.com/users/pboothe","html_url":"https://github.com/pboothe","followers_url":"https://api.github.com/users/pboothe/followers","following_url":"https://api.github.com/users/pboothe/following{/other_user}","gists_url":"https://api.github.com/users/pboothe/gists{/gist_id}","starred_url":"https://api.github.com/users/pboothe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboothe/subscriptions","organizations_url":"https://api.github.com/users/pboothe/orgs","repos_url":"https://api.github.com/users/pboothe/repos","events_url":"https://api.github.com/users/pboothe/events{/privacy}","received_events_url":"https://api.github.com/users/pboothe/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T16:37:43Z","updated_at":"2018-02-06T16:37:43Z","author_association":"NONE","body":"\n\n\n\nReviewed 1 of 8 files at r1.\nReview status: 1 of 8 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.\n\n---\n\n*[cmd/epoxy_boot_server/main.go, line 105 at r1](https://reviewable.io:443/reviews/m-lab/epoxy/27#-L4frsjT4kB947LtTYPX:-L4frsjUqgyTXQ0LFZlG:b4drks9) ([raw file](https://github.com/m-lab/epoxy/blob/0daf2df7cb9823fe74d70d5f2ac897fcf98342d5/cmd/epoxy_boot_server/main.go#L105)):*\n> ```Go\n> \n> \t// Stage2, stage3, and report targets load after stage1 runs successfully.\n> \taddRoute(router, \"POST\", \"/v1/boot/{hostname}/{sessionId}/stage2\",\n> ```\n\nAdd `//TODO: make the names stage2 and stage3 better when we need to support the case where not every machine has the same stage2 or stage3`\n\n---\n\n*[storage/datastore_test.go, line 92 at r1](https://reviewable.io:443/reviews/m-lab/epoxy/27#-L4fy1LElY6QbBWmbP7L:-L4fy1LElY6QbBWmbP7M:bbll10l) ([raw file](https://github.com/m-lab/epoxy/blob/0daf2df7cb9823fe74d70d5f2ac897fcf98342d5/storage/datastore_test.go#L92)):*\n> ```Go\n> \t\t},\n> \t\tCurrentSessionIDs: SessionIDs{\n> \t\t\tStage2ID: \"01234\",\n> ```\n\nThis \"combine the stage name as a prefix for the thing you want\" is worrying.  I think I would prefer if the stage name were the complete key for the data. Then SessionIDs would just be a map like the Sequence, and their keys would be exactly the same instead of doing this prefix thing.  This is an optional request, though, as the code is out of scope for this PR.\n\n---\n\n*[storage/host.go, line 54 at r1](https://reviewable.io:443/reviews/m-lab/epoxy/27#-L4fwjS5Uz5WUYPBuCjE:-L4fwjS5Uz5WUYPBuCjF:b-4ul006) ([raw file](https://github.com/m-lab/epoxy/blob/0daf2df7cb9823fe74d70d5f2ac897fcf98342d5/storage/host.go#L54)):*\n> ```Go\n> type SessionIDs struct {\n> \tStage2ID string // Needed for requesting the nextstage.json target.\n> \tStage3ID string // Needed for requesting the begingstage target.\n> ```\n\nbeginstage\n\n---\n\n*[storage/host.go, line 59 at r1](https://reviewable.io:443/reviews/m-lab/epoxy/27#-L4fwpKidLA7DH4-6EFW:-L4fwpKidLA7DH4-6EFX:b-9ynkrx) ([raw file](https://github.com/m-lab/epoxy/blob/0daf2df7cb9823fe74d70d5f2ac897fcf98342d5/storage/host.go#L59)):*\n> ```Go\n> \n> // Sequence represents a set of operator-provided iPXE scripts or JSON nextboot Configs.\n> type Sequence struct {\n> ```\n\nShould be a map from string->string. \"stage1\" or \"Stage1ChainURL\" can then be keys and the URLs values. This approach would already make things less kludgy - you currently have a test where Stage3ChainURL  is set to \"\", when really it should never be set at all.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/m-lab/epoxy/27)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"pboothe"}}