Documentation ¶
Overview ¶
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2018 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2018 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2018 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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.
Copyright 2016 The Rook Authors. All rights reserved.
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 AuthAdd(context *clusterd.Context, clusterName, name, keyringPath string, ...) error
- func AuthDelete(context *clusterd.Context, clusterName, name string) error
- func AuthGetKey(context *clusterd.Context, clusterName, name string) (string, error)
- func AuthGetOrCreate(context *clusterd.Context, clusterName, name, keyringPath string, ...) error
- func AuthGetOrCreateKey(context *clusterd.Context, clusterName, name string, caps []string) (string, error)
- func CreateDefaultCrushMap(context *clusterd.Context, clusterName string) (string, error)
- func CreateECPoolForApp(context *clusterd.Context, clusterName string, newPool CephStoragePoolDetails, ...) error
- func CreateErasureCodeProfile(context *clusterd.Context, clusterName string, ...) error
- func CreateFilesystem(context *clusterd.Context, clusterName, name, metadataPool string, ...) error
- func CreatePoolWithProfile(context *clusterd.Context, clusterName string, newPoolReq model.Pool, ...) error
- func CreateReplicatedPoolForApp(context *clusterd.Context, clusterName string, newPool CephStoragePoolDetails, ...) error
- func CrushRemove(context *clusterd.Context, clusterName, name string) (string, error)
- func CrushReweight(context *clusterd.Context, clusterName string, id int, weight float64) (string, error)
- func DeleteErasureCodeProfile(context *clusterd.Context, clusterName string, erasureCodeProfile string) error
- func DeleteImage(context *clusterd.Context, clusterName, name, poolName string) error
- func DeletePool(context *clusterd.Context, clusterName string, name string) error
- func DisableScrubbing(context *clusterd.Context, clusterName string) (string, error)
- func EnableScrubbing(context *clusterd.Context, clusterName string) (string, error)
- func ExecuteCephCommand(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteCephCommandDebugLog(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteCephCommandPlain(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteCephCommandPlainNoOutputFile(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteRBDCommand(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteRBDCommandNoFormat(context *clusterd.Context, clusterName string, args []string) ([]byte, error)
- func ExecuteRBDCommandWithTimeout(context *clusterd.Context, clusterName string, args []string) (string, error)
- func FailMDS(context *clusterd.Context, clusterName string, gid int) error
- func FinalizeCephCommandArgs(command string, args []string, configDir, clusterName string) (string, []string)
- func FormatLocation(location, hostName string) ([]string, error)
- func GetCrushHostName(context *clusterd.Context, clusterName string, osdID int) (string, error)
- func GetErasureCodeProfileForPool(poolName string) string
- func GetPoolNamesByID(context *clusterd.Context, clusterName string) (map[int]string, error)
- func GetPools(context *clusterd.Context, clusterName string) ([]model.Pool, error)
- func IsClusterClean(context *clusterd.Context, clusterName string) error
- func IsMultiFSEnabled() bool
- func ListErasureCodeProfiles(context *clusterd.Context, clusterName string) ([]string, error)
- func MapImage(context *clusterd.Context, ...) error
- func MarkFilesystemAsDown(context *clusterd.Context, clusterName string, fsName string) error
- func MgrDisableModule(context *clusterd.Context, clusterName, name string) error
- func MgrEnableModule(context *clusterd.Context, clusterName, name string, force bool) error
- func MgrSetConfig(context *clusterd.Context, clusterName, cephVersionName, key, val string) (bool, error)
- func OSDOut(context *clusterd.Context, clusterName string, osdID int) (string, error)
- func OSDRemove(context *clusterd.Context, clusterName string, osdID int) (string, error)
- func RemoveFilesystem(context *clusterd.Context, clusterName, fsName string) error
- func SetCrushMap(context *clusterd.Context, clusterName, compiledMap string) (string, error)
- func SetCrushTunables(context *clusterd.Context, clusterName, profile string) (string, error)
- func SetNumMDSRanks(context *clusterd.Context, clusterName, fsName string, activeMDSCount int32) error
- func SetPoolProperty(context *clusterd.Context, clusterName, name, propName string, propVal string) error
- func UnMapImage(context *clusterd.Context, ...) error
- func WaitForActiveRanks(context *clusterd.Context, clusterName, fsName string, ...) error
- type CephBlockImage
- type CephErasureCodeProfile
- type CephFilesystem
- type CephFilesystemDetails
- type CephStatus
- type CephStoragePoolDetails
- type CephStoragePoolStats
- type CephStoragePoolSummary
- type CephUsage
- type CheckMessage
- type CrushFindResult
- type CrushMap
- type HealthStatus
- type MDSInfo
- type MDSMap
- type MgrMap
- type MgrStandby
- type MonMap
- type MonMapEntry
- type MonStats
- type MonStatusRequest
- type MonStatusResponse
- type MonTimeSkewStatus
- type MonTimeStatus
- type OSDDump
- type OSDNodeUsage
- type OSDPerfStats
- type OSDUsage
- type OsdMap
- type PGDumpBrief
- type PgMap
- type PgStateEntry
Constants ¶
const ( AdminUsername = "client.admin" CephTool = "ceph" RBDTool = "rbd" Kubectl = "kubectl" CrushTool = "crushtool" )
const ( // CephHealthOK denotes the status of ceph cluster when healthy. CephHealthOK = "HEALTH_OK" // CephHealthWarn denotes the status of ceph cluster when unhealthy but recovering. CephHealthWarn = "HEALTH_WARN" // CephHealthErr denotes the status of ceph cluster when unhealthy but usually needs // manual intervention. CephHealthErr = "HEALTH_ERR" )
const (
ImageMinSize = uint64(1048576) // 1 MB
)
const ( // MultiFsEnv defines the name of the Rook environment variable which controls if Rook is // allowed to create multiple Ceph filesystems. MultiFsEnv = "ROOK_ALLOW_MULTIPLE_FILESYSTEMS" )
Variables ¶
var RunAllCephCommandsInToolbox = false
When running the e2e tests, all ceph commands need to be run in the toolbox. Everywhere else, the ceph tools are assumed to be in the container where we can shell out.
Functions ¶
func AuthAdd ¶
AuthAdd will create a new user with the given capabilities and using the already generated keyring found at the given keyring path. This should not be used when the user may already exist.
func AuthDelete ¶
AuthDelete will delete the given user.
func AuthGetKey ¶
AuthGetKey gets the key for the given user.
func AuthGetOrCreate ¶
func AuthGetOrCreate(context *clusterd.Context, clusterName, name, keyringPath string, caps []string) error
AuthGetOrCreate will either get or create a user with the given capabilities. The keyring for the user will be written to the given keyring path.
func AuthGetOrCreateKey ¶
func AuthGetOrCreateKey(context *clusterd.Context, clusterName, name string, caps []string) (string, error)
AuthGetOrCreateKey gets or creates the key for the given user.
func CreateDefaultCrushMap ¶
func CreateECPoolForApp ¶ added in v0.8.0
func CreateECPoolForApp(context *clusterd.Context, clusterName string, newPool CephStoragePoolDetails, appName string, enableECOverwrite bool, erasureCodedConfig model.ErasureCodedPoolConfig) error
func CreateFilesystem ¶
func CreateFilesystem(context *clusterd.Context, clusterName, name, metadataPool string, dataPools []string) error
CreateFilesystem performs software configuration steps for Ceph to provide a new filesystem.
func CreatePoolWithProfile ¶
func CreateReplicatedPoolForApp ¶ added in v0.8.0
func CrushRemove ¶
func CrushReweight ¶
func DeleteImage ¶
func DisableScrubbing ¶
func EnableScrubbing ¶
func ExecuteCephCommand ¶
func ExecuteCephCommandDebugLog ¶ added in v0.9.0
func ExecuteCephCommandPlain ¶
func ExecuteRBDCommand ¶
func FinalizeCephCommandArgs ¶ added in v0.8.0
func FormatLocation ¶
func GetCrushHostName ¶
func GetPoolNamesByID ¶
func IsClusterClean ¶
IsClusterClean returns a value indicating if the cluster is fully clean yet (i.e., all placement groups are in the active+clean state).
func IsMultiFSEnabled ¶ added in v0.8.0
func IsMultiFSEnabled() bool
IsMultiFSEnabled returns true if ROOK_ALLOW_MULTIPLE_FILESYSTEMS is set to "true", allowing Rook to create multiple Ceph filesystems. False if Rook is not allowed to do so.
func ListErasureCodeProfiles ¶
func MapImage ¶
func MapImage(context *clusterd.Context, imageName, poolName, id, keyring, clusterName, monitors string) error
MapImage maps an RBD image using admin cephfx and returns the device path
func MarkFilesystemAsDown ¶
MarkFilesystemAsDown marks a Ceph filesystem as down.
func MgrDisableModule ¶ added in v0.8.0
MgrDisableModule disables a mgr module
func MgrEnableModule ¶
MgrEnableModule enables a mgr module
func MgrSetConfig ¶ added in v0.9.0
func RemoveFilesystem ¶
RemoveFilesystem performs software configuration steps to remove a Ceph filesystem and its backing pools.
func SetCrushMap ¶
func SetCrushTunables ¶
func SetNumMDSRanks ¶ added in v0.9.0
func SetNumMDSRanks(context *clusterd.Context, clusterName, fsName string, activeMDSCount int32) error
SetNumMDSRanks sets the number of mds ranks (max_mds) for a Ceph filesystem.
func SetPoolProperty ¶
func UnMapImage ¶
func UnMapImage(context *clusterd.Context, imageName, poolName, id, keyring, clusterName, monitors string, force bool) error
UnMapImage unmap an RBD image from the node
func WaitForActiveRanks ¶ added in v0.9.0
func WaitForActiveRanks( context *clusterd.Context, clusterName, fsName string, desiredActiveRanks int32, moreIsOkay bool, timeout time.Duration, ) error
WaitForActiveRanks waits for the filesystem's number of active ranks to equal the desired count. It times out with an error if the number of active ranks does not become desired in time. Param 'moreIsOkay' will allow success condition if num of ranks is more than active count given.
Types ¶
type CephBlockImage ¶
type CephBlockImage struct { Name string `json:"image"` Size uint64 `json:"size"` Format int `json:"format"` InfoName string `json:"name"` }
func CreateImage ¶
func CreateImage(context *clusterd.Context, clusterName, name, poolName, dataPoolName string, size uint64) (*CephBlockImage, error)
CreateImage creates a block storage image. If dataPoolName is not empty, the image will use poolName as the metadata pool and the dataPoolname for data.
func ListImages ¶
func ListImages(context *clusterd.Context, clusterName, poolName string) ([]CephBlockImage, error)
type CephErasureCodeProfile ¶
type CephErasureCodeProfile struct { DataChunkCount uint `json:"k,string"` CodingChunkCount uint `json:"m,string"` Plugin string `json:"plugin"` Technique string `json:"technique"` FailureDomain string `json:"crush-failure-domain"` CrushRoot string `json:"crush-root"` }
func GetErasureCodeProfileDetails ¶
func GetErasureCodeProfileDetails(context *clusterd.Context, clusterName, name string) (CephErasureCodeProfile, error)
type CephFilesystem ¶
type CephFilesystem struct { Name string `json:"name"` MetadataPool string `json:"metadata_pool"` MetadataPoolID int `json:"metadata_pool_id"` DataPools []string `json:"data_pools"` DataPoolIDs []int `json:"data_pool_ids"` }
CephFilesystem is a representation of the json structure returned by 'ceph fs ls'
func ListFilesystems ¶
func ListFilesystems(context *clusterd.Context, clusterName string) ([]CephFilesystem, error)
ListFilesystems lists all filesystems provided by the Ceph cluster.
type CephFilesystemDetails ¶
CephFilesystemDetails is a representation of the main json structure returned by 'ceph fs get'
func GetFilesystem ¶
func GetFilesystem(context *clusterd.Context, clusterName string, fsName string) (*CephFilesystemDetails, error)
GetFilesystem gets detailed status information about a Ceph filesystem.
type CephStatus ¶
type CephStatus struct { Health HealthStatus `json:"health"` FSID string `json:"fsid"` ElectionEpoch int `json:"election_epoch"` Quorum []int `json:"quorum"` QuorumNames []string `json:"quorum_names"` MonMap MonMap `json:"monmap"` OsdMap struct { OsdMap OsdMap `json:"osdmap"` } `json:"osdmap"` PgMap PgMap `json:"pgmap"` MgrMap MgrMap `json:"mgrmap"` }
type CephStoragePoolDetails ¶
type CephStoragePoolDetails struct { Name string `json:"pool"` Number int `json:"pool_id"` Size uint `json:"size"` ErasureCodeProfile string `json:"erasure_code_profile"` FailureDomain string `json:"failureDomain"` CrushRoot string `json:"crushRoot"` }
func GetPoolDetails ¶
func GetPoolDetails(context *clusterd.Context, clusterName, name string) (CephStoragePoolDetails, error)
func ModelPoolToCephPool ¶
func ModelPoolToCephPool(modelPool model.Pool) CephStoragePoolDetails
type CephStoragePoolStats ¶
type CephStoragePoolStats struct { Pools []struct { Name string `json:"name"` ID int `json:"id"` Stats struct { BytesUsed float64 `json:"bytes_used"` RawBytesUsed float64 `json:"raw_bytes_used"` MaxAvail float64 `json:"max_avail"` Objects float64 `json:"objects"` DirtyObjects float64 `json:"dirty"` ReadIO float64 `json:"rd"` ReadBytes float64 `json:"rd_bytes"` WriteIO float64 `json:"wr"` WriteBytes float64 `json:"wr_bytes"` } `json:"stats"` } `json:"pools"` }
func GetPoolStats ¶
func GetPoolStats(context *clusterd.Context, clusterName string) (*CephStoragePoolStats, error)
type CephStoragePoolSummary ¶
func ListPoolSummaries ¶
func ListPoolSummaries(context *clusterd.Context, clusterName string) ([]CephStoragePoolSummary, error)
type CephUsage ¶
type CheckMessage ¶
type CrushFindResult ¶
type CrushFindResult struct { ID int `json:"osd"` IP string `json:"ip"` Location struct { // add more crush location fields if needed Root string `json:"root"` Host string `json:"host"` } `json:"crush_location"` }
func FindOSDInCrushMap ¶
type CrushMap ¶
type CrushMap struct { Devices []struct { ID int `json:"id"` Name string `json:"name"` Class string `json:"class"` } `json:"devices"` Types []struct { ID int `json:"type_id"` Name string `json:"name"` } `json:"types"` Buckets []struct { ID int `json:"id"` Name string `json:"name"` TypeID int `json:"type_id"` TypeName string `json:"type_name"` Weight int `json:"weight"` Alg string `json:"alg"` Hash string `json:"hash"` Items []struct { ID int `json:"id"` Weight int `json:"weight"` Pos int `json:"pos"` } `json:"items"` } `json:"buckets"` Rules []struct { ID int `json:"rule_id"` Name string `json:"rule_name"` Ruleset int `json:"ruleset"` Type int `json:"type"` MinSize int `json:"min_size"` MaxSize int `json:"max_size"` Steps []struct { Operation string `json:"op"` Number int `json:"num"` Item int `json:"item"` ItemName string `json:"item_name"` Type string `json:"type"` } `json:"steps"` } `json:"rules"` Tunables struct { } `json:"tunables"` }
type HealthStatus ¶
type HealthStatus struct { Status string `json:"status"` Checks map[string]CheckMessage `json:"checks"` }
type MDSInfo ¶
type MDSInfo struct { GID int `json:"gid"` Name string `json:"name"` Rank int `json:"rank"` State string `json:"state"` Address string `json:"addr"` }
MDSInfo is a representation of the individual mds daemon sub-sub-structure returned by 'ceph fs get'
type MDSMap ¶
type MDSMap struct { FilesystemName string `json:"fs_name"` Enabled bool `json:"enabled"` Root int `json:"root"` TableServer int `json:"tableserver"` MaxMDS int `json:"max_mds"` In []int `json:"in"` Up map[string]int `json:"up"` MetadataPool int `json:"metadata_pool"` DataPools []int `json:"data_pools"` Failed []int `json:"failed"` Damaged []int `json:"damaged"` Stopped []int `json:"stopped"` Info map[string]MDSInfo `json:"info"` }
MDSMap is a representation of the mds map sub-structure returned by 'ceph fs get'
type MgrStandby ¶
type MonMap ¶
type MonMap struct { Epoch int `json:"epoch"` FSID string `json:"fsid"` CreatedTime string `json:"created"` ModifiedTime string `json:"modified"` Mons []MonMapEntry `json:"mons"` }
type MonMapEntry ¶
type MonMapEntry struct { Name string `json:"name"` Rank int `json:"rank"` Address string `json:"addr"` }
represents an entry in the monitor map
type MonStats ¶
type MonStats struct { Health struct { Status string `json:"status"` Checks map[string]CheckMessage `json:"checks"` } `json:"health"` Quorum []int `json:"quorum"` }
MonStats is a subset of fields on the response from the mon command "status". These fields are focused on monitor stats.
type MonStatusRequest ¶
type MonStatusRequest struct { Prefix string `json:"prefix"` Format string `json:"format"` ID int `json:"id"` Weight float32 `json:"weight"` Pool string `json:"pool"` Var string `json:"var"` Args []string `json:"args"` }
request to simplify deserialization of a test request
type MonStatusResponse ¶
type MonStatusResponse struct { Quorum []int `json:"quorum"` MonMap struct { Mons []MonMapEntry `json:"mons"` } `json:"monmap"` }
represents the response from a mon_status mon_command (subset of all available fields, only marshal ones we care about)
func GetMonStatus ¶
func GetMonStatus(context *clusterd.Context, clusterName string, debug bool) (MonStatusResponse, error)
GetMonStatus calls mon_status mon_command
type MonTimeSkewStatus ¶
type MonTimeStatus ¶
type MonTimeStatus struct { Skew map[string]MonTimeSkewStatus `json:"time_skew_status"` Checks struct { Epoch int `json:"epoch"` Round int `json:"round"` RoundStatus string `json:"round_status"` } `json:"timechecks"` }
func GetMonTimeStatus ¶
func GetMonTimeStatus(context *clusterd.Context, clusterName string) (*MonTimeStatus, error)
type OSDDump ¶
type OSDNodeUsage ¶
type OSDNodeUsage struct { ID int `json:"id"` Name string `json:"name"` CrushWeight json.Number `json:"crush_weight"` Depth json.Number `json:"depth"` Reweight json.Number `json:"reweight"` KB json.Number `json:"kb"` UsedKB json.Number `json:"kb_used"` AvailKB json.Number `json:"kb_avail"` Utilization json.Number `json:"utilization"` Variance json.Number `json:"var"` Pgs json.Number `json:"pgs"` }
type OSDPerfStats ¶
type OSDPerfStats struct { PerfInfo []struct { ID json.Number `json:"id"` Stats struct { CommitLatency json.Number `json:"commit_latency_ms"` ApplyLatency json.Number `json:"apply_latency_ms"` } `json:"perf_stats"` } `json:"osd_perf_infos"` }
func GetOSDPerfStats ¶
func GetOSDPerfStats(context *clusterd.Context, clusterName string) (*OSDPerfStats, error)
type OSDUsage ¶
type OSDUsage struct { OSDNodes []OSDNodeUsage `json:"nodes"` Summary struct { TotalKB json.Number `json:"total_kb"` TotalUsedKB json.Number `json:"total_kb_used"` TotalAvailKB json.Number `json:"total_kb_avail"` AverageUtil json.Number `json:"average_utilization"` } `json:"summary"` }
func GetOSDUsage ¶
func (*OSDUsage) ByID ¶
func (usage *OSDUsage) ByID(osdID int) *OSDNodeUsage
type PGDumpBrief ¶
type PGDumpBrief struct { ID string `json:"pgid"` State string `json:"state"` UpOsdIDs []int `json:"up"` UpPrimaryID int `json:"up_primary"` ActingOsdIDs []int `json:"acting"` ActingPrimaryID int `json:"acting_primary"` }
func GetPGDumpBrief ¶
func GetPGDumpBrief(context *clusterd.Context, clusterName string) ([]PGDumpBrief, error)
type PgMap ¶
type PgMap struct { PgsByState []PgStateEntry `json:"pgs_by_state"` Version int `json:"version"` NumPgs int `json:"num_pgs"` DataBytes uint64 `json:"data_bytes"` UsedBytes uint64 `json:"bytes_used"` AvailableBytes uint64 `json:"bytes_avail"` TotalBytes uint64 `json:"bytes_total"` ReadBps uint64 `json:"read_bytes_sec"` WriteBps uint64 `json:"write_bytes_sec"` ReadOps uint64 `json:"read_op_per_sec"` WriteOps uint64 `json:"write_op_per_sec"` RecoveryBps uint64 `json:"recovering_bytes_per_sec"` RecoveryObjectsPerSec uint64 `json:"recovering_objects_per_sec"` RecoveryKeysPerSec uint64 `json:"recovering_keys_per_sec"` CacheFlushBps uint64 `json:"flush_bytes_sec"` CacheEvictBps uint64 `json:"evict_bytes_sec"` CachePromoteBps uint64 `json:"promote_op_per_sec"` }