Am 06.02.26 um 1:44 PM schrieb Daniel Kral:
> This plugin method is only called in PVE::LXC::Setup::new() and is
> wrapped in an eval block, so it won't fail to create the container, but
> report an error that the plugin method is not implemented for unmanaged
> containers.
> 
> Signed-off-by: Daniel Kral <[email protected]>
> ---
> changes from v1:
>   - none
> 
>  src/PVE/LXC/Setup/Unmanaged.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/PVE/LXC/Setup/Unmanaged.pm b/src/PVE/LXC/Setup/Unmanaged.pm
> index aa26c1c..b51be55 100644
> --- a/src/PVE/LXC/Setup/Unmanaged.pm
> +++ b/src/PVE/LXC/Setup/Unmanaged.pm
> @@ -65,6 +65,11 @@ sub ssh_host_key_types_to_generate {
>      return;
>  }
>  
> +sub detect_architecture {
> +    my ($self) = @_;
> +    return;

Thinking through it again, should we rather just die here instead of
returning undef? It seems to me that the contract for the method is
currently "either return the detected architecture or die". Then patch
4/4 would not be needed. Your new implementation adds a "or return
undef" to the contract making it more complicated.

> +}
> +
>  # hooks
>  
>  sub pre_start_hook {




Reply via email to