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

Support separate PXE rootfs image #528

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Support separate PXE rootfs image #528

merged 1 commit into from
Jul 27, 2020

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Jul 22, 2020

  • If the separate rootfs image was appended as a second initrd, make sure the initramfs and rootfs are from the same build,
  • else if we were asked to fetch the rootfs over HTTP(S), do so,
  • else if we're shipping the legacy initramfs image during the deprecation window, add a MOTD,
  • else fail.

If we see the karg to fetch the rootfs, automatically enable network.

See coreos/fedora-coreos-tracker#390. Requires coreos/coreos-assembler#1608.

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM. Some comments.

@dustymabe
Copy link
Member

I'm interested to know what's the smallest instance (memory) you can run and have this all work. I wonder if this should put to bed coreos/fedora-coreos-tracker#407.

@bgilbert bgilbert changed the title WIP: Support separate PXE rootfs image Support separate PXE rootfs image Jul 24, 2020
@bgilbert bgilbert marked this pull request as ready for review July 24, 2020 01:28
@bgilbert
Copy link
Contributor Author

Ready for review.

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once we get a link to the docs page in the MOTD

Nice work!

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

fi
# We don't need to verify TLS certificates because we're checking the
# image hash.
if ! curl --silent --insecure --location --retry 5 "${rootfs_url}" | \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is totally fine for now, but down the line would be nice to move the HTTP request to rdcore too. So then stream-hash would become fetch-stage2 --hash-file ... --url ... or something. Gives us better control over the request and error handling. (Honestly piping curl is neat, but it just feels funny to me in general doing it for fundamental things like this :) ).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an experiment in not reinventing wheels, and I feel a little weird about it too. If we decide to move more pieces of the pipeline to rdcore down the road, I'm totally fine with that.

@bgilbert
Copy link
Contributor Author

By the way, the console logs on a rootfs_url boot are fun to watch. ignition-disks and rootfs fetching run in parallel.

@dustymabe
Copy link
Member

By the way, the console logs on a rootfs_url boot are fun to watch. ignition-disks and rootfs fetching run in parallel.

Not necessary, but if it wouldn't hurt too much it might make sense to serialize them just to reduce confusion. Interspersed logs often lead to people thinking errors are related to unrelated log messages.

- If the separate rootfs image was appended as a second initrd, make sure
  the initramfs and rootfs are from the same build,
- else if we were asked to fetch the rootfs over HTTP(S), do so,
- else if we're shipping the legacy initramfs image during the
  deprecation window, add a MOTD,
- else fail.

If we see the karg to fetch the rootfs, automatically enable network.

See coreos/fedora-coreos-tracker#390.
@bgilbert
Copy link
Contributor Author

Updated! We now correctly handle the case where the user specifies coreos.live.rootfs_url during the FCOS migration period.

Not necessary, but if it wouldn't hurt too much it might make sense to serialize them just to reduce confusion. Interspersed logs often lead to people thinking errors are related to unrelated log messages.

These days we summarize the logs of failed units after a boot failure, so I'm not too concerned about it.

@bgilbert bgilbert merged commit c2dc5d8 into coreos:testing-devel Jul 27, 2020
@bgilbert bgilbert deleted the rootfs branch July 27, 2020 15:26
openshift-merge-robot pushed a commit to coreos/coreos-assembler that referenced this pull request Jul 28, 2020
lucab added a commit to lucab/fedora-coreos-docs that referenced this pull request Aug 12, 2020
This reverts a change in a section heading, which broke an incoming
link from coreos/fedora-coreos-config#528.
lucab pushed a commit to coreos/fedora-coreos-docs that referenced this pull request Aug 12, 2020
This reverts a change in a section heading, which broke an incoming
link from coreos/fedora-coreos-config#528.
c4rt0 pushed a commit to c4rt0/fedora-coreos-config that referenced this pull request Mar 27, 2023
overlay: Add 15rhcos-logrotate (BZ#1780079)
dustymabe pushed a commit to jbtrystram/fedora-coreos-config that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants