[pve-devel] [PATCH storage v3 01/20] rbd: add pveceph storage option

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Aug 31 11:38:04 CEST 2017


to allow differentiating between user-created RBD storage
entries, and those created and managed by pveceph.

make 'monhost' option optional to allow storages managed by
pveceph to rely only on /etc/pve/ceph.conf

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
changes since v2:
- combined patches 1 and 2

changes since v1:
- make parameter fixed
- adapted description for new behaviour

note: I am not sure how we want to handle 'upgrades' here.. currently,
switching from old to new is only possible by manually editing storage.cfg. to
allow switching via pvesm / the API, we'd need to make both non-fixed and rely
on check_config and the respective descriptions to ensure their mutual
exclusivity..

 PVE/Storage/RBDPlugin.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 250ee7c..70d1fda 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -277,6 +277,10 @@ sub properties {
 	    description => "Access rbd through krbd kernel module.",
 	    type => 'boolean',
 	},
+	pveceph => {
+	    description => "Storage configuration managed by pveceph (using /etc/pve/ceph.conf).",
+	    type => 'boolean',
+	}
     };
 }
 
@@ -284,11 +288,12 @@ sub options {
     return {
 	nodes => { optional => 1 },
 	disable => { optional => 1 },
-	monhost => { fixed => 1 },
+	monhost => { optional => 1, fixed => 1 },
 	pool => { optional => 1 },
 	username => { optional => 1 },
 	content => { optional => 1 },
 	krbd => { optional => 1 },
+	pveceph => { optional => 1, fixed => 1 },
     };
 }
 
-- 
2.11.0





More information about the pve-devel mailing list