Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func ComputeClusterObjectCount(cluster models.Cluster) map[string]interface{}
- func ComputeClusterPGNum(cluster models.Cluster, ctxt string) (map[string]uint64, error)
- func ComputeMonCount(selectCriteria bson.M) (map[string]int, error)
- func ComputeObjectCount(selectCriteria bson.M) (map[string]int64, error)
- func ComputeSystemPGNum() (map[string]uint64, error)
- func CreateClusterUsingInstaller(cluster_uuid *uuid.UUID, request models.AddClusterRequest, ...) error
- func CreateClusterUsingSalt(cluster_uuid *uuid.UUID, request models.AddClusterRequest, ...) error
- func CreateDefaultECProfiles(ctxt string, mon string, clusterId uuid.UUID) (bool, error)
- func DerivePgNum(clusterId uuid.UUID, size string, replicaCount int, profile string) uint
- func EmitRbdEvents(params map[string]interface{})
- func ExpandClusterUsingInstaller(cluster_uuid *uuid.UUID, request models.AddClusterRequest, ...) error
- func ExpandClusterUsingSalt(cluster_uuid *uuid.UUID, request models.AddClusterRequest, ...) error
- func FetchClusterStats(ctxt string, cluster models.Cluster, monName string) (map[string]map[string]string, error)
- func FetchOSDStats(ctxt string, cluster models.Cluster, monName string) (map[string]map[string]string, error)
- func FetchObjectCount(ctxt string, cluster models.Cluster, monName string) (map[string]map[string]string, error)
- func FetchPGSummary(ctxt string, cluster models.Cluster, monName string) (map[string]map[string]string, error)
- func FetchRBDStats(ctxt string, cluster models.Cluster, monName string) (map[string]map[string]string, error)
- func FetchStorageProfileUtilizations(ctxt string, osdDetails OSDStats, cluster models.Cluster) (statsToPush map[string]map[string]string, err error, ...)
- func GetCalamariMonNode(clusterId uuid.UUID, ctxt string) (*models.Node, error)
- func GetDbProvider() dbprovider.DbInterface
- func GetMons(param bson.M) (models.Nodes, error)
- func GetRandomMon(clusterId uuid.UUID) (*models.Node, error)
- func GetStatInBytes(stat string) (int64, error)
- func HandleCalamariEvent(e models.AppEvent, ctxt string) (err error, statusCode int)
- func HandleEvent(e models.Event, ctxt string) (err error, statusCode int)
- func InitInstaller() error
- func InitMonitoringManager() error
- func InitializeDb() error
- func PopulateBlockDevices(bootstrapNode string, clusterId uuid.UUID, ctxt string) error
- func PopulateClusterDetails(bootstrapNode string, ctxt string) (*uuid.UUID, string, error)
- func PopulateClusterNetworkDetails(bootstrapNode string, clusterId uuid.UUID, ctxt string) error
- func PopulateClusterNodes(bootstrapNode string, clusterId uuid.UUID, nodes []string, ctxt string) ([]string, error)
- func PopulateClusterOSDs(bootstrapNode string, clusterId uuid.UUID, ctxt string) error
- func PopulateClusterStatus(bootstrapNode string, clusterId uuid.UUID, ctxt string) error
- func PopulateNodeNetworkDetails(clusterId uuid.UUID, nodes []string, ctxt string) ([]string, error)
- func PopulateStoragePools(bootstrapNode string, clusterId uuid.UUID, ctxt string) error
- func RecalculatePgnum(ctxt string, clusterId uuid.UUID, t *task.Task) bool
- func ScheduleRbdEventEmitter() error
- func SortDisksOnSize(disks []models.Disk) []models.Disk
- func SyncOsdStatus(clusterId uuid.UUID, ctxt string) error
- func UpdateCrushNodeItems(ctxt string, clusterId uuid.UUID, sluList map[string]models.StorageLogicalUnit) error
- func UpdateMonCountToSummaries(ctxt string, cluster models.Cluster)
- func UpdateObjectCountToSummaries(ctxt string, cluster models.Cluster)
- func UpdatePgNumToSummaries(cluster models.Cluster, ctxt string)
- type CephProvider
- func (s *CephProvider) CreateBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) CreateCluster(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) CreateStorage(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) DeleteBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) ExpandCluster(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetClusterConfig(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetClusterNodesForImport(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetClusterStatus(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetClusterSummary(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetDiskHierarchy(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetServiceCount(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetStorages(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) GetSummary(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) ImportCluster(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) MonitorCluster(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) ProcessEvent(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) RemoveStorage(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) ResizeBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) StopTask(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) SyncBlockDevices(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) SyncStorageLogicalUnitParams(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) SyncStorageLogicalUnits(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) SyncStorageNodes(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) SyncStorages(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) UpdateStorage(req models.RpcRequest, resp *models.RpcResponse) error
- func (s *CephProvider) UpdateStorageLogicalUnitParams(req models.RpcRequest, resp *models.RpcResponse) error
- type ClusterStats
- type ExistingJournal
- type JournalDetail
- type OSDStats
- type PoolStats
- type RBDStats
Constants ¶
const ( RULEOFFSET = 10000 MINSIZE = 1 MAXSIZE = 10 MON = "MON" OSD = "OSD" JOURNALSIZE = 5120 MAX_JOURNALS_ON_SSD = 4 MIN_MON_IN_CLUSTER = 3 BYTE_TO_TB = 1099511627776 CRUSH_DEFAULT_ROOT_NODE_ID = -1 CRUSH_DEFAULT_RULE_ID = 0 )
const ( DEFAULT_PG_NUM = 128 TARGET_PGS_PER_OSD = 200 MAX_UTILIZATION_PCNT = 80 )
Variables ¶
var ( EventTypes map[string]string DbManager dbprovider.DbInterface )
var (
MonitoringManager skyring_monitoring.MonitoringManagerInterface
)
var MonitoringRoutines = []interface{}{ FetchOSDStats, FetchClusterStats, FetchRBDStats, FetchObjectCount, FetchPGSummary, }
Functions ¶
func ComputeClusterObjectCount ¶ added in v0.0.34
func ComputeClusterPGNum ¶ added in v0.0.34
func ComputeMonCount ¶ added in v0.0.34
func ComputeObjectCount ¶ added in v0.0.34
func ComputeSystemPGNum ¶ added in v0.0.34
func CreateClusterUsingSalt ¶
func CreateDefaultECProfiles ¶
func DerivePgNum ¶
RULES FOR DERIVING THE PG NUM if no of osds <= 5 then
no of PGs = 128
if no of osds > 5 and <= 10 then
no of PGs = 512
if no of osds > 10 and <= 50 then
no of PGs = 4096
if no of osds > 50 then
no of PGs = (Avg Target PGs per OSD * No of OSDs * Data Percentage) / Replica Count -- where Data Percentage = Target Allocation Size / Max Allocation Size -- where Target Allocation Size - provided in request Max Allocation Size = ((Average OSD Size * No of OSDs) / Replica Count) * Max Utilization Factor -- where Max Utilization Factor is set as 0.8 Finally round this value of next 2's power
func EmitRbdEvents ¶ added in v0.0.27
func EmitRbdEvents(params map[string]interface{})
func ExpandClusterUsingSalt ¶
func FetchClusterStats ¶
func FetchOSDStats ¶
func FetchObjectCount ¶
func FetchPGSummary ¶
func FetchRBDStats ¶
func GetCalamariMonNode ¶
func GetDbProvider ¶
func GetDbProvider() dbprovider.DbInterface
func GetStatInBytes ¶ added in v0.0.38
func HandleCalamariEvent ¶
func InitInstaller ¶
func InitInstaller() error
func InitMonitoringManager ¶
func InitMonitoringManager() error
func InitializeDb ¶
func InitializeDb() error
func PopulateBlockDevices ¶
func PopulateClusterDetails ¶
func PopulateClusterNodes ¶
func PopulateClusterOSDs ¶
func PopulateClusterStatus ¶
func PopulateStoragePools ¶
func ScheduleRbdEventEmitter ¶ added in v0.0.27
func ScheduleRbdEventEmitter() error
func UpdateCrushNodeItems ¶
func UpdateMonCountToSummaries ¶ added in v0.0.34
func UpdateObjectCountToSummaries ¶ added in v0.0.34
func UpdatePgNumToSummaries ¶ added in v0.0.34
Types ¶
type CephProvider ¶
type CephProvider struct{}
func (*CephProvider) CreateBlockDevice ¶
func (s *CephProvider) CreateBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) CreateCluster ¶
func (s *CephProvider) CreateCluster(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) CreateStorage ¶
func (s *CephProvider) CreateStorage(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) DeleteBlockDevice ¶
func (s *CephProvider) DeleteBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) ExpandCluster ¶
func (s *CephProvider) ExpandCluster(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetClusterConfig ¶
func (s *CephProvider) GetClusterConfig(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetClusterNodesForImport ¶
func (s *CephProvider) GetClusterNodesForImport(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetClusterStatus ¶
func (s *CephProvider) GetClusterStatus(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetClusterSummary ¶
func (s *CephProvider) GetClusterSummary(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetDiskHierarchy ¶ added in v0.0.21
func (s *CephProvider) GetDiskHierarchy(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetServiceCount ¶
func (s *CephProvider) GetServiceCount(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetStorages ¶
func (s *CephProvider) GetStorages(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) GetSummary ¶
func (s *CephProvider) GetSummary(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) ImportCluster ¶
func (s *CephProvider) ImportCluster(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) MonitorCluster ¶
func (s *CephProvider) MonitorCluster(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) ProcessEvent ¶
func (s *CephProvider) ProcessEvent(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) RemoveStorage ¶
func (s *CephProvider) RemoveStorage(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) ResizeBlockDevice ¶
func (s *CephProvider) ResizeBlockDevice(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) StopTask ¶
func (s *CephProvider) StopTask(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) SyncBlockDevices ¶
func (s *CephProvider) SyncBlockDevices(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) SyncStorageLogicalUnitParams ¶
func (s *CephProvider) SyncStorageLogicalUnitParams(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) SyncStorageLogicalUnits ¶
func (s *CephProvider) SyncStorageLogicalUnits(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) SyncStorageNodes ¶
func (s *CephProvider) SyncStorageNodes(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) SyncStorages ¶
func (s *CephProvider) SyncStorages(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) UpdateStorage ¶
func (s *CephProvider) UpdateStorage(req models.RpcRequest, resp *models.RpcResponse) error
func (*CephProvider) UpdateStorageLogicalUnitParams ¶
func (s *CephProvider) UpdateStorageLogicalUnitParams(req models.RpcRequest, resp *models.RpcResponse) error
type ClusterStats ¶ added in v0.0.24
type ExistingJournal ¶ added in v0.0.24
type ExistingJournal struct { Journal JournalDetail `json:"journal"` OsdCount int `json:"osdcount"` }