linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
	Abhishek Agarwal <mragarwal.developer@gmail.com>
Subject: Re: [linux-lvm] lvm commands hanging when run from inside a kubernetes pod
Date: Mon, 30 May 2022 17:15:03 +0200	[thread overview]
Message-ID: <e1896ba1-fc6f-b4f1-d4f9-fac91193dcbc@gmail.com> (raw)
In-Reply-To: <CAM3OQJGWsYo=boQBHqmLj1HRRtg14p3-Tp3yeu7KMYcKV2_hOA@mail.gmail.com>

Dne 27. 05. 22 v 9:02 Abhishek Agarwal napsal(a):
> When a kubernetes pod is scheduled on the node having lvm2 libraries already 
> installed and trying to run lvm commands using those node binaries from inside 
> the pod container, the commands hang and are waiting on something to complete. 
> Although when ctrl+c is pressed the terminal session resumes and checking the 
> final code for the execution returns a "0" error code and the commands 
> operation is also carried out successfully.
> 
> 

lvm2 is *NOT* designed to be executed in/from a container.

It cannot work properly as it directly communicates with system's udevd - 
which you likely don't have running in your container.

You could kind of 'fake it' by running lvm2 wihout udev synchronization - but 
this will just open another cave of other problems (missing synchronization).

So your lvm2 command should be always executed on your hosting machine
(since it does control resources without containerization support - like 
devices) and then you should 'pass' created LV to  your container in some way.

Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


WARNING: multiple messages have this Message-ID (diff)
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] lvm commands hanging when run from inside a kubernetes pod
Date: Mon, 30 May 2022 17:15:03 +0200	[thread overview]
Message-ID: <e1896ba1-fc6f-b4f1-d4f9-fac91193dcbc@gmail.com> (raw)
Message-ID: <20220530151503.UdV8qWHb2jhcXV1ATqMdACiklJeuFLhOpTONjy3G0wI@z> (raw)
In-Reply-To: <CAM3OQJGWsYo=boQBHqmLj1HRRtg14p3-Tp3yeu7KMYcKV2_hOA@mail.gmail.com>

Dne 27. 05. 22 v 9:02 Abhishek Agarwal napsal(a):
> When a kubernetes pod is scheduled on the node having lvm2 libraries already 
> installed and trying to run lvm commands using those node binaries from inside 
> the pod container, the commands hang and are waiting on something to complete. 
> Although when ctrl+c is pressed the terminal session resumes and checking the 
> final code for the execution returns a "0" error code and the commands 
> operation is also carried out successfully.
> 
> 

lvm2 is *NOT* designed to be executed in/from a container.

It cannot work properly as it directly communicates with system's udevd - 
which you likely don't have running in your container.

You could kind of 'fake it' by running lvm2 wihout udev synchronization - but 
this will just open another cave of other problems (missing synchronization).

So your lvm2 command should be always executed on your hosting machine
(since it does control resources without containerization support - like 
devices) and then you should 'pass' created LV to  your container in some way.

Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


  parent reply	other threads:[~2022-05-30 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  7:02 [linux-lvm] lvm commands hanging when run from inside a kubernetes pod Abhishek Agarwal
2022-05-30 11:55 ` Roger Heflin
2022-05-31 18:50   ` Abhishek Agarwal
2022-06-01  7:26     ` Demi Marie Obenour
2022-06-01  8:28       ` Abhishek Agarwal
2022-06-02 11:04         ` Roger Heflin
2022-06-06  5:49           ` Abhishek Agarwal
2022-06-06  7:01             ` Demi Marie Obenour
2022-06-06 11:31               ` Abhishek Agarwal
2022-06-07 17:42                 ` Demi Marie Obenour
2022-06-06  7:02             ` Bernd Eckenfels
2022-06-02 19:00         ` Nir Soffer
2022-05-30 15:15 ` Zdenek Kabelac [this message]
2022-05-30 15:15   ` Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1896ba1-fc6f-b4f1-d4f9-fac91193dcbc@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=linux-lvm@redhat.com \
    --cc=mragarwal.developer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).