[pve-devel] [PATCH container] lxc: fall back to 'unmanaged' when no OS detected

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 26 11:57:25 CEST 2020


On 5/26/20 11:40 AM, Arnout Engelen wrote:
> On Tue, May 26, 2020 at 11:31 AM Thomas Lamprecht
> <t.lamprecht at proxmox.com> wrote:
>> On 5/18/20 1:17 PM, Arnout Engelen wrote:
>>> Perhaps it would be even more consistent to make 'unmanaged' a plugin
>>> next to the various OS plugins, but I wanted to keep the change as
>>> simple as possible for now.
> 
>>>      if (my $id = $os_release->{ID}) {
>>> -    return $id if $plugins->{$id};
>>> +    return $id if $plugins->{$id} or $id eq "unmanaged";
>>
>> I thought a bit about this, maybe it's really better to avoid fake
>> ostype for now?
> 
> I'm not sure I understand what you're suggesting?

avoid the os-release "unmanaged" detection as it'd may bite us later on,
e.g., if an distro with "unmanaged" ID gets created and is super nice as
CT so we want to support it. Granted, not very likely, but maybe still
better to play safe. So, iow, let's only do the fallback for no os-release
file at all below.

Thanks!

> 
>> I'd add a warning message here, i.e. something which stands out like:
>> warn "\nWARNING: unable to detect OS distribution and no os-release, fallback to 'unmanaged'\n";
> 
> Will do.
> 
> 
> Arnout
> 





More information about the pve-devel mailing list