[pve-devel] [PATCH container v3] fix #3516: fix unmanaged containers

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 20 13:44:47 CEST 2021


On 20.07.21 13:29, Oguz Bektas wrote:
> 
> any news here?
> 

feels to much like a hack to me, sprinkling that side effects of setting the
plugin to base for the whole worker in some "random" helper is far to subtle
and dangerous...

If, it should have been set only locally, not writing to the $self state, but
I've some idea to avoid some of the (less evil) unmanaged hacks we already have..

> On Wed, Jul 14, 2021 at 11:51:51AM +0200, Oguz Bektas wrote:
>> unmanaged containers should run the unified cgroupv2 code from our base
>> plugin so that they can start correctly instead of erroring out
>>
>> Tested-by: Stoiko Ivanov <s.ivanov at proxmox.com>
>> Reviewed-by: Stoiko Ivanov <s.ivanov at proxmox.com>
>> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
>> ---
>> v2-> v3:
>> * added comment from stoiko's reply
>>
>>
>>  src/PVE/LXC/Setup.pm | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
>> index 9abdc85..4408dcc 100644
>> --- a/src/PVE/LXC/Setup.pm
>> +++ b/src/PVE/LXC/Setup.pm
>> @@ -424,6 +424,10 @@ sub get_ct_os_release {
>>  sub unified_cgroupv2_support {
>>      my ($self) = @_;
>>  
>> +    # code in base plugin is a generic check and should work
>> +    # for most distributions
>> +    $self->{plugin} //= 'PVE::LXC::Setup::Base'; # unmanaged
>> +
>>      $self->protected_call(sub {
>>  	$self->{plugin}->unified_cgroupv2_support();
>>      });
>> -- 
>> 2.30.2





More information about the pve-devel mailing list