config

package
v0.0.0-...-31509f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "config.json"

Variables

View Source
var ErrInvalidTempPortRange = errors.New("invalid temp_port range")

Functions

func EnsureTempPortRangeDoesNotOverlapWithSourceClusterPorts

func EnsureTempPortRangeDoesNotOverlapWithSourceClusterPorts(source *greenplum.Cluster, intermediate *greenplum.Cluster) error

func GenerateIntermediateCluster

func GenerateIntermediateCluster(source *greenplum.Cluster, ports []int, upgradeID string, version semver.Version, gphome string) (*greenplum.Cluster, error)

func GetConfigFile

func GetConfigFile() string

Types

type Config

type Config struct {
	// We do not combine the state directory and backup directory for
	// several reasons:
	// - The backup directory needs to be configurable since there
	// may not be enough space in the default location. If the state and
	// backup directories are combined and the backup directory needs to be
	// changed, then we have to preserve gpupgrade state by copying
	// substeps.json and config.json to the new location. This is awkward,
	// hard to manage, and error prone.
	// - The default state directory $HOME/.gpupgrade is known upfront with
	// no dependencies. Whereas the default backup directory is based on the
	// data directories. Having a state directory with no dependencies is
	// much easier to create and remove during the gpupgrade lifecycle.
	BackupDirs backupdir.BackupDirs

	// Source is the GPDB cluster that is being upgraded. It is populated during
	// the generation of the cluster config in the initialize step; before that,
	// it is nil.
	Source *greenplum.Cluster

	// Intermediate represents the initialized target cluster that is upgraded
	// based on the source.
	Intermediate *greenplum.Cluster

	// Target is the upgraded GPDB cluster. It is populated during the target
	// gpinitsystem execution in the initialize step; before that, it is nil.
	Target *greenplum.Cluster

	HubPort         int
	AgentPort       int
	Mode            idl.Mode
	UseHbaHostnames bool
	UpgradeID       string
	PgUpgradeJobs   uint
}

func Create

func Create(db *sql.DB, hubPort int, agentPort int, sourceGPHome string, targetGPHome string, mode idl.Mode, useHbaHostnames bool, ports []int, pgUpgradeJobs uint, parentBackupDirs string) (Config, error)

func Read

func Read() (*Config, error)

func (*Config) Write

func (conf *Config) Write() error

type InvalidTempPortRangeError

type InvalidTempPortRangeError struct {
	ConflictingHost string
	ConflictingPort int
}

func (*InvalidTempPortRangeError) Error

func (i *InvalidTempPortRangeError) Error() string

func (*InvalidTempPortRangeError) Is

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL