* [pve-devel] [PATCH v2 container] fix #3516: fix unmanaged containers
@ 2021-07-13 12:33 Oguz Bektas
2021-07-13 13:49 ` Stoiko Ivanov
0 siblings, 1 reply; 2+ messages in thread
From: Oguz Bektas @ 2021-07-13 12:33 UTC (permalink / raw)
To: pve-devel
unmanaged containers should run the unified cgroupv2 code from our base
plugin so that they can start correctly instead of erroring out
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
v1->v2:
* run code from base plugin instead of skipping it completely
src/PVE/LXC/Setup.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
index 9abdc85..c4c73e1 100644
--- a/src/PVE/LXC/Setup.pm
+++ b/src/PVE/LXC/Setup.pm
@@ -424,6 +424,8 @@ sub get_ct_os_release {
sub unified_cgroupv2_support {
my ($self) = @_;
+ $self->{plugin} //= 'PVE::LXC::Setup::Base'; # unmanaged
+
$self->protected_call(sub {
$self->{plugin}->unified_cgroupv2_support();
});
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH v2 container] fix #3516: fix unmanaged containers
2021-07-13 12:33 [pve-devel] [PATCH v2 container] fix #3516: fix unmanaged containers Oguz Bektas
@ 2021-07-13 13:49 ` Stoiko Ivanov
0 siblings, 0 replies; 2+ messages in thread
From: Stoiko Ivanov @ 2021-07-13 13:49 UTC (permalink / raw)
To: Oguz Bektas; +Cc: Proxmox VE development discussion
Thanks for providing the patch!
code-wise LGTM - and it fixes the issue in my reproducer
(a buster container where I manually changed the ostype to unmanaged)
I think it would help to have a small comment above the line you inserted
stating something like:
# the code in PVE::LXC::Setup::Base is a generic check and should also
# work for most other distros
apart from that:
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
On Tue, 13 Jul 2021 14:33:33 +0200
Oguz Bektas <o.bektas@proxmox.com> wrote:
> unmanaged containers should run the unified cgroupv2 code from our base
> plugin so that they can start correctly instead of erroring out
>
> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
> v1->v2:
> * run code from base plugin instead of skipping it completely
>
>
> src/PVE/LXC/Setup.pm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
> index 9abdc85..c4c73e1 100644
> --- a/src/PVE/LXC/Setup.pm
> +++ b/src/PVE/LXC/Setup.pm
> @@ -424,6 +424,8 @@ sub get_ct_os_release {
> sub unified_cgroupv2_support {
> my ($self) = @_;
>
> + $self->{plugin} //= 'PVE::LXC::Setup::Base'; # unmanaged
> +
> $self->protected_call(sub {
> $self->{plugin}->unified_cgroupv2_support();
> });
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-13 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 12:33 [pve-devel] [PATCH v2 container] fix #3516: fix unmanaged containers Oguz Bektas
2021-07-13 13:49 ` Stoiko Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox