all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] api: directory: use relative path when creating removable datastore
Date: Wed, 27 Nov 2024 10:03:27 +0100	[thread overview]
Message-ID: <433bb804-e861-4201-a802-17c709ecaff1@proxmox.com> (raw)
In-Reply-To: <f8b7d473-018c-4612-8a59-114bf2a2c2c2@proxmox.com>



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


  reply	other threads:[~2024-11-27  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 16:51 Hannes Laimer
2024-11-27  8:58 ` Thomas Lamprecht
2024-11-27  9:03   ` Hannes Laimer [this message]
2024-11-27  9:06 ` [pbs-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=433bb804-e861-4201-a802-17c709ecaff1@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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