* [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
@ 2024-11-26 16:51 Hannes Laimer
2024-11-27 8:58 ` Thomas Lamprecht
2024-11-27 9:06 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 4+ messages in thread
From: Hannes Laimer @ 2024-11-26 16:51 UTC (permalink / raw)
To: pbs-devel
Reported-by: Markus Frank <m.frank@proxmox.com>
Fixes: 94a068e31 ("api: node: allow creation of removable datastore through directory endpoint")
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/api2/node/disks/directory.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
index 2f7cc7a27..6a76dd5a7 100644
--- a/src/api2/node/disks/directory.rs
+++ b/src/api2/node/disks/directory.rs
@@ -237,7 +237,7 @@ pub fn create_datastore_disk(
let lock = pbs_config::datastore::lock_config()?;
let datastore: DataStoreConfig = if removable_datastore {
serde_json::from_value(
- json!({ "name": name, "path": format!("/{name}"), "backing-device": uuid }),
+ json!({ "name": name, "path": name, "backing-device": uuid }),
)?
} else {
serde_json::from_value(json!({ "name": name, "path": mount_point }))?
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
2024-11-26 16:51 [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore Hannes Laimer
@ 2024-11-27 8:58 ` Thomas Lamprecht
2024-11-27 9:03 ` Hannes Laimer
2024-11-27 9:06 ` [pbs-devel] applied: " Thomas Lamprecht
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2024-11-27 8:58 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Hannes Laimer
Can you please add a comment message for this with some rationale, e.g.,
why the old value was assembled that way, if there was any reasoning back
then, simple mistakes naturally happen too to everybody, and/or why this
is now the correct way.
You can also write it as reply and I amend the patch or send a v2,
whatever you prefer.
Am 26.11.24 um 17:51 schrieb Hannes Laimer:
> Reported-by: Markus Frank <m.frank@proxmox.com>
> Fixes: 94a068e31 ("api: node: allow creation of removable datastore through directory endpoint")
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> src/api2/node/disks/directory.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
> index 2f7cc7a27..6a76dd5a7 100644
> --- a/src/api2/node/disks/directory.rs
> +++ b/src/api2/node/disks/directory.rs
> @@ -237,7 +237,7 @@ pub fn create_datastore_disk(
> let lock = pbs_config::datastore::lock_config()?;
> let datastore: DataStoreConfig = if removable_datastore {
> serde_json::from_value(
> - json!({ "name": name, "path": format!("/{name}"), "backing-device": uuid }),
> + json!({ "name": name, "path": name, "backing-device": uuid }),
> )?
> } else {
> serde_json::from_value(json!({ "name": name, "path": mount_point }))?
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
2024-11-27 8:58 ` Thomas Lamprecht
@ 2024-11-27 9:03 ` Hannes Laimer
0 siblings, 0 replies; 4+ messages in thread
From: Hannes Laimer @ 2024-11-27 9:03 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox Backup Server development discussion
On 11/27/24 09:58, Thomas Lamprecht wrote:
> Can you please add a comment message for this with some rationale, e.g.,
> why the old value was assembled that way, if there was any reasoning back
> then, simple mistakes naturally happen too to everybody, and/or why this
> is now the correct way.
>
> You can also write it as reply and I amend the patch or send a v2,
> whatever you prefer.
>
In an earlier version of this series the datastore path was absolute for
removable datastores. This is a leftover I missed when changing that.
> Am 26.11.24 um 17:51 schrieb Hannes Laimer:
>> Reported-by: Markus Frank <m.frank@proxmox.com>
>> Fixes: 94a068e31 ("api: node: allow creation of removable datastore through directory endpoint")
>> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
>> ---
>> src/api2/node/disks/directory.rs | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/api2/node/disks/directory.rs b/src/api2/node/disks/directory.rs
>> index 2f7cc7a27..6a76dd5a7 100644
>> --- a/src/api2/node/disks/directory.rs
>> +++ b/src/api2/node/disks/directory.rs
>> @@ -237,7 +237,7 @@ pub fn create_datastore_disk(
>> let lock = pbs_config::datastore::lock_config()?;
>> let datastore: DataStoreConfig = if removable_datastore {
>> serde_json::from_value(
>> - json!({ "name": name, "path": format!("/{name}"), "backing-device": uuid }),
>> + json!({ "name": name, "path": name, "backing-device": uuid }),
>> )?
>> } else {
>> serde_json::from_value(json!({ "name": name, "path": mount_point }))?
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
2024-11-26 16:51 [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore Hannes Laimer
2024-11-27 8:58 ` Thomas Lamprecht
@ 2024-11-27 9:06 ` Thomas Lamprecht
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2024-11-27 9:06 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Hannes Laimer
Am 26.11.24 um 17:51 schrieb Hannes Laimer:
> Reported-by: Markus Frank <m.frank@proxmox.com>
> Fixes: 94a068e31 ("api: node: allow creation of removable datastore through directory endpoint")
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> src/api2/node/disks/directory.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, with your commit message (slightly adapted) fleeced in, thanks!
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-27 9:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26 16:51 [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore Hannes Laimer
2024-11-27 8:58 ` Thomas Lamprecht
2024-11-27 9:03 ` Hannes Laimer
2024-11-27 9:06 ` [pbs-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox