Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent stage1, stage1to2, stage2, etc names #16

Merged
merged 4 commits into from
Jan 31, 2018
Merged

Use consistent stage1, stage1to2, stage2, etc names #16

merged 4 commits into from
Jan 31, 2018

Conversation

stephen-soltesz
Copy link
Contributor

@stephen-soltesz stephen-soltesz commented Jan 30, 2018

This change updates stage names to use a consistent nomenclature.

Previously, stage1 images requested a stage2.ipxe target, and this was confusing me since stage1 was reading and running scripts named "stage2". Instead, now stage1 images request stage1 targets, stage2
images request stage2 tagets, etc.

By example, a boot sequence will look like:

  • stage1 image requests stage1.ipxe from epoxy server
  • epoxy server returns the URL to a stage1to2.ipxe script
  • stage1 runs the stage1to2 script and boots stage2
  • stage2 image requests stage2.json from epoxy server
  • epoxy server returns the URL to a stage2to3.json config
  • stage2 runs the stage2to3 config and boots stage3.
  • ... etc.

The following simple rule should apply now: "a client stage requests the corresponding stage name from the server".


This change is Reviewable

@stephen-soltesz stephen-soltesz requested review from gfr10598 and removed request for gfr10598 January 30, 2018 17:23
@stephen-soltesz stephen-soltesz assigned yachang and unassigned yachang Jan 30, 2018
@yachang
Copy link

yachang commented Jan 30, 2018

Looks good overall. Only one confusing part: Since you have "stage1to2", do you have "stage2to3"?

If there is no "stage2", how about just name it "stage2" and you already have documentation like:

"... is the absolute URL to an iPXE script for booting stage1 to stage2."


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@stephen-soltesz
Copy link
Contributor Author

Yes, there will be a stage2to3 reference as well. The current code base doesn't have that yet b/c I haven't written it yet! :D

I can't use just "stage2" because there will also be a stage2 target that needs a separate name.

This change is just to rename things to use what I think is a simpler naming convention so that I can add these additional pieces. e.g. stage1 images request stage1 targets, stage2 images request stage2 targets, and the stage1to2 or stage2to3 are user-provided configs that manage the transition from stage1 to stage2 (or stage2 to stage3).

Does that help?


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@yachang
Copy link

yachang commented Jan 31, 2018

Thanks for the explanation!


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@yachang
Copy link

yachang commented Jan 31, 2018

:lgtm:


Review status: 0 of 9 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@stephen-soltesz stephen-soltesz merged commit 49786a8 into m-lab:dev Jan 31, 2018
@kokosta kokosta added Closed and removed In Review labels Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants