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

[rhcos-4.13] overlay.d: create new 30gcp-udev-rules overlay #2336

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

ravanelli
Copy link
Member

  • This PR injects/updates the udev rules from google-guest-config package into our overlay.
  • It works as an workaround for the BZ #2176212. The longer term solution is to add these packages as part of the Fedora/RHEL itself, so we won't need to maintain it, as we can entirely drop it.

For more info:
https://github.com/GoogleCloudPlatform/guest-configs/tree/master/src/lib/udev

@ravanelli ravanelli changed the base branch from testing-devel to rhcos-4.13 March 29, 2023 19:53
@dustymabe
Copy link
Member

A few things:

  • Let's rename the commit to not mention the bug but rather say what we are doing. We can mention the bug in the commit message.
  • Do you mind adding a first commit that breaks out the existing udev rule into it's own module (i.e. look at 25azure-udev-rules). This helps us in the future evaluate our "layers" and work to eliminate them over time.
  • In the commit message of the second commit can you mention what commit hash you used when you synced over these 3 files from https://github.com/GoogleCloudPlatform/guest-configs ? I think it will be useful for historical purposes. We could/should also link to https://bugzilla.redhat.com/show_bug.cgi?id=2182865 as an opportunity for us to drop this when the new subpackage exists that we can pull in.

@jlebon
Copy link
Member

jlebon commented Mar 30, 2023

* In the commit message of the second commit can you mention what commit hash you used when you synced over these 3 files from [GoogleCloudPlatform/guest-configs](https://github.com/GoogleCloudPlatform/guest-configs) ?

I would go further and include that information directly as comments at the top of those files.

@dustymabe
Copy link
Member

dustymabe commented Mar 30, 2023

I would go further and include that information directly as comments at the top of those files.

I wouldn't - since the files are currently diff-able with what is upstream, but I would include it in the README for the module. i.e. look at what we did for azure: https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/README.md#25-azure-udev-rules

@jlebon
Copy link
Member

jlebon commented Mar 30, 2023

I would go further and include that information directly as comments at the top of those files.

I wouldn't - since the files are currently diff-able with what is upstream, but I would include it in the README for the module. i.e. look at what we did for azure: testing-devel/overlay.d/README.md#25-azure-udev-rules

Personally, when copy/pasting stuff like this directly from other places, I want to be really clear that happened and so document it at the top of the file. It doesn't have to be the full context; just a "Copied from $permalink" is enough. Having that provenance be inline is helpful not only to us but in this case also to users perusing those files on the host too.

@dustymabe
Copy link
Member

Personally, when copy/pasting stuff like this directly from other places, I want to be really clear that happened and so document it at the top of the file. It doesn't have to be the full context; just a "Copied from $permalink" is enough. Having that provenance be inline is helpful not only to us but in this case also to users perusing those files on the host too.

I think that's fair. Maybe we can do both?

@dustymabe
Copy link
Member

Nice commit messages @ravanelli!

I think we need to still update the README and also add a line at the top of the copied files mentioning where exactly they were copied from (permalink to github file would be nice).

@ravanelli
Copy link
Member Author

Nice commit messages @ravanelli!

I think we need to still update the README and also add a line at the top of the copied files mentioning where exactly they were copied from (permalink to github file would be nice).

Done =)

@ravanelli ravanelli changed the title Bug 2176212 - Add/Update udev rules for GCP overlay.d: create new 30gcp-udev-rules overlay Mar 30, 2023
@ravanelli
Copy link
Member Author

ravanelli commented Mar 30, 2023

The CI still failing, seems we need a backport to rhcos-413 from: b0ffe7c

Comment on lines 19 to 20
# ATTENTION: It is a copy from https://github.com/GoogleCloudPlatform/guest-configs/blob/master/src/lib/udev/google_nvme_id
# This file is synced with the source using the last update: Latest commit 3841945 on Feb 17 2023
Copy link
Member

Choose a reason for hiding this comment

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

For these let's move this directly under the #!/bin/bash above and also just use the permalink which is self explanatory:

Suggested change
# ATTENTION: It is a copy from https://github.com/GoogleCloudPlatform/guest-configs/blob/master/src/lib/udev/google_nvme_id
# This file is synced with the source using the last update: Latest commit 3841945 on Feb 17 2023
# ATTENTION: This is a copy from https://github.com/GoogleCloudPlatform/guest-configs/blob/18fbc050b135461879e631a5ec2dd2cd7259d8e2/src/lib/udev/google_nvme_id

Comment on lines +74 to +75
Add udev rules and scripts needed from google-guest-configs [1] for disk
configuration in GCP, such as local SSD controllers (nvme and scsi).
Copy link
Member

Choose a reason for hiding this comment

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

let's also mention here the open BZ to get this into the RPM and that we can drop this and just include the RPM when the BZ is fixed.

@ravanelli ravanelli force-pushed the bz_2176212 branch 2 times, most recently from 338bdf4 to 38f9eff Compare March 30, 2023 18:17
We previously had the 65-gce-disk-naming.rules under the 05core
overlay. This commit makes a new overlay.d entry specifically for
the GCP rules, in this way we can track it and have a better
maintenance

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
 - This PR injects/updates the udev rules from google-guest-config package into
our overlay (GoogleCloudPlatform/guest-configs@18fbc05).

 - It works as an workaround for the BZ #2176212. The longer term solution
is to add these packages as part of the Fedora/RHEL itself, so we won't need to
maintain it, as we can entirely drop it.

For this matter the BZ https://bugzilla.redhat.com/show_bug.cgi?id=2182865
was opened requesting a subpackage of google-compute-engine-guest-configs
containing only what is needed.

For more info:

https://bugzilla.redhat.com/show_bug.cgi?id=2176212
https://github.com/GoogleCloudPlatform/guest-configs/tree/master/src/lib/udev

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
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.

LGTM!

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 - The only other thing that might be nice is adding a test for this (only runs on GCP) that validates some of the rules are acting appropriately.

@ravanelli ravanelli merged commit b944dd4 into coreos:rhcos-4.13 Apr 4, 2023
@jlebon
Copy link
Member

jlebon commented Apr 4, 2023

Wait, I just noticed this was targeting rhcos-4.13. I think we want this in FCOS proper too though. Can you open the same PR against testing-devel too?

@dustymabe
Copy link
Member

oh yeah. I thought this was targetting the testing-devel branch.

@ravanelli
Copy link
Member Author

LGTM - The only other thing that might be nice is adding a test for this (only runs on GCP) that validates some of the rules are acting appropriately.

I created a new issue to work on it:
coreos/fedora-coreos-tracker#1457

@ravanelli
Copy link
Member Author

Wait, I just noticed this was targeting rhcos-4.13. I think we want this in FCOS proper too though. Can you open the same PR against testing-devel too?

A my bad, probably opened it first against 413 since the issue was in this branch.

@travier
Copy link
Member

travier commented Apr 5, 2023

New PR in #2350

@bgilbert bgilbert changed the title overlay.d: create new 30gcp-udev-rules overlay [rhcos-4.13] overlay.d: create new 30gcp-udev-rules overlay Apr 11, 2023
@ravanelli ravanelli deleted the bz_2176212 branch January 2, 2024 15:42
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.

None yet

4 participants