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 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 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
- func AddDesiredDevice(etcdClient etcd.KeysAPI, nodeID, uuid string, osdID int) error
- func AddDesiredDir(etcdClient etcd.KeysAPI, dir, nodeID string) error
- func GetAppliedOSDs(nodeID string, etcdClient etcd.KeysAPI) (map[int]string, error)
- func GetCrushMap(adminConn client.Connection) (string, error)
- func PopulateCollocatedPerfSchemeEntry(entry *PerfSchemeEntry, device string, storeConfig StoreConfig) error
- func PopulateDistributedPerfSchemeEntry(entry *PerfSchemeEntry, device string, metadataInfo *MetadataDeviceInfo, ...) error
- func RemoveDesiredDevice(etcdClient etcd.KeysAPI, nodeID, uuid string) error
- func Run(dcontext *clusterd.DaemonContext, agent *OsdAgent) error
- type Device
- type DeviceOsdIDEntry
- type DeviceOsdMapping
- type Leader
- type MetadataDeviceInfo
- type MetadataDevicePartition
- type OsdAgent
- type PartitionType
- type PerfScheme
- type PerfSchemeEntry
- type PerfSchemePartitionDetails
- type StoreConfig
Constants ¶
const ( DevicesValue = "devices" ForceFormatValue = "forceFormat" )
const ( Filestore = "filestore" Bluestore = "bluestore" DefaultStore = Filestore UseRemainingSpace = -1 WalDefaultSizeMB = 576 DBDefaultSizeMB = 20480 JournalDefaultSizeMB = 5120 )
Variables ¶
This section is empty.
Functions ¶
func AddDesiredDevice ¶
add a device to the desired state
func AddDesiredDir ¶
add a device to the desired state
func GetAppliedOSDs ¶
For all applied OSDs, gets a mapping of their osd IDs to their data device uuid
func GetCrushMap ¶
func GetCrushMap(adminConn client.Connection) (string, error)
calls osd getcrushmap
func PopulateCollocatedPerfSchemeEntry ¶ added in v0.4.0
func PopulateCollocatedPerfSchemeEntry(entry *PerfSchemeEntry, device string, storeConfig StoreConfig) error
populates a partition scheme entry for an OSD where all its partitions are collocated on a single device
func PopulateDistributedPerfSchemeEntry ¶ added in v0.4.0
func PopulateDistributedPerfSchemeEntry(entry *PerfSchemeEntry, device string, metadataInfo *MetadataDeviceInfo, storeConfig StoreConfig) error
populates a partition scheme entry for an OSD that will have distributed partitions: its metadata will live on a dedicated metadata device and its block data will live on a dedicated device
func RemoveDesiredDevice ¶
remove a device from the desired state
Types ¶
type DeviceOsdIDEntry ¶ added in v0.3.0
type DeviceOsdMapping ¶ added in v0.3.0
type DeviceOsdMapping struct {
Entries map[string]*DeviceOsdIDEntry // device name to OSD ID mapping entry
}
func NewDeviceOsdMapping ¶ added in v0.3.0
func NewDeviceOsdMapping() *DeviceOsdMapping
type MetadataDeviceInfo ¶ added in v0.4.0
type MetadataDeviceInfo struct { Device string `json:"device"` DiskUUID string `json:"diskUuid"` Partitions []*MetadataDevicePartition `json:"partitions"` }
represents a dedicated metadata device and all of the partitions stored on it
func NewMetadataDeviceInfo ¶ added in v0.4.0
func NewMetadataDeviceInfo(device string) *MetadataDeviceInfo
func (*MetadataDeviceInfo) GetPartitionArgs ¶ added in v0.4.0
func (m *MetadataDeviceInfo) GetPartitionArgs() []string
type MetadataDevicePartition ¶ added in v0.4.0
type MetadataDevicePartition struct { ID int `json:"id"` OsdUUID uuid.UUID `json:"osdUuid"` Type PartitionType `json:"type"` PartitionUUID string `json:"partitionUuid"` SizeMB int `json:"sizeMB"` OffsetMB int `json:"offsetMB"` }
representsa specific partition on a metadata device, including details about which OSD it belongs to
type OsdAgent ¶ added in v0.3.0
type OsdAgent struct {
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent(factory client.ConnectionFactory, devices string, usingDeviceFilter bool, metadataDevice, directories string, forceFormat bool, location string, storeConfig StoreConfig, cluster *mon.ClusterInfo) *OsdAgent
func (*OsdAgent) ConfigureLocalService ¶ added in v0.3.0
func (*OsdAgent) DestroyLocalService ¶ added in v0.3.0
func (*OsdAgent) Initialize ¶ added in v0.3.0
set the desired state in etcd
type PartitionType ¶ added in v0.4.0
type PartitionType int
const ( WalPartitionType PartitionType = iota DatabasePartitionType BlockPartitionType FilestoreDataPartitionType FilestoreJournalPartitionType )
type PerfScheme ¶ added in v0.4.0
type PerfScheme struct { Metadata *MetadataDeviceInfo `json:"metadata"` Entries []*PerfSchemeEntry `json:"entries"` }
top level representation of an overall performance oriented partition scheme, with a dedicated metadata device and entries for all OSDs that define where their partitions live
func LoadScheme ¶ added in v0.4.0
func LoadScheme(configDir string) (*PerfScheme, error)
Load the persistent partition info from the config directory.
func NewPerfScheme ¶ added in v0.4.0
func NewPerfScheme() *PerfScheme
func (*PerfScheme) Save ¶ added in v0.4.0
func (s *PerfScheme) Save(configDir string) error
Save the partition scheme to the config dir
type PerfSchemeEntry ¶ added in v0.4.0
type PerfSchemeEntry struct { ID int `json:"id"` OsdUUID uuid.UUID `json:"osdUuid"` Partitions map[PartitionType]*PerfSchemePartitionDetails `json:"partitions"` // mapping of partition name to its details StoreType string `json:"storeType,omitempty"` }
represents an OSD and details about all of its partitions
func NewPerfSchemeEntry ¶ added in v0.4.0
func NewPerfSchemeEntry(storeType string) *PerfSchemeEntry
func (*PerfSchemeEntry) GetPartitionArgs ¶ added in v0.4.0
func (e *PerfSchemeEntry) GetPartitionArgs() []string
func (*PerfSchemeEntry) IsCollocated ¶ added in v0.4.0
func (e *PerfSchemeEntry) IsCollocated() bool
determines if the given partition scheme entry is for a collocated OSD (all partitions on 1 device)