[pve-devel] [PATCH v2 container 17/18] rework update_pct_config to write into pending section

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 2 12:42:43 CEST 2019


On 9/30/19 2:44 PM, Oguz Bektas wrote:
> use vmconfig_hotplug_pending or vmconfig_apply_pending to apply the
> pending changes, depending on whether the CT is on- or offline.
> 
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>  src/PVE/LXC/Config.pm | 334 ++++++++++++++----------------------------
>  1 file changed, 106 insertions(+), 228 deletions(-)
> 
> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
> index 47bd4bb..14c26bc 100644
> --- a/src/PVE/LXC/Config.pm
> +++ b/src/PVE/LXC/Config.pm
> @@ -4,11 +4,13 @@ use strict;
>  use warnings;
>  
>  use PVE::AbstractConfig;
> +use PVE::RPCEnvironment;
>  use PVE::Cluster qw(cfs_register_file);
>  use PVE::GuestHelpers;
>  use PVE::INotify;
> +use PVE::Exception qw(raise_param_exc);
>  use PVE::JSONSchema qw(get_standard_option);
> -use PVE::Tools;
> +use PVE::Tools qw(extract_param);
>  
>  use base qw(PVE::AbstractConfig);
>  
> @@ -900,267 +902,143 @@ sub write_pct_config {
>  }
>  
>  sub update_pct_config {
> -    my ($class, $vmid, $conf, $running, $param, $delete) = @_;
> +    my ($class, $vmid, $conf, $running, $param) = @_;

you already use the new $param behavior and remove the $delete
one from the api/config PUT call in 16/18 but only make it work
here? NAK!

Breaks things, even if only temporarily, and makes review unnecessary
harder.




More information about the pve-devel mailing list