Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Lamprecht
345243fa7e tree-wide: fix typos with codespell
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit ffc31266da)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 08:41:05 +02:00
Thomas Lamprecht
5c04a0b317 ceph: get_local_version: allow optional v prefix for version number
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 18:50:06 +02:00
Thomas Lamprecht
7435dc9071 s/ceph_version/local_ceph_version/ for clarity
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-25 11:37:26 +02:00
Alwin Antreich
e54c3e3347 Fix #2705: cephfs: mount fails with bad option
dmesg: libceph: bad option at 'conf=/etc/pve/ceph.conf'

After the upgrade to PVE 6 with Ceph Luminous, the mount.ceph helper
doesn't understand the conf= option yet. And the CephFS mount with the
kernel client fails. After upgrading to Ceph Nautilus the option exists
in the mount.ceph helper.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-04-25 11:15:23 +02:00
Thomas Lamprecht
e38418266f cephcfg sort keys in write_ceph_config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-29 19:59:08 +01:00
Dominik Csapak
5b79dac99b CephConfig: read monitor addresses also from mon_host for cephfs
since we write only the mon_host config beginning with nautilus,
we have to get the monitor ips from there as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-27 16:16:36 +02:00
Dominik Csapak
c8a3234574 CephConfig: refactor host port parsing
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-27 16:16:36 +02:00
Dominik Csapak
c835d9eca8 CephConfig: do not always interpret '; ' as a comment
; is the beginning of a comment, but in some configuration settings
it is also valid syntax, e.g. for mon_host it is a valid
seperator for hosts (sigh ...)

only remove lines when it starts with a ';'

since we remove all comments anyway any time we write the ceph conf
it should not really matter for our users

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-27 16:16:36 +02:00
Thomas Lamprecht
60fd708242 followup: comment reword
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-19 10:23:01 +02:00
Dominik Csapak
9841fa31b5 CephConfig: map special config key characters to _
we want a consistent config has, regardless of how the user or a tool
adds it to the config, so we map ' ' and '-' to '_' in the keys

this way we can always access the correct key without trying multiple
times

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-19 10:21:42 +02:00
Thomas Lamprecht
4b3088a0a8 get_monaddr_list: also ensure that returned 'mon addr' are defined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-09 15:23:44 +01:00
Alwin Antreich
187df8553e ceph: get_monaddr_list: exclude general monitor section
Else, if a general MON section existed in the ceph.conf, we added a
undefined entry and a cephfs storage can't be mounted anymore.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-09 13:40:21 +01:00
David Limbeck
5b5534a9d7 fix use of uninitialized value in parse_ceph_config
Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2019-01-03 10:26:57 +01:00
Dominik Csapak
71be011328 register ceph.conf parser/writer
With this we can use cfs_read_file/cfs_write_file and cfs_lock_file.

Code for writing is mostly copied from pve-managers CephTools.pm,
with the addition of mgr sections.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-12-20 09:26:11 +01:00
Dominik Csapak
4050fcc16b move Storage/CephTools to CephConfig
it is not a storage plugin, and it makes more sense to have it
top-level, but there we cannot name it CephTools because of the
existing ones in pve-manager

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-12-20 09:26:11 +01:00