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

Revert grub2 exit #1955

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

cgwalters
Copy link
Member

In this case this is reverted in Fedora; I don't like carrying downstream patches. Let's revert it here, and I added a different approach.

@cgwalters
Copy link
Member Author

/cc @martinezjavier

@openshift-ci-robot
Copy link
Collaborator

@cgwalters: GitHub didn't allow me to request PR reviews from the following users: martinezjavier.

Note that only ostreedev members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @martinezjavier

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@martinezjavier
Copy link
Contributor

@cgwalters I just had a trivial comment, but other than that I agree with your changes.

@cgwalters
Copy link
Member Author

@cgwalters I just had a trivial comment, but other than that I agree with your changes.

What's the comment? I don't see it here?

# commit 985a14100295c99d0c6d712bfbee0ec52a3a1601
# https://discussion.fedoraproject.org/t/boot-entries-gone-after-upgrade/8026/3
# https://github.com/ostreedev/ostree/pull/1929
if test -f /boot/.grub2-bls-enabled; then
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, in the idea I had in #1929 (comment), I suggested checking for both GRUB_ENABLE_BLSCFG and a stamp file that that means "this bootloader supports blscfg" (so probably should be named e.g. .grub2-bls-supported).

With this approach, if someone turns off GRUB_ENABLE_BLSCFG again, we go back to no entries. Not that folks would normally want to do that, but seems worth handling it given the consequences. (One case that comes to mind for example is someone rolling back to a previous deployment that doesn't enable GRUB_ENABLE_BLSCFG.)

Copy link
Contributor

Choose a reason for hiding this comment

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

With this approach, if someone turns off GRUB_ENABLE_BLSCFG again, we go back to no entries. Not that folks would normally want to do that, but seems worth handling it given the consequences. (One case that comes to mind for example is someone rolling back to a previous deployment that doesn't enable GRUB_ENABLE_BLSCFG.)

@jlebon I thought that @cgwalters idea here was to not allow the user to choose but instead let the installer / OS to specify whether the installed bootloader has BLS support or not and just use it if that's the case.

That way you won't use a config option that's specific to Fedora GRUB but instead a protocol that's defined by OSTree that bootloaders can use to specify that are able to parse BLS files.
But you are right too that maybe users should be allowed to disable the option.

Probably this PR should be split in two, so the revert can be merged to drop the downstream patch while the second commit is discussed.

# commit 985a14100295c99d0c6d712bfbee0ec52a3a1601
# https://discussion.fedoraproject.org/t/boot-entries-gone-after-upgrade/8026/3
# https://github.com/ostreedev/ostree/pull/1929
if test -f /boot/.grub2-bls-enabled; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why we would want the filename to be grub2 specific?

I think that we could just have a generic .bootloader-bl-enable or .bls-enabled, that could potentially used be used also by other bootloaders / installers to indicate OSTree that the installed bootloader is capable of parsing BLS snippets.

@martinezjavier
Copy link
Contributor

What's the comment? I don't see it here?

Sorry, it's now. I noticed that never submitted my comment.

This reverts commit 985a141.
It turned out that some people have old bootloaders, and hence
get the "no entries" problem.  That's much, much much worse
than double entries.
@cgwalters
Copy link
Member Author

Updated the PR to just revert

@jlebon
Copy link
Member

jlebon commented Oct 24, 2019

/lgtm

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cgwalters
Copy link
Member Author

bot, retest this please

@cgwalters
Copy link
Member Author

/override f29-flatpak

@openshift-ci-robot
Copy link
Collaborator

@cgwalters: Overrode contexts on behalf of cgwalters: f29-flatpak

In response to this:

/override f29-flatpak

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit bd3f24e into ostreedev:master Oct 25, 2019
@cgwalters cgwalters changed the title Revert grub2 exit, add new grub2: Honor /boot/.grub2-bls-enabled Revert grub2 exit Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants