* [pve-devel] [PATCH manager] fix #4808: ceph: use setting names with underscores
@ 2023-09-05 8:53 Maximiliano Sandoval
2023-09-06 14:57 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2023-09-05 8:53 UTC (permalink / raw)
To: pve-devel
As suggested in [1], it is recommended to use `_` in all cases when
dealing with config files.
[1] https://docs.ceph.com/en/reef/rados/configuration/ceph-conf/#option-names
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
PVE/API2/Ceph/MDS.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Ceph/MDS.pm b/PVE/API2/Ceph/MDS.pm
index 1cb0b74f..6fc0ae45 100644
--- a/PVE/API2/Ceph/MDS.pm
+++ b/PVE/API2/Ceph/MDS.pm
@@ -153,10 +153,10 @@ __PACKAGE__->register_method ({
}
$cfg->{$section}->{host} = $nodename;
- $cfg->{$section}->{"mds standby for name"} = 'pve';
+ $cfg->{$section}->{'mds_standby_for_name'} = 'pve';
if ($param->{hotstandby}) {
- $cfg->{$section}->{"mds standby replay"} = 'true';
+ $cfg->{$section}->{'mds_standby_replay'} = 'true';
}
cfs_write_file('ceph.conf', $cfg);
--
2.39.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH manager] fix #4808: ceph: use setting names with underscores
2023-09-05 8:53 [pve-devel] [PATCH manager] fix #4808: ceph: use setting names with underscores Maximiliano Sandoval
@ 2023-09-06 14:57 ` Thomas Lamprecht
2023-09-07 9:07 ` Maximiliano Sandoval
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2023-09-06 14:57 UTC (permalink / raw)
To: Proxmox VE development discussion, Maximiliano Sandoval
Am 05/09/2023 um 10:53 schrieb Maximiliano Sandoval:
> As suggested in [1], it is recommended to use `_` in all cases when
> dealing with config files.
>
> [1] https://docs.ceph.com/en/reef/rados/configuration/ceph-conf/#option-names
The first thing I asked myself was "how is the priority though if both exist?"
Then I had to check the code and saw that this is only affecting
MDS creation, where we enforce that the config section doesn't exist,
so it's OK (but still relevant info, so I added it to the commit
message).
Anyhow, it would be still good to know how ceph handles the situation
where both exist, e.g.:
mds standby for name = foo
mds_standby_for_name = bar
# what about mixing them?
mds_standy for name
Also, did you checked for other such occurrences in our API?
Manually tracing all call sites where cfs_write_file('ceph.conf', ..) is
called should allow you to find most potential call sites using
the undesired style.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> PVE/API2/Ceph/MDS.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-07 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 8:53 [pve-devel] [PATCH manager] fix #4808: ceph: use setting names with underscores Maximiliano Sandoval
2023-09-06 14:57 ` [pve-devel] applied: " Thomas Lamprecht
2023-09-07 9:07 ` Maximiliano Sandoval
2023-09-07 9:30 ` Maximiliano Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox