metal-stack / csi-driver-lvm

MIT License
120 stars 25 forks source link

Dockerfile dependency packages questions #76

Closed liulanze closed 1 year ago

liulanze commented 1 year ago

Hi Team,

When reading the Dockerfile, I found that lvm2-extra and e2fsprogs-extra are required as dependency. I can see they are all installed by apk, but these packages are not available in my package manager (tdnf), so want to consult what is the usage of these packages, and are they necessary for csi-driver-lvm to be built and running?

Thanks, liulanze@

majst01 commented 1 year ago

Why do you want to use another base image for the csi-driver-lvm ? Can you please elaborate.

liulanze commented 1 year ago

Why do you want to use another base image for the csi-driver-lvm ? Can you please elaborate.

For some reason I need to leverage a certain distro os for csi-driver-lvm, and by that os they use tdnf as package manager.

majst01 commented 1 year ago

Why do you want to use another base image for the csi-driver-lvm ? Can you please elaborate.

For some reason I need to leverage a certain distro os for csi-driver-lvm, and by that os they use tdnf as package manager.

As we do not plan to test with different base distro's, i am afraid you must figure out by yourself what packages are required in you distro to bring the same binaries.

You can check in the source code what executables are executed with exec.Command and check.

Gerrit91 commented 1 year ago

Mh... looks to me a bit like the packages are not really needed. Would be nice if you can tell us whether it worked out for you or not. You can test basic functionality with Kind as done in CI by running the test target in the Makefile. (create to loop volumes for testing before, e.g. with for i in 100 101; do fallocate -l 1G loop${i}.img ; sudo losetup /dev/loop${i} loop${i}.img; done)

majst01 commented 1 year ago

From what i can see at least e2fsprogs-extra is required for resize2fs

liulanze commented 1 year ago

Thanks @majst01 @Gerrit91 for the message, I will test with properly. In the meantime, I found there is a go module difference in Makefile between release v0.4.1 and v0.5.0, that go mod tidy is required for provisioner and lvmplugin to be built. Could you please elaborate why we need this tidy module? Because I thought vendor module would be enough in most cases. Thanks!

majst01 commented 1 year ago

Hi @liulanze go.mod and go.sum are updated regularly, if someone missed to run go mod tidy, the build would not succeed. Makefile is not involved and we do not use vendor directory at all in none of our projects.

Gerrit91 commented 1 year ago

This has become stale, please re-open if necessary.