* [pve-devel] [PATCH storage] pbs: update attribute: cleaner error message if not supported
@ 2021-11-12 14:29 Fabian Ebner
2021-11-12 15:54 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-11-12 14:29 UTC (permalink / raw)
To: pve-devel
Reported-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
PVE/Storage/PBSPlugin.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm
index 06ebfa7..e186663 100644
--- a/PVE/Storage/PBSPlugin.pm
+++ b/PVE/Storage/PBSPlugin.pm
@@ -881,7 +881,12 @@ sub update_volume_attribute {
my $conn = pbs_api_connect($scfg, $password);
my $datastore = $scfg->{datastore};
- $conn->put("/api2/json/admin/datastore/$datastore/$attribute", $param);
+ eval { $conn->put("/api2/json/admin/datastore/$datastore/$attribute", $param); };
+ if (my $err = $@) {
+ die "Server is not recent enough to support feature '$attribute'\n"
+ if $err->{code} == 404;
+ die $err;
+ }
return;
}
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH storage] pbs: update attribute: cleaner error message if not supported
2021-11-12 14:29 [pve-devel] [PATCH storage] pbs: update attribute: cleaner error message if not supported Fabian Ebner
@ 2021-11-12 15:54 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-12 15:54 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Ebner
On 12.11.21 15:29, Fabian Ebner wrote:
> Reported-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> PVE/Storage/PBSPlugin.pm | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-12 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 14:29 [pve-devel] [PATCH storage] pbs: update attribute: cleaner error message if not supported Fabian Ebner
2021-11-12 15:54 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal