Documentation ¶
Index ¶
- Constants
- func CheckSpaceAvailable(isMigration bool, dbDataPath string, version string, skipStorageCheck bool, ...) (bool, error)
- func CreateJsonFile(params *PostChecklist, path string) error
- func GetMajorVersion(version string) (string, bool)
- func IsExternalElasticSearch() bool
- func IsExternalPG() bool
- func PatchBestOpenSearchSettings(writer cli.FormatWriter, isEmbedded bool) error
- func SetSeenTrueForExternal() error
- type Checklist
- type ChecklistHelper
- type ChecklistManager
- type ChecklistUpgradeFlags
- type ESSettings
- type IndexInfo
- type IndicesShardTotal
- type IndicesTotalLimit
- type PostCheckListItem
- type PostChecklist
- type PostChecklistManager
- func (pcm *PostChecklistManager) CreatePostChecklistFile(path string) error
- func (pcm *PostChecklistManager) ReadPendingPostChecklistFile(path string) ([]string, error)
- func (pcm *PostChecklistManager) ReadPostChecklistById(id string, path string) (bool, error)
- func (pcm *PostChecklistManager) UpdatePostChecklistFile(id string, path string) error
- type V3ChecklistManager
- type V4ChecklistManager
Constants ¶
View Source
const ( MAX_OPEN_FILE_DEFAULT = "65535" MAX_LOCKED_MEM_DEFAULT = "unlimited" MAX_OPEN_FILE_KEY = "Max open files" MAX_LOCKED_MEM_KEY = "Max locked memory" INDICES_TOTAL_SHARD_DEFAULT = 2000 INDICES_BREAKER_TOTAL_LIMIT_DEFAULT = "95" INDICES_TOTAL_SHARD_INCREMENT_DEFAULT = 500 MAX_POSSIBLE_HEAP_SIZE = 32 V3ESSettingFile = "/hab/svc/deployment-service/old_es_v3_settings.json" AutomateOpensearchConfigPatch = "/hab/svc/deployment-service/oss-config.toml" )
View Source
const ( MIN_DIRSIZE_GB float64 = 5 DISKSPACE_CHECK_ERROR = `` /* 187-byte string literal not displayed */ HAB_DIR = "/hab" HAB_5GB_FREE_SPACE_ERROR = "\n - /hab/ directory should have more than 5GB free space" DIR_FREE_SPACE_ERROR = "\n - %s directory should have more than %.2fGB free space" DEST_FLAG_INFO = "" /* 129-byte string literal not displayed */ )
View Source
const (
FILE_NAME = "upgrade_metadata.json"
)
View Source
const (
POST_UPGRADE_HEADER = `
Post Upgrade Steps:
===================
`
)
Variables ¶
This section is empty.
Functions ¶
func CheckSpaceAvailable ¶
func CreateJsonFile ¶
func CreateJsonFile(params *PostChecklist, path string) error
func GetMajorVersion ¶
func IsExternalElasticSearch ¶
func IsExternalElasticSearch() bool
func IsExternalPG ¶
func IsExternalPG() bool
func PatchBestOpenSearchSettings ¶
func PatchBestOpenSearchSettings(writer cli.FormatWriter, isEmbedded bool) error
func SetSeenTrueForExternal ¶
func SetSeenTrueForExternal() error
Types ¶
type Checklist ¶
type Checklist struct { Name string Description string TestFunc func(ChecklistHelper) error }
type ChecklistHelper ¶
type ChecklistHelper struct {
Writer cli.FormatWriter
}
type ChecklistManager ¶
type ChecklistManager interface { RunChecklist(int64, ChecklistUpgradeFlags) error GetPostChecklist() []PostCheckListItem }
func NewChecklistManager ¶
func NewChecklistManager(writer cli.FormatWriter, version string) (ChecklistManager, error)
type ChecklistUpgradeFlags ¶
type ESSettings ¶
type ESSettings struct { TotalShardSettings int64 `json:"totalShardSettings" toml:"totalShardSettings"` IndicesBreakerTotalLimit string `json:"indicesBreakerTotalLimit" toml:"indicesBreakerTotalLimit"` RuntimeMaxOpenFile string `json:"runtimeMaxOpenFile" toml:"runtimeMaxOpenFile"` RuntimeMaxLockedMem string `json:"runtimeMaxLockedMem" toml:"runtimeMaxLockedMem"` HeapMemory string `json:"heapMemory" toml:"heapMemory"` }
func GetBestSettings ¶
func GetBestSettings(writer cli.FormatWriter) *ESSettings
func GetDefaultOSSettings ¶
func GetDefaultOSSettings() *ESSettings
func GetESSettings ¶
func GetESSettings(writer cli.FormatWriter) (*ESSettings, error)
type IndicesShardTotal ¶
type IndicesShardTotal struct { Indices struct { Shards struct { Total int64 `json:"total"` } `json:"shards"` } `json:"indices"` }
type IndicesTotalLimit ¶
type PostCheckListItem ¶
type PostChecklist ¶
type PostChecklist struct { Version string `json:"version"` PostChecklist []PostCheckListItem `json:"post_checklist"` Seen bool `json:"seen"` }
func ReadJsonFile ¶
func ReadJsonFile(path string) (*PostChecklist, error)
type PostChecklistManager ¶
type PostChecklistManager struct {
// contains filtered or unexported fields
}
func NewPostChecklistManager ¶
func NewPostChecklistManager(version string) (*PostChecklistManager, error)
func (*PostChecklistManager) CreatePostChecklistFile ¶
func (pcm *PostChecklistManager) CreatePostChecklistFile(path string) error
func (*PostChecklistManager) ReadPendingPostChecklistFile ¶
func (pcm *PostChecklistManager) ReadPendingPostChecklistFile(path string) ([]string, error)
func (*PostChecklistManager) ReadPostChecklistById ¶
func (pcm *PostChecklistManager) ReadPostChecklistById(id string, path string) (bool, error)
func (*PostChecklistManager) UpdatePostChecklistFile ¶
func (pcm *PostChecklistManager) UpdatePostChecklistFile(id string, path string) error
type V3ChecklistManager ¶
type V3ChecklistManager struct {
// contains filtered or unexported fields
}
func NewV3ChecklistManager ¶
func NewV3ChecklistManager(writer cli.FormatWriter, version string) *V3ChecklistManager
func (*V3ChecklistManager) GetPostChecklist ¶
func (ci *V3ChecklistManager) GetPostChecklist() []PostCheckListItem
func (*V3ChecklistManager) RunChecklist ¶
func (ci *V3ChecklistManager) RunChecklist(timeout int64, flags ChecklistUpgradeFlags) error
type V4ChecklistManager ¶
type V4ChecklistManager struct {
// contains filtered or unexported fields
}
func NewV4ChecklistManager ¶
func NewV4ChecklistManager(writer cli.FormatWriter, version string) *V4ChecklistManager
func (*V4ChecklistManager) GetPostChecklist ¶
func (ci *V4ChecklistManager) GetPostChecklist() []PostCheckListItem
func (*V4ChecklistManager) RunChecklist ¶
func (ci *V4ChecklistManager) RunChecklist(timeout int64, flags ChecklistUpgradeFlags) error
Click to show internal directories.
Click to hide internal directories.