Skip to contentSkip to conversation

Reg unusual deployment within containers

DISCUSSION Lakshmi Narasimhan Sundararajan 2 participants 3 messages Jul 30, 2019 – Jul 31, 2019

lore
Share & tools
lore
#0 lore raw

Hi Team,
Thanks for being so prompt last time, I wanted to see whether I could be lucky again ?

My deployment of lvm2 is in an uncontrolled environment, so the host can be running any version.
My software stack runs within a container, as an infrastructure. So to be always stable, it has to have very little dependency or moving components outside.

Sharing the lvm bits from host to container will also not work because on host most of the build needs dynamic lib support. This may not be available from within container.

The first up easy question:
1/ can lvm2 be built as a static binary with no external dependency? Any pointers to this ?

2/ The software stack bundles lvm2 package within the infrastructure container as well.
Now, this results in two versions of lvm2 packages one within the container and the other on the host. To take this further up, to completely isolate version dependencies as well, system-udevd and lvmetad daemons are also running within the container. This combination has been working, but I understand is definitely very strange and never thought out even during development.
So I wish to understand the impact of the above bundling, with possibly two copies of daemons and cache and udev running within/and outside the container.

Please do let me know if this bundle approach is a feasible approach to take to production? What possible issues that may come up that cannot be handled correctly, if any. I am coming more from design validation, because you are the experts with how its designed internally. Looking forward to hearing your opinions.

Regards
LNS
Sent from Mail for Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20190730/4d687a74/attachment.htm>

#1 lore raw

Dne 30. 07. 19 v 15:25 Lakshmi Narasimhan Sundararajan napsal(a):

Quoted 10 lines

Hi Team,

Thanks for being so prompt last time, I wanted to see whether I could be lucky again ?

My deployment of lvm2 is in an uncontrolled environment, so the host can be running any version.

My software stack runs within a container, as an infrastructure. So to be always stable, it has to have very little dependency or moving components outside.

It's worth to note (before you start to ask) that lvm2 does NOT support usage within containers.

When you do such solution - you need to resolve lots of tricky issues and adapt usage to your local limited constrains.

But there is no 'generic' support for running lvm2 command within i.e. docker image.

Quoted 4 lines

The first up easy question:
1/ can lvm2 be built as a static binary with no external dependency? Any pointers to this ?

Nope - there is no static binary support for a long time.

The key issue is - lot of things these days depends on udev (&systemd behind).

So any static build of lvm2 with built-in udev/systemd libraries is not going to works since the last thing systemd cares about is 'future' compatibility. We try to do that in lvm2 - which is much smaller project and it's very hard.

So you can't expect 'static' builds to appear in this dynamic environment - it would be big challenging task on it's own....

Quoted 2 lines

2/? The software stack bundles lvm2 package within the infrastructure container as well.

Well - we do NOT support this. All these builds do their own hacking. It's all done without any support from lvm2 side.

Quoted 2 lines

So I wish to understand the impact of the above bundling, with possibly two copies of daemons and cache and udev running within/and outside the container.

We wish to understand this as well :)

It simply can't work - and we tell this to any container developer who asks...

Quoted 5 lines

Please do let me know if this bundle approach is a feasible approach to take to production? What possible issues that may come up that cannot be handled correctly, if any. ?I am coming more from design validation, because you are the experts with how its designed internally. Looking forward to hearing your opinions.

Properly configured lvm2 is bound to installed system - which present installed kernel version, udev, systemd and other surrounding apps.

We don't understand how anyone is imagining, he can use 'random' i.e. Docker image with random instance of lvm2 within image, no udev processing and lots of other things missing and expects all will work...

So you need to ask these question authors of those project ;) since we really would like to know these answers ourself ;)

So far we can only advice using of lvm2 within VM (i.e. qemu)...

IMHO lot of developers these days believe that container is just 'faster VM', and they have no idea how wrong they are...

Regards

Zdenek

#2 lore raw

Thank you Zdenek for your response. Your inputs do help us understand this better.

Best regards
LN
Sent from Mail for Windows 10

From: Zdenek Kabelac
Sent: Wednesday, July 31, 2019 4:24 PM
To: LVM2 development; Lakshmi Narasimhan Sundararajan
Subject: Re: Reg unusual deployment within containers

Dne 30. 07. 19 v 15:25 Lakshmi Narasimhan Sundararajan napsal(a):

Quoted 10 lines

Hi Team,

Thanks for being so prompt last time, I wanted to see whether I could be lucky again ?

My deployment of lvm2 is in an uncontrolled environment, so the host can be running any version.

My software stack runs within a container, as an infrastructure. So to be always stable, it has to have very little dependency or moving components outside.

It's worth to note (before you start to ask) that lvm2 does NOT support usage within containers.

When you do such solution - you need to resolve lots of tricky issues and adapt usage to your local limited constrains.

But there is no 'generic' support for running lvm2 command within i.e. docker image.

Quoted 4 lines

The first up easy question:
1/ can lvm2 be built as a static binary with no external dependency? Any pointers to this ?

Nope - there is no static binary support for a long time.

The key issue is - lot of things these days depends on udev (&systemd behind).

So any static build of lvm2 with built-in udev/systemd libraries is not going to works since the last thing systemd cares about is 'future' compatibility. We try to do that in lvm2 - which is much smaller project and it's very hard.

So you can't expect 'static' builds to appear in this dynamic environment - it would be big challenging task on it's own....

Quoted 2 lines

2/? The software stack bundles lvm2 package within the infrastructure container as well.

Well - we do NOT support this. All these builds do their own hacking. It's all done without any support from lvm2 side.

Quoted 2 lines

So I wish to understand the impact of the above bundling, with possibly two copies of daemons and cache and udev running within/and outside the container.

We wish to understand this as well :)

It simply can't work - and we tell this to any container developer who asks...

Quoted 5 lines

Please do let me know if this bundle approach is a feasible approach to take to production? What possible issues that may come up that cannot be handled correctly, if any. ?I am coming more from design validation, because you are the experts with how its designed internally. Looking forward to hearing your opinions.

Properly configured lvm2 is bound to installed system - which present installed kernel version, udev, systemd and other surrounding apps.

We don't understand how anyone is imagining, he can use 'random' i.e. Docker image with random instance of lvm2 within image, no udev processing and lots of other things missing and expects all will work...

So you need to ask these question authors of those project ;) since we really would like to know these answers ourself ;)

So far we can only advice using of lvm2 within VM (i.e. qemu)...

IMHO lot of developers these days believe that container is just 'faster VM', and they have no idea how wrong they are...

Regards

Zdenek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20190731/8223229f/attachment.htm>