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

feat: add device-mapper package #791

Merged
merged 1 commit into from
Sep 15, 2023
Merged

Conversation

ndbrew
Copy link
Contributor

@ndbrew ndbrew commented Aug 17, 2023

Add kernel modules for device-mapper.

@ndbrew
Copy link
Contributor Author

ndbrew commented Aug 17, 2023

I decided to depend on the kernel-build using it as a cache to build the required modules in this package rather than modify the underlying kernel-build configs. I was unable to make this work due to make invalidating the kernel-build cache every time I built the package resulting in errors while loading the module. I assume that's what #694 aims to address?

To get it working locally I ended up making kernel-build a package in the makefile and pushing it to docker, then depending on that image instead of the stage. Works fine as long as this package and the kernel package use the same kernel-build cache.

@ndbrew
Copy link
Contributor Author

ndbrew commented Aug 17, 2023

related: #124

@frezbo
Copy link
Member

frezbo commented Aug 17, 2023

I decided to depend on the kernel-build using it as a cache to build the required modules in this package rather than modify the underlying kernel-build configs. I was unable to make this work due to make invalidating the kernel-build cache every time I built the package resulting in errors while loading the module. I assume that's what #694 aims to address?

To get it working locally I ended up making kernel-build a package in the makefile and pushing it to docker, then depending on that image instead of the stage. Works fine as long as this package and the kernel package use the same kernel-build cache.

buildkit needs some config to tell it to no do GC, https://github.com/siderolabs/build-container/blob/main/hack/scripts/buildkit.toml, I'll clean up the PR and include the config into the standard place.

Does this require any userspace binaries/daemon?

@ndbrew
Copy link
Contributor Author

ndbrew commented Aug 17, 2023

Does this require any userspace binaries/daemon?

Not for the piraeus-operator / linstor use case.

Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

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

let's enable this as a =m setting by default and ship it with Talos

(hopefully the module is small)

@ndbrew
Copy link
Contributor Author

ndbrew commented Sep 13, 2023

I've updated the kernel configs and ran kernel-olddefconfig. These are the resulting changes.

@frezbo
Copy link
Member

frezbo commented Sep 13, 2023

I'll get back to this next week, apologies for the delay

Add `CONFIG_DM_THIN_PROVISIONING=m`.

Signed-off-by: Noel Georgi <[email protected]>
@frezbo
Copy link
Member

frezbo commented Sep 15, 2023

/ok-to-test

@frezbo
Copy link
Member

frezbo commented Sep 15, 2023

/m

@talos-bot talos-bot merged commit 847a9c3 into siderolabs:main Sep 15, 2023
frezbo added a commit to frezbo/talos that referenced this pull request Sep 15, 2023
Pull in dm-modules.

Ref: siderolabs/pkgs#791

Diff:

```bash
❯ diff -r --color _out/kernel-a/lib/modules/6.1.51-talos/modules.dep _out/kernel-b/lib/modules/6.1.51-talos/modules.dep
100a101
> kernel/drivers/md/dm-bio-prison.ko:
102a104
> kernel/drivers/md/persistent-data/dm-persistent-data.ko:
103a106
> kernel/drivers/md/dm-thin-pool.ko: kernel/drivers/md/persistent-data/dm-persistent-data.ko kernel/drivers/md/dm-bio-prison.ko
```

Signed-off-by: Noel Georgi <[email protected]>
frezbo added a commit to frezbo/talos that referenced this pull request Sep 15, 2023
Pull in dm-modules.

Ref: siderolabs/pkgs#791

Diff:

```bash
❯ diff -r --color _out/kernel-a/lib/modules/6.1.51-talos/modules.dep _out/kernel-b/lib/modules/6.1.51-talos/modules.dep
100a101
> kernel/drivers/md/dm-bio-prison.ko:
102a104
> kernel/drivers/md/persistent-data/dm-persistent-data.ko:
103a106
> kernel/drivers/md/dm-thin-pool.ko: kernel/drivers/md/persistent-data/dm-persistent-data.ko kernel/drivers/md/dm-bio-prison.ko
```

Signed-off-by: Noel Georgi <[email protected]>
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.

4 participants