Documentation ¶
Index ¶
- Constants
- Variables
- func Prompt(reader *bufio.Reader, prompt string) error
- type Step
- func (s *Step) AlwaysRun(substep idl.Substep, f func(streams step.OutStreams) error)
- func (s *Step) Complete(completedText string) error
- func (s *Step) DisableStore()
- func (s *Step) Err() error
- func (s *Step) Run(substep idl.Substep, f func(streams step.OutStreams) error)
- func (s *Step) RunConditionally(substep idl.Substep, shouldRun bool, f func(streams step.OutStreams) error)
- func (s *Step) RunHubSubstep(f func(streams step.OutStreams) error)
- type StepStore
- type StepStoreFileStore
- func (s *StepStoreFileStore) HasStatus(step idl.Step, check func(status idl.Status) bool) (bool, error)
- func (s *StepStoreFileStore) HasStepCompleted(step idl.Step) (bool, error)
- func (s *StepStoreFileStore) HasStepNotStarted(step idl.Step) (bool, error)
- func (s *StepStoreFileStore) HasStepStarted(step idl.Step) (bool, error)
- func (s *StepStoreFileStore) Read(stepName idl.Step) (idl.Status, error)
- func (s *StepStoreFileStore) ValidateStep(currentStep idl.Step) (err error)
- func (s *StepStoreFileStore) Write(stepName idl.Step, status idl.Status) error
Constants ¶
View Source
const RunExecute = `To proceed with the upgrade, run "gpupgrade execute".
To return the cluster to its original state, run "gpupgrade revert".`
View Source
const RunFinalize = `To proceed with the upgrade, run "gpupgrade finalize".`
View Source
const RunInitialize = `To begin the upgrade, run "gpupgrade initialize".`
View Source
const RunRevert = `Revert is in progress. Please continue by running "gpupgrade revert".`
View Source
const StepsFileName = "steps.json"
Variables ¶
View Source
var StepErr = errors.New(`gpupgrade commands must be issued in correct order
1. initialize runs pre-upgrade checks and prepares the cluster for upgrade
2. execute upgrades the master and primary segments to the target
Greenplum version
3. finalize upgrades the standby master and mirror segments to the target
Greenplum version. Revert cannot be run after finalize has started.
Use "gpupgrade --help" for more information`)
Functions ¶
Types ¶
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
func (*Step) DisableStore ¶
func (s *Step) DisableStore()
func (*Step) RunConditionally ¶
func (*Step) RunHubSubstep ¶
func (s *Step) RunHubSubstep(f func(streams step.OutStreams) error)
type StepStore ¶
type StepStore interface { Read(idl.Step) (idl.Status, error) Write(idl.Step, idl.Status) error HasStepStarted(idl.Step) (bool, error) HasStepNotStarted(idl.Step) (bool, error) HasStepCompleted(idl.Step) (bool, error) HasStatus(idl.Step, func(status idl.Status) bool) (bool, error) }
StepStore tracks the overall step status such as running, failed, or completed for initialize, execute, finalize, and revert. To reduce the code change required and for convenience StepStore uses the same data structure and file store as substeps.json. An internal substep enum STEP_STATUS is used to track the overall step status and should not be used as a normal substep.
type StepStoreFileStore ¶
type StepStoreFileStore struct {
// contains filtered or unexported fields
}
func NewStepFileStore ¶
func NewStepFileStore() (*StepStoreFileStore, error)
func (*StepStoreFileStore) HasStepCompleted ¶
func (s *StepStoreFileStore) HasStepCompleted(step idl.Step) (bool, error)
func (*StepStoreFileStore) HasStepNotStarted ¶
func (s *StepStoreFileStore) HasStepNotStarted(step idl.Step) (bool, error)
func (*StepStoreFileStore) HasStepStarted ¶
func (s *StepStoreFileStore) HasStepStarted(step idl.Step) (bool, error)
func (*StepStoreFileStore) ValidateStep ¶
func (s *StepStoreFileStore) ValidateStep(currentStep idl.Step) (err error)
Click to show internal directories.
Click to hide internal directories.