Merge pull request #5023 from leseb/allow-size-1
ceph: allow setting pool size 1 on octopus
This commit is contained in:
2 files changed
+21
-18
No files matched your search
@@ -57,15 +57,13 @@ var (
|
||||
|
||||
// GlobalConfig represents the [global] sections of Ceph's config file.
|
||||
type GlobalConfig struct {
|
||||
FSID string `ini:"fsid,omitempty"`
|
||||
MonMembers string `ini:"mon initial members,omitempty"`
|
||||
MonHost string `ini:"mon host"`
|
||||
PublicAddr string `ini:"public addr,omitempty"`
|
||||
PublicNetwork string `ini:"public network,omitempty"`
|
||||
ClusterAddr string `ini:"cluster addr,omitempty"`
|
||||
ClusterNetwork string `ini:"cluster network,omitempty"`
|
||||
MonAllowPoolDelete bool `ini:"mon_allow_pool_delete"`
|
||||
MonAllowPoolSizeOne bool `ini:"mon_allow_pool_size_one"`
|
||||
FSID string `ini:"fsid,omitempty"`
|
||||
MonMembers string `ini:"mon initial members,omitempty"`
|
||||
MonHost string `ini:"mon host"`
|
||||
PublicAddr string `ini:"public addr,omitempty"`
|
||||
PublicNetwork string `ini:"public network,omitempty"`
|
||||
ClusterAddr string `ini:"cluster addr,omitempty"`
|
||||
ClusterNetwork string `ini:"cluster network,omitempty"`
|
||||
}
|
||||
|
||||
// CephConfig represents an entire Ceph config including all sections.
|
||||
@@ -163,15 +161,13 @@ func CreateDefaultCephConfig(context *clusterd.Context, cluster *ClusterInfo) (*
|
||||
|
||||
conf := &CephConfig{
|
||||
GlobalConfig: &GlobalConfig{
|
||||
FSID: cluster.FSID,
|
||||
MonMembers: strings.Join(monMembers, " "),
|
||||
MonHost: strings.Join(monHosts, ","),
|
||||
PublicAddr: context.NetworkInfo.PublicAddr,
|
||||
PublicNetwork: context.NetworkInfo.PublicNetwork,
|
||||
ClusterAddr: context.NetworkInfo.ClusterAddr,
|
||||
ClusterNetwork: context.NetworkInfo.ClusterNetwork,
|
||||
MonAllowPoolDelete: true,
|
||||
MonAllowPoolSizeOne: true,
|
||||
FSID: cluster.FSID,
|
||||
MonMembers: strings.Join(monMembers, " "),
|
||||
MonHost: strings.Join(monHosts, ","),
|
||||
PublicAddr: context.NetworkInfo.PublicAddr,
|
||||
PublicNetwork: context.NetworkInfo.PublicNetwork,
|
||||
ClusterAddr: context.NetworkInfo.ClusterAddr,
|
||||
ClusterNetwork: context.NetworkInfo.ClusterNetwork,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,13 @@ func DefaultCentralizedConfigs(cephVersion version.CephVersion) []Option {
|
||||
}...)
|
||||
}
|
||||
|
||||
// For Octopus
|
||||
if cephVersion.IsAtLeastOctopus() {
|
||||
overrides = append(overrides, []Option{
|
||||
configOverride("global", "mon allow pool size one", "true"),
|
||||
}...)
|
||||
}
|
||||
|
||||
return overrides
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user