all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
@ 2022-09-20 10:08 Matthias Heiserer
  2022-09-20 10:19 ` [pbs-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Heiserer @ 2022-09-20 10:08 UTC (permalink / raw)
  To: pbs-devel

It pulls to root namespace instead.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 src/bin/proxmox-backup-manager.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
index 9857d701..58e7e33a 100644
--- a/src/bin/proxmox-backup-manager.rs
+++ b/src/bin/proxmox-backup-manager.rs
@@ -305,7 +305,7 @@ async fn pull_datastore(
     }
 
     if ns.is_some() {
-        args["local-ns"] = json!(ns);
+        args["ns"] = json!(ns);
     }
 
     if max_depth.is_some() {
-- 
2.30.2





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 10:08 [pbs-devel] [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting Matthias Heiserer
@ 2022-09-20 10:19 ` Fabian Grünbichler
  2022-09-20 10:24   ` Thomas Lamprecht
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Grünbichler @ 2022-09-20 10:19 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion

thanks for the quick fix!

On September 20, 2022 12:08 pm, Matthias Heiserer wrote:
> It pulls to root namespace instead.
> 
> Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
> ---
>  src/bin/proxmox-backup-manager.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
> index 9857d701..58e7e33a 100644
> --- a/src/bin/proxmox-backup-manager.rs
> +++ b/src/bin/proxmox-backup-manager.rs
> @@ -305,7 +305,7 @@ async fn pull_datastore(
>      }
>  
>      if ns.is_some() {
> -        args["local-ns"] = json!(ns);
> +        args["ns"] = json!(ns);
>      }
>  
>      if max_depth.is_some() {
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 
> 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 10:19 ` [pbs-devel] applied: " Fabian Grünbichler
@ 2022-09-20 10:24   ` Thomas Lamprecht
  2022-09-20 10:43     ` Fabian Grünbichler
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lamprecht @ 2022-09-20 10:24 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Fabian Grünbichler

Am 20/09/2022 um 12:19 schrieb Fabian Grünbichler:
> thanks for the quick fix!

You were quicker (I wanted to amend the commit message a bit) and currently
wondering why that POST call went through anyway, as the extra unknown
parameter should cause a higher level error?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 10:24   ` Thomas Lamprecht
@ 2022-09-20 10:43     ` Fabian Grünbichler
  2022-09-20 10:48       ` Thomas Lamprecht
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Grünbichler @ 2022-09-20 10:43 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Thomas Lamprecht

On September 20, 2022 12:24 pm, Thomas Lamprecht wrote:
> Am 20/09/2022 um 12:19 schrieb Fabian Grünbichler:
>> thanks for the quick fix!
> 
> You were quicker (I wanted to amend the commit message a bit) and currently
> wondering why that POST call went through anyway, as the extra unknown
> parameter should cause a higher level error?

I was looking in parallel based on the forum report and then saw the 
patch coming in ;)

the API defaults to (silently) allowing additional properties, which is 
why this is neither an error nor logged anywhere. this behaviour comes 
from PVE IIRC.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 10:43     ` Fabian Grünbichler
@ 2022-09-20 10:48       ` Thomas Lamprecht
  2022-09-20 11:18         ` Fabian Grünbichler
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lamprecht @ 2022-09-20 10:48 UTC (permalink / raw)
  To: Fabian Grünbichler, Proxmox Backup Server development discussion

Am 20/09/2022 um 12:43 schrieb Fabian Grünbichler:
> On September 20, 2022 12:24 pm, Thomas Lamprecht wrote:
>> Am 20/09/2022 um 12:19 schrieb Fabian Grünbichler:
>>> thanks for the quick fix!
>>
>> You were quicker (I wanted to amend the commit message a bit) and currently
>> wondering why that POST call went through anyway, as the extra unknown
>> parameter should cause a higher level error?
> 
> I was looking in parallel based on the forum report and then saw the 
> patch coming in ;)
> 
> the API defaults to (silently) allowing additional properties, which is 
> why this is neither an error nor logged anywhere. this behaviour comes 
> from PVE IIRC.

That normally should require a explicit `additional_properties: true,` which
we do not set here. The ObjectSchema has it set to false by default and PVE's
default is also false IIRC, resulting in a 400 error..




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 10:48       ` Thomas Lamprecht
@ 2022-09-20 11:18         ` Fabian Grünbichler
  2022-09-20 11:21           ` Thomas Lamprecht
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Grünbichler @ 2022-09-20 11:18 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Thomas Lamprecht

On September 20, 2022 12:48 pm, Thomas Lamprecht wrote:
> Am 20/09/2022 um 12:43 schrieb Fabian Grünbichler:
>> On September 20, 2022 12:24 pm, Thomas Lamprecht wrote:
>>> Am 20/09/2022 um 12:19 schrieb Fabian Grünbichler:
>>>> thanks for the quick fix!
>>>
>>> You were quicker (I wanted to amend the commit message a bit) and currently
>>> wondering why that POST call went through anyway, as the extra unknown
>>> parameter should cause a higher level error?
>> 
>> I was looking in parallel based on the forum report and then saw the 
>> patch coming in ;)
>> 
>> the API defaults to (silently) allowing additional properties, which is 
>> why this is neither an error nor logged anywhere. this behaviour comes 
>> from PVE IIRC.
> 
> That normally should require a explicit `additional_properties: true,` which
> we do not set here. The ObjectSchema has it set to false by default and PVE's
> default is also false IIRC, resulting in a 400 error..
> 

parameters here is an AllOfSchema, and that unconditionally allows 
additional properties.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pbs-devel] applied: [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting
  2022-09-20 11:18         ` Fabian Grünbichler
@ 2022-09-20 11:21           ` Thomas Lamprecht
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Lamprecht @ 2022-09-20 11:21 UTC (permalink / raw)
  To: Fabian Grünbichler, Proxmox Backup Server development discussion

Am 20/09/2022 um 13:18 schrieb Fabian Grünbichler:
> On September 20, 2022 12:48 pm, Thomas Lamprecht wrote:
>> Am 20/09/2022 um 12:43 schrieb Fabian Grünbichler:
>>> On September 20, 2022 12:24 pm, Thomas Lamprecht wrote:
>>>> Am 20/09/2022 um 12:19 schrieb Fabian Grünbichler:
>>>>> thanks for the quick fix!
>>>>
>>>> You were quicker (I wanted to amend the commit message a bit) and currently
>>>> wondering why that POST call went through anyway, as the extra unknown
>>>> parameter should cause a higher level error?
>>>
>>> I was looking in parallel based on the forum report and then saw the 
>>> patch coming in ;)
>>>
>>> the API defaults to (silently) allowing additional properties, which is 
>>> why this is neither an error nor logged anywhere. this behaviour comes 
>>> from PVE IIRC.
>>
>> That normally should require a explicit `additional_properties: true,` which
>> we do not set here. The ObjectSchema has it set to false by default and PVE's
>> default is also false IIRC, resulting in a 400 error..
>>
> 
> parameters here is an AllOfSchema, and that unconditionally allows 
> additional properties.

yuck, that is ugly




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-20 11:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 10:08 [pbs-devel] [PATCH proxmox-backup] pbs-manager: fix pull not respecting local ns setting Matthias Heiserer
2022-09-20 10:19 ` [pbs-devel] applied: " Fabian Grünbichler
2022-09-20 10:24   ` Thomas Lamprecht
2022-09-20 10:43     ` Fabian Grünbichler
2022-09-20 10:48       ` Thomas Lamprecht
2022-09-20 11:18         ` Fabian Grünbichler
2022-09-20 11:21           ` 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