Documentation ¶
Index ¶
- Constants
- func NewUpgradeInspectorV4(w *cli.Writer, upgradeUtils UpgradeV4Utils, fileUtils fileutils.FileUtils, ...) inspector.Inspector
- type DisableShardingInspection
- func (ds *DisableShardingInspection) ExitHandler() error
- func (ds *DisableShardingInspection) GetInstallationType() inspector.InstallationType
- func (ds *DisableShardingInspection) GetShortInfo() []string
- func (ds *DisableShardingInspection) Inspect() (err error)
- func (ds *DisableShardingInspection) RollBackHandler() (err error)
- func (ds *DisableShardingInspection) ShowInfo(index *int) error
- func (ds *DisableShardingInspection) Skip()
- type DiskSpaceInspection
- func (ds *DiskSpaceInspection) ExitHandler() error
- func (ds *DiskSpaceInspection) GetInstallationType() inspector.InstallationType
- func (ds *DiskSpaceInspection) GetShortInfo() []string
- func (ds *DiskSpaceInspection) GetSpaceNeeded(habRootPath string) (habFreeSpace float64, esDataSize float64, err error)
- func (ds *DiskSpaceInspection) Inspect() error
- func (ds *DiskSpaceInspection) ShowInfo(index *int) (err error)
- func (ds *DiskSpaceInspection) Skip()
- type ESIndexInspection
- func (es *ESIndexInspection) ExitHandler() error
- func (es *ESIndexInspection) GetInstallationType() inspector.InstallationType
- func (es *ESIndexInspection) GetShortInfo() []string
- func (es *ESIndexInspection) Inspect() (err error)
- func (es *ESIndexInspection) ShowInfo(index *int) error
- func (es *ESIndexInspection) Skip()
- type ESSettings
- type EnableMaintenanceInspection
- func (em *EnableMaintenanceInspection) ExitHandler() error
- func (em *EnableMaintenanceInspection) GetInstallationType() inspector.InstallationType
- func (em *EnableMaintenanceInspection) GetShortInfo() []string
- func (em *EnableMaintenanceInspection) Inspect() (err error)
- func (em *EnableMaintenanceInspection) RollBackHandler() (err error)
- func (em *EnableMaintenanceInspection) ShowInfo(index *int) error
- func (em *EnableMaintenanceInspection) Skip()
- type EnsureStatusInspection
- func (es *EnsureStatusInspection) ExitHandler() error
- func (es *EnsureStatusInspection) GetInstallationType() inspector.InstallationType
- func (es *EnsureStatusInspection) GetShortInfo() []string
- func (es *EnsureStatusInspection) Inspect() (err error)
- func (es *EnsureStatusInspection) ShowInfo(index *int) error
- func (es *EnsureStatusInspection) Skip()
- type IndexData
- type IndexInfo
- type IndicesShardTotal
- type MockUpgradeV4UtilsImp
- func (utl *MockUpgradeV4UtilsImp) ExecRequest(url, methodType string, requestBody io.Reader) ([]byte, error)
- func (utl *MockUpgradeV4UtilsImp) GetBackupS3URL(timeout int64) (string, error)
- func (utl *MockUpgradeV4UtilsImp) GetESBasePath(timeout int64) string
- func (utl *MockUpgradeV4UtilsImp) GetMaintenanceStatus(timeout int64) (bool, error)
- func (utl *MockUpgradeV4UtilsImp) GetServicesStatus() (bool, error)
- func (utl *MockUpgradeV4UtilsImp) IsExternalElasticSearch(timeout int64) bool
- func (utl *MockUpgradeV4UtilsImp) PatchS3backupURL(timeout int64) (stdOut, stdErr string, err error)
- func (utl *MockUpgradeV4UtilsImp) SetMaintenanceMode(timeout int64, status bool) (stdOut, stdErr string, err error)
- type PlannedDownTimeInspection
- type ReplaceS3UrlInspection
- func (ru *ReplaceS3UrlInspection) ExitHandler() error
- func (ru *ReplaceS3UrlInspection) GetInstallationType() inspector.InstallationType
- func (ru *ReplaceS3UrlInspection) GetShortInfo() []string
- func (ru *ReplaceS3UrlInspection) Inspect() (err error)
- func (ru *ReplaceS3UrlInspection) ShowInfo(index *int) error
- func (ru *ReplaceS3UrlInspection) Skip()
- type StoreESSettingsInspection
- func (ses *StoreESSettingsInspection) ExitHandler() error
- func (ses *StoreESSettingsInspection) GetInstallationType() inspector.InstallationType
- func (ses *StoreESSettingsInspection) GetShortInfo() []string
- func (ses *StoreESSettingsInspection) Inspect() error
- func (ses *StoreESSettingsInspection) ShowInfo(index *int) error
- func (ses *StoreESSettingsInspection) Skip()
- type TakeBackupInspection
- type UpgradeInspectorV4
- func (ui *UpgradeInspectorV4) AddDefaultInspections()
- func (ui *UpgradeInspectorV4) AddInspection(inspection inspector.Inspection)
- func (ui *UpgradeInspectorV4) Inspect() (err error)
- func (ui *UpgradeInspectorV4) RollBackChangesOnError() (err error)
- func (ui *UpgradeInspectorV4) RunExitAction() error
- func (ui *UpgradeInspectorV4) RunUpgradeInspector(osDestDir string, skipStorageCheck bool) (isError bool)
- func (ui *UpgradeInspectorV4) SetOSDestDir(path string)
- func (ui *UpgradeInspectorV4) SetSkipStoragecheckFlag(check bool)
- func (ui *UpgradeInspectorV4) ShowInfo() error
- func (ui *UpgradeInspectorV4) ShowInspectionList()
- type UpgradeV4Utils
- type UpgradeV4UtilsImp
- func (cu *UpgradeV4UtilsImp) ExecRequest(url, methodType string, requestBody io.Reader) ([]byte, error)
- func (cu *UpgradeV4UtilsImp) GetBackupS3URL(timeout int64) (string, error)
- func (cu *UpgradeV4UtilsImp) GetESBasePath(timeout int64) string
- func (cu *UpgradeV4UtilsImp) GetMaintenanceStatus(timeout int64) (bool, error)
- func (cu *UpgradeV4UtilsImp) GetServicesStatus() (bool, error)
- func (cu *UpgradeV4UtilsImp) IsExternalElasticSearch(timeout int64) bool
- func (cu *UpgradeV4UtilsImp) PatchS3backupURL(timeout int64) (stdOut, stdErr string, err error)
- func (cu *UpgradeV4UtilsImp) SetMaintenanceMode(timeout int64, status bool) (stdOut, stdErr string, err error)
Constants ¶
View Source
const ( MIN_HAB_FREE_SPACE float64 = 5.5 MIN_REQ_SPACE_STR = "The %s directory should have at least %.1fGB of free space" ENSURE_SPACE = "\nPlease ensure the available free space is %.1fGB\nand run " UPGRADE_CMD = "chef-automate upgrade run --major" ES_DATA = "/svc/automate-elasticsearch/data" )
View Source
const ( INDEX_BATCH_SIZE int = 10 MSG_ES_CHECKING string = "Elasticsearch indices are in version 6" BIG_SPACE = " " INDEX_ACTION = `` /* 322-byte string literal not displayed */ )
View Source
const ( S3_REGEX = "https?://s3.(.*).amazonaws.com" NEW_S3_URL = "https://s3.amazonaws.com" )
View Source
const ( HAB_DIR string = "/hab" UPGRADE_TERMINATED string = "Upgrade process terminated." )
View Source
const (
ES_URL = "http://localhost:10141/_cluster/settings"
)
Variables ¶
This section is empty.
Functions ¶
func NewUpgradeInspectorV4 ¶
Types ¶
type DisableShardingInspection ¶
type DisableShardingInspection struct {
// contains filtered or unexported fields
}
func NewDisableShardingInspection ¶
func NewDisableShardingInspection(w *cli.Writer, utls UpgradeV4Utils) *DisableShardingInspection
func (*DisableShardingInspection) ExitHandler ¶
func (ds *DisableShardingInspection) ExitHandler() error
func (*DisableShardingInspection) GetInstallationType ¶
func (ds *DisableShardingInspection) GetInstallationType() inspector.InstallationType
func (*DisableShardingInspection) GetShortInfo ¶
func (ds *DisableShardingInspection) GetShortInfo() []string
func (*DisableShardingInspection) Inspect ¶
func (ds *DisableShardingInspection) Inspect() (err error)
func (*DisableShardingInspection) RollBackHandler ¶
func (ds *DisableShardingInspection) RollBackHandler() (err error)
func (*DisableShardingInspection) ShowInfo ¶
func (ds *DisableShardingInspection) ShowInfo(index *int) error
func (*DisableShardingInspection) Skip ¶
func (ds *DisableShardingInspection) Skip()
type DiskSpaceInspection ¶
type DiskSpaceInspection struct {
// contains filtered or unexported fields
}
func NewDiskSpaceInspection ¶
func (*DiskSpaceInspection) ExitHandler ¶
func (ds *DiskSpaceInspection) ExitHandler() error
func (*DiskSpaceInspection) GetInstallationType ¶
func (ds *DiskSpaceInspection) GetInstallationType() inspector.InstallationType
func (*DiskSpaceInspection) GetShortInfo ¶
func (ds *DiskSpaceInspection) GetShortInfo() []string
func (*DiskSpaceInspection) GetSpaceNeeded ¶
func (ds *DiskSpaceInspection) GetSpaceNeeded(habRootPath string) (habFreeSpace float64, esDataSize float64, err error)
func (*DiskSpaceInspection) Inspect ¶
func (ds *DiskSpaceInspection) Inspect() error
func (*DiskSpaceInspection) ShowInfo ¶
func (ds *DiskSpaceInspection) ShowInfo(index *int) (err error)
func (*DiskSpaceInspection) Skip ¶
func (ds *DiskSpaceInspection) Skip()
type ESIndexInspection ¶
type ESIndexInspection struct {
// contains filtered or unexported fields
}
func NewESIndexInspection ¶
func NewESIndexInspection(w *cli.Writer, utls UpgradeV4Utils, esBasePath string) *ESIndexInspection
func (*ESIndexInspection) ExitHandler ¶
func (es *ESIndexInspection) ExitHandler() error
func (*ESIndexInspection) GetInstallationType ¶
func (es *ESIndexInspection) GetInstallationType() inspector.InstallationType
func (*ESIndexInspection) GetShortInfo ¶
func (es *ESIndexInspection) GetShortInfo() []string
func (*ESIndexInspection) Inspect ¶
func (es *ESIndexInspection) Inspect() (err error)
func (*ESIndexInspection) ShowInfo ¶
func (es *ESIndexInspection) ShowInfo(index *int) error
func (*ESIndexInspection) Skip ¶
func (es *ESIndexInspection) Skip()
type ESSettings ¶
type ESSettings struct {
TotalShardSettings int64 `json:"totalShardSettings" toml:"totalShardSettings"`
}
type EnableMaintenanceInspection ¶
type EnableMaintenanceInspection struct {
// contains filtered or unexported fields
}
func NewEnableMaintenanceInspection ¶
func NewEnableMaintenanceInspection(w *cli.Writer, utls UpgradeV4Utils, timeout int64) *EnableMaintenanceInspection
func (*EnableMaintenanceInspection) ExitHandler ¶
func (em *EnableMaintenanceInspection) ExitHandler() error
func (*EnableMaintenanceInspection) GetInstallationType ¶
func (em *EnableMaintenanceInspection) GetInstallationType() inspector.InstallationType
func (*EnableMaintenanceInspection) GetShortInfo ¶
func (em *EnableMaintenanceInspection) GetShortInfo() []string
func (*EnableMaintenanceInspection) Inspect ¶
func (em *EnableMaintenanceInspection) Inspect() (err error)
func (*EnableMaintenanceInspection) RollBackHandler ¶
func (em *EnableMaintenanceInspection) RollBackHandler() (err error)
func (*EnableMaintenanceInspection) ShowInfo ¶
func (em *EnableMaintenanceInspection) ShowInfo(index *int) error
func (*EnableMaintenanceInspection) Skip ¶
func (em *EnableMaintenanceInspection) Skip()
type EnsureStatusInspection ¶
type EnsureStatusInspection struct {
// contains filtered or unexported fields
}
func NewEnsureStatusInspection ¶
func NewEnsureStatusInspection(w *cli.Writer, upgradeUtils UpgradeV4Utils) *EnsureStatusInspection
func (*EnsureStatusInspection) ExitHandler ¶
func (es *EnsureStatusInspection) ExitHandler() error
func (*EnsureStatusInspection) GetInstallationType ¶
func (es *EnsureStatusInspection) GetInstallationType() inspector.InstallationType
func (*EnsureStatusInspection) GetShortInfo ¶
func (es *EnsureStatusInspection) GetShortInfo() []string
func (*EnsureStatusInspection) Inspect ¶
func (es *EnsureStatusInspection) Inspect() (err error)
func (*EnsureStatusInspection) ShowInfo ¶
func (es *EnsureStatusInspection) ShowInfo(index *int) error
func (*EnsureStatusInspection) Skip ¶
func (es *EnsureStatusInspection) Skip()
type IndicesShardTotal ¶
type IndicesShardTotal struct { Indices struct { Shards struct { Total int64 `json:"total"` } `json:"shards"` } `json:"indices"` }
type MockUpgradeV4UtilsImp ¶
type MockUpgradeV4UtilsImp struct { IsExternalElasticSearchFunc func(timeout int64) bool ExecRequestFunc func(url, methodType string, requestBody io.Reader) ([]byte, error) GetESBasePathFunc func(timeout int64) string GetBackupS3URLFunc func(timeout int64) (string, error) PatchS3backupURLFunc func(timeout int64) (stdOut, stdErr string, err error) GetMaintenanceStatusFunc func(timeout int64) (bool, error) SetMaintenanceModeFunc func(timeout int64, status bool) (stdOut, stdErr string, err error) GetServicesStatusFunc func() (bool, error) }
func (*MockUpgradeV4UtilsImp) ExecRequest ¶
func (*MockUpgradeV4UtilsImp) GetBackupS3URL ¶
func (utl *MockUpgradeV4UtilsImp) GetBackupS3URL(timeout int64) (string, error)
func (*MockUpgradeV4UtilsImp) GetESBasePath ¶
func (utl *MockUpgradeV4UtilsImp) GetESBasePath(timeout int64) string
func (*MockUpgradeV4UtilsImp) GetMaintenanceStatus ¶
func (utl *MockUpgradeV4UtilsImp) GetMaintenanceStatus(timeout int64) (bool, error)
func (*MockUpgradeV4UtilsImp) GetServicesStatus ¶
func (utl *MockUpgradeV4UtilsImp) GetServicesStatus() (bool, error)
func (*MockUpgradeV4UtilsImp) IsExternalElasticSearch ¶
func (utl *MockUpgradeV4UtilsImp) IsExternalElasticSearch(timeout int64) bool
func (*MockUpgradeV4UtilsImp) PatchS3backupURL ¶
func (utl *MockUpgradeV4UtilsImp) PatchS3backupURL(timeout int64) (stdOut, stdErr string, err error)
func (*MockUpgradeV4UtilsImp) SetMaintenanceMode ¶
func (utl *MockUpgradeV4UtilsImp) SetMaintenanceMode(timeout int64, status bool) (stdOut, stdErr string, err error)
type PlannedDownTimeInspection ¶
type PlannedDownTimeInspection struct {
// contains filtered or unexported fields
}
func NewPlannedDownTimeInspection ¶
func NewPlannedDownTimeInspection(w *cli.Writer) *PlannedDownTimeInspection
func (*PlannedDownTimeInspection) ShowInfo ¶
func (pd *PlannedDownTimeInspection) ShowInfo(index *int) error
type ReplaceS3UrlInspection ¶
type ReplaceS3UrlInspection struct {
// contains filtered or unexported fields
}
func NewReplaceS3UrlInspection ¶
func NewReplaceS3UrlInspection(w *cli.Writer, utls UpgradeV4Utils, timeout int64) *ReplaceS3UrlInspection
func (*ReplaceS3UrlInspection) ExitHandler ¶
func (ru *ReplaceS3UrlInspection) ExitHandler() error
func (*ReplaceS3UrlInspection) GetInstallationType ¶
func (ru *ReplaceS3UrlInspection) GetInstallationType() inspector.InstallationType
func (*ReplaceS3UrlInspection) GetShortInfo ¶
func (ru *ReplaceS3UrlInspection) GetShortInfo() []string
func (*ReplaceS3UrlInspection) Inspect ¶
func (ru *ReplaceS3UrlInspection) Inspect() (err error)
func (*ReplaceS3UrlInspection) ShowInfo ¶
func (ru *ReplaceS3UrlInspection) ShowInfo(index *int) error
func (*ReplaceS3UrlInspection) Skip ¶
func (ru *ReplaceS3UrlInspection) Skip()
type StoreESSettingsInspection ¶
type StoreESSettingsInspection struct {
// contains filtered or unexported fields
}
func NewStoreESSettingsInspection ¶
func NewStoreESSettingsInspection(w *cli.Writer, utls UpgradeV4Utils, fileutils fileutils.FileUtils, timeout int64) *StoreESSettingsInspection
func (*StoreESSettingsInspection) ExitHandler ¶
func (ses *StoreESSettingsInspection) ExitHandler() error
func (*StoreESSettingsInspection) GetInstallationType ¶
func (ses *StoreESSettingsInspection) GetInstallationType() inspector.InstallationType
func (*StoreESSettingsInspection) GetShortInfo ¶
func (ses *StoreESSettingsInspection) GetShortInfo() []string
func (*StoreESSettingsInspection) Inspect ¶
func (ses *StoreESSettingsInspection) Inspect() error
func (*StoreESSettingsInspection) ShowInfo ¶
func (ses *StoreESSettingsInspection) ShowInfo(index *int) error
func (*StoreESSettingsInspection) Skip ¶
func (ses *StoreESSettingsInspection) Skip()
type TakeBackupInspection ¶
type TakeBackupInspection struct {
// contains filtered or unexported fields
}
func NewTakeBackupInspection ¶
func NewTakeBackupInspection(w *cli.Writer) *TakeBackupInspection
func (*TakeBackupInspection) ShowInfo ¶
func (tb *TakeBackupInspection) ShowInfo(index *int) error
type UpgradeInspectorV4 ¶
type UpgradeInspectorV4 struct {
// contains filtered or unexported fields
}
func (*UpgradeInspectorV4) AddDefaultInspections ¶
func (ui *UpgradeInspectorV4) AddDefaultInspections()
func (*UpgradeInspectorV4) AddInspection ¶
func (ui *UpgradeInspectorV4) AddInspection(inspection inspector.Inspection)
func (*UpgradeInspectorV4) Inspect ¶
func (ui *UpgradeInspectorV4) Inspect() (err error)
func (*UpgradeInspectorV4) RollBackChangesOnError ¶
func (ui *UpgradeInspectorV4) RollBackChangesOnError() (err error)
func (*UpgradeInspectorV4) RunExitAction ¶
func (ui *UpgradeInspectorV4) RunExitAction() error
func (*UpgradeInspectorV4) RunUpgradeInspector ¶
func (ui *UpgradeInspectorV4) RunUpgradeInspector(osDestDir string, skipStorageCheck bool) (isError bool)
func (*UpgradeInspectorV4) SetOSDestDir ¶
func (ui *UpgradeInspectorV4) SetOSDestDir(path string)
func (*UpgradeInspectorV4) SetSkipStoragecheckFlag ¶
func (ui *UpgradeInspectorV4) SetSkipStoragecheckFlag(check bool)
func (*UpgradeInspectorV4) ShowInfo ¶
func (ui *UpgradeInspectorV4) ShowInfo() error
func (*UpgradeInspectorV4) ShowInspectionList ¶
func (ui *UpgradeInspectorV4) ShowInspectionList()
type UpgradeV4Utils ¶
type UpgradeV4Utils interface { IsExternalElasticSearch(timeout int64) bool ExecRequest(url, methodType string, requestBody io.Reader) ([]byte, error) GetESBasePath(timeout int64) string GetBackupS3URL(timeout int64) (string, error) PatchS3backupURL(timeout int64) (stdOut, stdErr string, err error) GetMaintenanceStatus(timeout int64) (bool, error) SetMaintenanceMode(timeout int64, status bool) (stdOut, stdErr string, err error) GetServicesStatus() (bool, error) }
func NewUpgradeV4Utils ¶
func NewUpgradeV4Utils() UpgradeV4Utils
type UpgradeV4UtilsImp ¶
type UpgradeV4UtilsImp struct{}
func (*UpgradeV4UtilsImp) ExecRequest ¶
func (*UpgradeV4UtilsImp) GetBackupS3URL ¶
func (cu *UpgradeV4UtilsImp) GetBackupS3URL(timeout int64) (string, error)
func (*UpgradeV4UtilsImp) GetESBasePath ¶
func (cu *UpgradeV4UtilsImp) GetESBasePath(timeout int64) string
func (*UpgradeV4UtilsImp) GetMaintenanceStatus ¶
func (cu *UpgradeV4UtilsImp) GetMaintenanceStatus(timeout int64) (bool, error)
func (*UpgradeV4UtilsImp) GetServicesStatus ¶
func (cu *UpgradeV4UtilsImp) GetServicesStatus() (bool, error)
func (*UpgradeV4UtilsImp) IsExternalElasticSearch ¶
func (cu *UpgradeV4UtilsImp) IsExternalElasticSearch(timeout int64) bool
func (*UpgradeV4UtilsImp) PatchS3backupURL ¶
func (cu *UpgradeV4UtilsImp) PatchS3backupURL(timeout int64) (stdOut, stdErr string, err error)
func (*UpgradeV4UtilsImp) SetMaintenanceMode ¶
func (cu *UpgradeV4UtilsImp) SetMaintenanceMode(timeout int64, status bool) (stdOut, stdErr string, err error)
Click to show internal directories.
Click to hide internal directories.