Documentation
¶
Overview ¶
vclusterops is a Go library to administer a Vertica cluster with HTTP RESTful interfaces. These interfaces are exposed through the Node Management Agent (NMA) and an HTTPS service embedded in the server. With this library you can perform administrator-level operations, including: creating a database, scaling up/down, restarting the cluster, and stopping the cluster.
Index ¶
- Constants
- func RemoveConfigFile(configDirectory string, logger vlog.Printer) error
- type ClusterConfig
- type ClusterLeaseNotExpiredError
- type CmdType
- type CommandType
- type Config
- type DBIsRunningError
- type DatabaseConfig
- type DatabaseOptions
- type InstallPackageStatus
- type NodeConfig
- type NodeInfo
- type PackageStatus
- type ReIPInfo
- type ReIPNoClusterQuorumError
- type RestorePoint
- type RestorePointPolicy
- type ReviveDBNodeCountMismatchError
- type ReviveDBRestorePointNotFoundError
- type ShowRestorePointFilterOptions
- type VAddNodeOptions
- type VAddSubclusterInfo
- type VAddSubclusterOptions
- type VClusterCommands
- func (vcc *VClusterCommands) VAddNode(options *VAddNodeOptions) (VCoordinationDatabase, error)
- func (vcc *VClusterCommands) VAddSubcluster(options *VAddSubclusterOptions) error
- func (vcc *VClusterCommands) VCreateDatabase(options *VCreateDatabaseOptions) (VCoordinationDatabase, error)
- func (vcc *VClusterCommands) VDropDatabase(options *VDropDatabaseOptions) error
- func (vcc *VClusterCommands) VFetchNodeState(options *VFetchNodeStateOptions) ([]NodeInfo, error)
- func (vcc *VClusterCommands) VInstallPackages(options *VInstallPackagesOptions) (*InstallPackageStatus, error)
- func (vcc *VClusterCommands) VReIP(options *VReIPOptions) error
- func (vcc *VClusterCommands) VRemoveNode(options *VRemoveNodeOptions) (VCoordinationDatabase, error)
- func (vcc *VClusterCommands) VRemoveSubcluster(removeScOpt *VRemoveScOptions) (VCoordinationDatabase, error)
- func (vcc *VClusterCommands) VReviveDatabase(options *VReviveDatabaseOptions) (dbInfo string, vdbPtr *VCoordinationDatabase, err error)
- func (vcc *VClusterCommands) VSandbox(options *VSandboxOptions) error
- func (vcc *VClusterCommands) VScrutinize(options *VScrutinizeOptions) error
- func (vcc *VClusterCommands) VShowRestorePoints(options *VShowRestorePointsOptions) (restorePoints []RestorePoint, err error)
- func (vcc *VClusterCommands) VStartDatabase(options *VStartDatabaseOptions) error
- func (vcc *VClusterCommands) VStartNodes(options *VStartNodesOptions) error
- func (vcc *VClusterCommands) VStopDatabase(options *VStopDatabaseOptions) error
- func (vcc *VClusterCommands) VUnsandbox(options *VUnsandboxOptions) error
- type VClusterOpEngine
- type VCoordinationDatabase
- type VCoordinationNode
- type VCreateDatabaseOptions
- type VDropDatabaseOptions
- type VFetchNodeStateOptions
- type VInstallPackagesOptions
- type VReIPOptions
- type VRemoveNodeOptions
- type VRemoveScOptions
- type VReviveDatabaseOptions
- type VSandboxOptions
- type VSandboxSubclusterInfo
- type VScrutinizeOptions
- type VShowRestorePointsOptions
- type VStartDatabaseOptions
- type VStartNodesInfo
- type VStartNodesOptions
- type VStopDatabaseInfo
- type VStopDatabaseOptions
- type VUnsandboxOptions
- type VclusterOpVersion
Constants ¶
const ( ControlSetSizeDefaultValue = -1 ControlSetSizeLowerBound = 1 ControlSetSizeUpperBound = 120 )
const ( ConfigDirPerm = 0755 ConfigFilePerm = 0600 CurrentConfigFileVersion = 1 )
const ( SUCCESS resultStatus = 0 FAILURE resultStatus = 1 EXCEPTION resultStatus = 2 )
const ( GetMethod = "GET" PutMethod = "PUT" PostMethod = "POST" DeleteMethod = "DELETE" )
const ( // track endpoint versions and the current version NMAVersion1 = "v1/" HTTPVersion1 = "v1/" NMACurVersion = NMAVersion1 HTTPCurVersion = HTTPVersion1 )
const ( SuccessResult = "SUCCESS" FailureResult = "FAILURE" ExceptionResult = "FAILURE" )
const ( SuccessCode = 200 MultipleChoiceCode = 300 InternalErrorCode = 500 )
const ( CreateDB opType = iota StopDB StartDB ReviveDB )
const ( SandboxCmd = iota StartNodeCommand StopDBCmd ScrutinizeCmd DBAddSubclusterCmd InstallPackageCmd )
const ( NoVersion = "NO_VERSION" DefaultSC = "default_subcluster" )
const ( OneSecond = 1 OneMinute = 60 * OneSecond StopDBTimeout = 5 * OneMinute StartupPollingTimeout = 5 * OneMinute ScrutinizePollingTimeout = -1 * OneMinute // no timeout PollingInterval = 3 * OneSecond )
const ConfigBackupName = "vertica_cluster.yaml.backup"
const ConfigFileName = "vertica_cluster.yaml"
const HTTPSSuccMsg = "REBALANCED SHARDS"
const RebalanceClusterSuccMsg = "REBALANCED"
const RebalanceShardsSuccMsg = "REBALANCED SHARDS"
const VScrutinizeTypeName = "scrutinize"
const to sync cmd, options parsing, and this
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterConfig ¶ added in v1.0.0
type ClusterConfig map[string]DatabaseConfig
ClusterConfig is a map that stores configuration information for each database in the cluster.
func MakeClusterConfig ¶ added in v1.0.0
func MakeClusterConfig() ClusterConfig
func ReadConfig ¶ added in v1.0.0
func ReadConfig(configDirectory string, logger vlog.Printer) (ClusterConfig, error)
ReadConfig reads cluster configuration information from a YAML-formatted file in configDirectory. It returns a ClusterConfig and any error encountered when reading and parsing the file.
func (*ClusterConfig) WriteConfig ¶ added in v1.0.0
func (c *ClusterConfig) WriteConfig(configFilePath string) error
WriteConfig writes configuration information to configFilePath. It returns any write error encountered.
type ClusterLeaseNotExpiredError ¶
type ClusterLeaseNotExpiredError struct {
Expiration string
}
ClusterLeaseNotExpiredError is returned when you attempt to access a communal storage location when there is an active cluster lease on it.
func (*ClusterLeaseNotExpiredError) Error ¶
func (e *ClusterLeaseNotExpiredError) Error() string
type CommandType ¶ added in v1.2.0
type CommandType int
type Config ¶ added in v1.0.0
type Config struct { Version int `yaml:"config_file_version"` Databases ClusterConfig `yaml:"databases"` }
type DBIsRunningError ¶
type DBIsRunningError struct {
Detail string
}
DBIsRunningError is an error to indicate we found the database still running. This is emitted from this op. Callers can do type checking to perform an action based on the error.
func (*DBIsRunningError) Error ¶
func (e *DBIsRunningError) Error() string
Error returns the message details. This is added so that it is compatible with the error interface.
type DatabaseConfig ¶ added in v1.0.0
type DatabaseConfig struct { Nodes []*NodeConfig `yaml:"nodes"` IsEon bool `yaml:"eon_mode"` CommunalStorageLocation string `yaml:"communal_storage_location"` Ipv6 bool `yaml:"ipv6"` }
func MakeDatabaseConfig ¶ added in v1.0.0
func MakeDatabaseConfig() DatabaseConfig
type DatabaseOptions ¶
type DatabaseOptions struct { // name of the database DBName *string // expected to be IP addresses or hostnames RawHosts []string // expected to be IP addresses resolved from RawHosts Hosts []string // whether using IPv6 for host addresses Ipv6 vstruct.NullableBool // path of catalog directory CatalogPrefix *string // path of data directory DataPrefix *string // directory of the YAML config file ConfigDirectory *string // path of depot directory DepotPrefix *string // whether the database is in Eon mode IsEon vstruct.NullableBool // path of the communal storage CommunalStorageLocation *string // database configuration parameters ConfigurationParameters map[string]string // user name UserName *string // password Password *string // TLS Key Key string // TLS Certificate Cert string // TLS CA Certificate CaCert string // path of the log file LogPath *string // whether honor user's input rather than reading values from the config file HonorUserInput *bool // pointer to the cluster config object Config *ClusterConfig // contains filtered or unexported fields }
func (*DatabaseOptions) GetDBConfig ¶ added in v1.0.0
func (opt *DatabaseOptions) GetDBConfig(vcc VClusterCommands) (config *ClusterConfig, e error)
GetDBConfig reads database configurations from vertica_cluster.yaml into a ClusterConfig struct. It returns the ClusterConfig and any error encountered.
func (*DatabaseOptions) ParseHostList ¶ added in v1.0.0
func (opt *DatabaseOptions) ParseHostList(hosts string) error
ParseHostList converts a comma-separated string of hosts into a slice of host names. During parsing, the hosts names are converted to lowercase. It returns any parsing error encountered.
type InstallPackageStatus ¶
type InstallPackageStatus struct {
Packages []PackageStatus `json:"packages"`
}
InstallPackageStatus provides status for each package install attempted.
type NodeConfig ¶ added in v1.0.0
type NodeInfo ¶
type NodeInfo struct { Address string `json:"address"` Name string `json:"name"` // vnode name, e.g., v_dbname_node0001 State string `json:"state"` CatalogPath string `json:"catalog_path"` }
NodeInfo represents information to identify a node.
type PackageStatus ¶
type PackageStatus struct { // Name of the package this status is for PackageName string `json:"package_name"` // One word outcome of the install status: // Skipped, Success or Failure InstallStatus string `json:"install_status"` }
PackageStatus has install status for a single package.
type ReIPNoClusterQuorumError ¶
type ReIPNoClusterQuorumError struct {
Detail string
}
ReIPNoClusterQuorumError is an error to indicate that cluster quorum was lost before a re-ip. This is emitted from this op. Callers can do type checking to perform an action based on the error.
func (*ReIPNoClusterQuorumError) Error ¶
func (e *ReIPNoClusterQuorumError) Error() string
type RestorePoint ¶
type RestorePoint struct { // Name of the archive that this restore point was created in. Archive string `json:"archive,omitempty"` // The ID of the restore point. This is a form of a UID that is static for the restore point. ID string `json:"id,omitempty"` // The current index of this restore point. Lower value means it was taken more recently. // This changes when new restore points are created. Index int `json:"index,omitempty"` // The timestamp when the restore point was created. Timestamp string `json:"timestamp,omitempty"` // The version of Vertica running when the restore point was created. VerticaVersion string `json:"vertica_version,omitempty"` }
RestorePoint contains information about a single restore point.
type RestorePointPolicy ¶
type ReviveDBNodeCountMismatchError ¶
type ReviveDBNodeCountMismatchError struct { ReviveDBStep string FailureHost string NumOfNewNodes int NumOfOldNodes int }
ReviveDBNodeCountMismatchError is the error that is returned when the number of nodes in the revived cluster does not match the number of nodes in the original cluster.
func (*ReviveDBNodeCountMismatchError) Error ¶
func (e *ReviveDBNodeCountMismatchError) Error() string
type ReviveDBRestorePointNotFoundError ¶
ReviveDBRestorePointNotFoundError is the error that is returned when the retore point specified by the user either via index or id is not found among all restore points in the specified archive. Either InvalidID or InvalidIndex will be set depending on whether the user specified the retore point by index or id.
func (*ReviveDBRestorePointNotFoundError) Error ¶
func (e *ReviveDBRestorePointNotFoundError) Error() string
type ShowRestorePointFilterOptions ¶
type ShowRestorePointFilterOptions struct { // Only list restore points with given archive name ArchiveName *string // Only list restore points created no earlier than this timestamp (must be UTC timezone) StartTimestamp *string // Only list restore points created no later than this timestamp (must be UTC timezone) EndTimestamp *string // Only list restore points with given ID ArchiveID *string // Only list restore points with given index ArchiveIndex *string }
Optional arguments to list only restore points that meet the specified condition(s)
func (*ShowRestorePointFilterOptions) ValidateAndStandardizeTimestampsIfAny ¶
func (p *ShowRestorePointFilterOptions) ValidateAndStandardizeTimestampsIfAny() (err error)
Check that all non-empty timestamps specified have valid date time or date only format, convert date only format to date time format when applicable, and make sure end timestamp is no earlier than start timestamp
type VAddNodeOptions ¶
type VAddNodeOptions struct { DatabaseOptions // Hosts to add to database NewHosts []string // Name of the subcluster that the new nodes will be added to SCName *string // A primary up host that will be used to execute add_node operations Initiator string // Depot size, e.g. 10G DepotSize *string // Skip rebalance shards if true SkipRebalanceShards *bool // Use force remove if true ForceRemoval *bool // If the path is set, the NMA will store the Vertica start command at the path // instead of executing it. This is useful in containerized environments where // you may not want to have both the NMA and Vertica server in the same container. // This feature requires version 24.2.0+. StartUpConf *string // Names of the existing nodes in the cluster. This option can be // used to remove partially added nodes from catalog. ExpectedNodeNames []string }
VAddNodeOptions represents the available options for VAddNode.
func VAddNodeOptionsFactory ¶
func VAddNodeOptionsFactory() VAddNodeOptions
type VAddSubclusterInfo ¶
type VAddSubclusterOptions ¶
type VAddSubclusterOptions struct { // part 1: basic db info DatabaseOptions // part 2: subcluster info SCName *string SCHosts []string SCRawHosts []string IsPrimary *bool ControlSetSize *int CloneSC *string }
func VAddSubclusterOptionsFactory ¶
func VAddSubclusterOptionsFactory() VAddSubclusterOptions
type VClusterCommands ¶
VClusterCommands passes state around for all top-level administrator commands (e.g. create db, add node, etc.).
func (*VClusterCommands) VAddNode ¶
func (vcc *VClusterCommands) VAddNode(options *VAddNodeOptions) (VCoordinationDatabase, error)
VAddNode adds one or more nodes to an existing database. It returns a VCoordinationDatabase that contains catalog information and any error encountered.
func (*VClusterCommands) VAddSubcluster ¶
func (vcc *VClusterCommands) VAddSubcluster(options *VAddSubclusterOptions) error
VAddSubcluster adds to a running database a new subcluster with provided options. It returns any error encountered.
func (*VClusterCommands) VCreateDatabase ¶
func (vcc *VClusterCommands) VCreateDatabase(options *VCreateDatabaseOptions) (VCoordinationDatabase, error)
func (*VClusterCommands) VDropDatabase ¶
func (vcc *VClusterCommands) VDropDatabase(options *VDropDatabaseOptions) error
func (*VClusterCommands) VFetchNodeState ¶
func (vcc *VClusterCommands) VFetchNodeState(options *VFetchNodeStateOptions) ([]NodeInfo, error)
VFetchNodeState returns the node state (e.g., up or down) for each node in the cluster and any error encountered.
func (*VClusterCommands) VInstallPackages ¶
func (vcc *VClusterCommands) VInstallPackages(options *VInstallPackagesOptions) (*InstallPackageStatus, error)
func (*VClusterCommands) VReIP ¶
func (vcc *VClusterCommands) VReIP(options *VReIPOptions) error
VReIP changes the node address, control address, and control broadcast for a node. It returns any error encountered.
func (*VClusterCommands) VRemoveNode ¶
func (vcc *VClusterCommands) VRemoveNode(options *VRemoveNodeOptions) (VCoordinationDatabase, error)
func (*VClusterCommands) VRemoveSubcluster ¶
func (vcc *VClusterCommands) VRemoveSubcluster(removeScOpt *VRemoveScOptions) (VCoordinationDatabase, error)
VRemoveSubcluster removes a subcluster. It returns updated database catalog information and any error encountered. VRemoveSubcluster has three major phases:
- Pre-check: check the subcluster name and get nodes for the subcluster.
- Removes nodes: Optional. If there are any nodes still associated with the subcluster, runs VRemoveNode.
- Drop the subcluster: Remove the subcluster name from the database catalog.
func (*VClusterCommands) VReviveDatabase ¶
func (vcc *VClusterCommands) VReviveDatabase(options *VReviveDatabaseOptions) (dbInfo string, vdbPtr *VCoordinationDatabase, err error)
VReviveDatabase revives a database that was terminated but whose communal storage data still exists. It returns the database information retrieved from communal storage and any error encountered.
func (*VClusterCommands) VSandbox ¶
func (vcc *VClusterCommands) VSandbox(options *VSandboxOptions) error
func (*VClusterCommands) VScrutinize ¶
func (vcc *VClusterCommands) VScrutinize(options *VScrutinizeOptions) error
func (*VClusterCommands) VShowRestorePoints ¶
func (vcc *VClusterCommands) VShowRestorePoints(options *VShowRestorePointsOptions) (restorePoints []RestorePoint, err error)
VShowRestorePoints can query the restore points from an archive
func (*VClusterCommands) VStartDatabase ¶
func (vcc *VClusterCommands) VStartDatabase(options *VStartDatabaseOptions) error
func (*VClusterCommands) VStartNodes ¶
func (vcc *VClusterCommands) VStartNodes(options *VStartNodesOptions) error
VStartNodes starts the given nodes for a cluster that has not yet lost cluster quorum. Returns any error encountered. If necessary, it updates the node's IP in the Vertica catalog. If cluster quorum is already lost, use VStartDatabase. It will skip any nodes given that no longer exist in the catalog.
func (*VClusterCommands) VStopDatabase ¶
func (vcc *VClusterCommands) VStopDatabase(options *VStopDatabaseOptions) error
func (*VClusterCommands) VUnsandbox ¶
func (vcc *VClusterCommands) VUnsandbox(options *VUnsandboxOptions) error
type VClusterOpEngine ¶
type VClusterOpEngine struct {
// contains filtered or unexported fields
}
type VCoordinationDatabase ¶
type VCoordinationDatabase struct { Name string // processed path prefixes CatalogPrefix string DataPrefix string HostNodeMap vHostNodeMap // for convenience HostList []string // expected to be resolved IP addresses // Eon params, the boolean values are for convenience IsEon bool CommunalStorageLocation string UseDepot bool DepotPrefix string DepotSize string AwsIDKey string AwsSecretKey string NumShards int // authentication LicensePathOnNode string // more to add when useful Ipv6 bool PrimaryUpNodes []string }
VCoordinationDatabase represents catalog and node information for a database. The VCreateDatabase command returns a VCoordinationDatabase struct. Operations on an existing database (e.g. VStartDatabase) consume a VCoordinationDatabase struct.
func (*VCoordinationDatabase) WriteClusterConfig ¶ added in v1.0.0
func (vdb *VCoordinationDatabase) WriteClusterConfig(configDir *string, logger vlog.Printer) error
WriteClusterConfig updates cluster configuration with the YAML-formatted file in configDir and writes to the log and stdout. It returns any error encountered.
type VCoordinationNode ¶
type VCoordinationNode struct { Name string `json:"name"` Address string // complete paths, not just prefix CatalogPath string `json:"catalog_path"` StorageLocations []string UserStorageLocations []string DepotPath string // DB client port, should be 5433 by default Port int // default should be ipv4 ControlAddressFamily string IsPrimary bool State string // empty string if it is not an eon db Subcluster string // empty string if it is not in a sandbox Sandbox string }
VCoordinationNode represents node information from the database catalog.
type VCreateDatabaseOptions ¶
type VCreateDatabaseOptions struct { /* part 1: basic db info */ DatabaseOptions Policy *string // database restart policy SQLFile *string // SQL file to run (as dbadmin) immediately on database creation LicensePathOnNode *string // required to be a fully qualified path ShardCount *int // number of shards in the database" DepotSize *string // depot size with two supported formats: % and KMGT, e.g., 50% or 10G GetAwsCredentialsFromEnv *bool // whether get AWS credentials from environmental variables // part 3: optional info ForceCleanupOnFailure *bool // whether force remove existing directories on failure ForceRemovalAtCreation *bool // whether force remove existing directories before creating the database SkipPackageInstall *bool // whether skip package installation TimeoutNodeStartupSeconds *int // timeout in seconds for polling node start up state Broadcast *bool // configure Spread to use UDP broadcast traffic between nodes on the same subnet P2p *bool // configure Spread to use point-to-point communication between all Vertica nodes LargeCluster *int // whether enables a large cluster layout ClientPort *int // for internal QA test only, do not abuse SpreadLogging *bool // whether enable spread logging SpreadLoggingLevel *int // spread logging level SkipStartupPolling *bool // whether skip startup polling GenerateHTTPCerts *bool // whether generate http certificates // If the path is set, the NMA will store the Vertica start command at the path // instead of executing it. This is useful in containerized environments where // you may not want to have both the NMA and Vertica server in the same container. // This feature requires version 24.2.0+. StartUpConf *string // contains filtered or unexported fields }
VCreateDatabaseOptions represents the available options when you create a database with VCreateDatabase.
func VCreateDatabaseOptionsFactory ¶
func VCreateDatabaseOptionsFactory() VCreateDatabaseOptions
type VDropDatabaseOptions ¶
type VDropDatabaseOptions struct { VCreateDatabaseOptions ForceDelete *bool // whether force delete directories }
VDropDatabaseOptions adds to VCreateDatabaseOptions the option to force delete directories.
func VDropDatabaseOptionsFactory ¶
func VDropDatabaseOptionsFactory() VDropDatabaseOptions
func (*VDropDatabaseOptions) AnalyzeOptions ¶ added in v1.0.0
func (options *VDropDatabaseOptions) AnalyzeOptions() error
AnalyzeOptions verifies the host options for the VDropDatabaseOptions struct and returns any error encountered.
type VFetchNodeStateOptions ¶
type VFetchNodeStateOptions struct {
DatabaseOptions
}
func VFetchNodeStateOptionsFactory ¶
func VFetchNodeStateOptionsFactory() VFetchNodeStateOptions
type VInstallPackagesOptions ¶
type VInstallPackagesOptions struct { /* part 1: basic db info */ DatabaseOptions // If true, the packages will be reinstalled even if they are already installed. ForceReinstall *bool }
func VInstallPackagesOptionsFactory ¶
func VInstallPackagesOptionsFactory() VInstallPackagesOptions
type VReIPOptions ¶
type VReIPOptions struct { DatabaseOptions // re-ip list ReIPList []ReIPInfo // whether trim re-ip list based on the catalog info TrimReIPList bool }
func VReIPFactory ¶
func VReIPFactory() VReIPOptions
func (*VReIPOptions) ReadReIPFile ¶
func (opt *VReIPOptions) ReadReIPFile(path string) error
ReadReIPFile reads the re-IP file and builds a slice of ReIPInfo. It returns any error encountered.
type VRemoveNodeOptions ¶
type VRemoveNodeOptions struct { DatabaseOptions HostsToRemove []string // Hosts to remove from database Initiator string // A primary up host that will be used to execute remove_node operations. ForceDelete *bool // whether force delete directories }
VRemoveNodeOptions represents the available options to remove one or more nodes from the database.
func VRemoveNodeOptionsFactory ¶
func VRemoveNodeOptionsFactory() VRemoveNodeOptions
func (*VRemoveNodeOptions) ParseHostToRemoveList ¶ added in v1.0.0
func (o *VRemoveNodeOptions) ParseHostToRemoveList(hosts string) error
ParseHostToRemoveList converts a comma-separated string list of hosts into a slice of host names to remove from the database. During parsing, the hosts are converted to lowercase. It returns any parsing error encountered.
type VRemoveScOptions ¶
type VRemoveScOptions struct { DatabaseOptions SubclusterToRemove *string // subcluster to remove from database ForceDelete *bool // whether force delete directories }
VRemoveScOptions represents the available options when you remove a subcluster from a database.
func VRemoveScOptionsFactory ¶
func VRemoveScOptionsFactory() VRemoveScOptions
type VReviveDatabaseOptions ¶
type VReviveDatabaseOptions struct { /* part 1: basic db info */ DatabaseOptions // timeout in seconds of loading remote catalog LoadCatalogTimeout *uint // whether force remove existing directories before revive the database ForceRemoval *bool // describe the database on communal storage, and exit DisplayOnly *bool // whether ignore the cluster lease IgnoreClusterLease *bool // the restore policy RestorePoint *RestorePointPolicy }
func VReviveDBOptionsFactory ¶
func VReviveDBOptionsFactory() VReviveDatabaseOptions
type VSandboxOptions ¶
type VSandboxOptions struct { DatabaseOptions SandboxName *string SCName *string SCHosts []string SCRawHosts []string }
func VSandboxOptionsFactory ¶
func VSandboxOptionsFactory() VSandboxOptions
func (*VSandboxOptions) ValidateAnalyzeOptions ¶
func (options *VSandboxOptions) ValidateAnalyzeOptions(vcc *VClusterCommands) error
type VSandboxSubclusterInfo ¶ added in v1.2.0
type VScrutinizeOptions ¶
type VScrutinizeOptions struct { DatabaseOptions ID string // generated: "VerticaScrutinize.yyyymmddhhmmss" }
func VScrutinizOptionsFactory ¶ added in v1.0.0
func VScrutinizOptionsFactory() VScrutinizeOptions
func (*VScrutinizeOptions) ValidateAnalyzeOptions ¶
func (options *VScrutinizeOptions) ValidateAnalyzeOptions(logger vlog.Printer) error
type VShowRestorePointsOptions ¶
type VShowRestorePointsOptions struct { DatabaseOptions // Optional arguments to list only restore points that // meet the specified condition(s) FilterOptions *ShowRestorePointFilterOptions }
func VShowRestorePointsFactory ¶
func VShowRestorePointsFactory() VShowRestorePointsOptions
type VStartDatabaseOptions ¶
type VStartDatabaseOptions struct { // basic db info DatabaseOptions // timeout for polling the states of all nodes in the database in HTTPSPollNodeStateOp StatePollingTimeout *int // whether trim the input host list based on the catalog info TrimHostList *bool // If the path is set, the NMA will store the Vertica start command at the path // instead of executing it. This is useful in containerized environments where // you may not want to have both the NMA and Vertica server in the same container. // This feature requires version 24.2.0+. StartUpConf *string }
VStartDatabaseOptions represents the available options when you start a database with VStartDatabase.
func VStartDatabaseOptionsFactory ¶
func VStartDatabaseOptionsFactory() VStartDatabaseOptions
type VStartNodesInfo ¶
type VStartNodesInfo struct { // The IP address that we intend to re-IP can be obtained from a set of nodes provided as input // within VStartNodesOptions struct ReIPList []string // The names of the nodes that we intend to re-IP can be acquired from a set of nodes provided as input // within the VStartNodesOptions struct NodeNamesToStart []string // the hosts that we want to start HostsToStart []string }
type VStartNodesOptions ¶
type VStartNodesOptions struct { // basic db info DatabaseOptions // A set of nodes(nodename - host) that we want to start in the database Nodes map[string]string // timeout for polling nodes that we want to start in httpsPollNodeStateOp StatePollingTimeout int // If the path is set, the NMA will store the Vertica start command at the path // instead of executing it. This is useful in containerized environments where // you may not want to have both the NMA and Vertica server in the same container. // This feature requires version 24.2.0+. StartUpConf *string }
VStartNodesOptions represents the available options when you start one or more nodes with VStartNodes.
func VStartNodesOptionsFactory ¶
func VStartNodesOptionsFactory() VStartNodesOptions
func (*VStartNodesOptions) ParseNodesList ¶
func (options *VStartNodesOptions) ParseNodesList(nodeListStr string) error
ParseNodesList builds and returns a map of nodes from a comma-separated list of nodes. For example, vnodeName1=host1,vnodeName2=host2 is converted to map[string]string{vnodeName1: host1, vnodeName2: host2}
type VStopDatabaseInfo ¶ added in v1.0.0
type VStopDatabaseOptions ¶
type VStopDatabaseOptions struct { /* part 1: basic db info */ DatabaseOptions /* part 2: eon db info */ DrainSeconds *int // time in seconds to wait for database users' disconnection Sandbox *string // Stop db on given sandbox MainCluster *bool // Stop db on main cluster only /* part 3: hidden info */ CheckUserConn *bool // whether check user connection ForceKill *bool // whether force kill connections }
func VStopDatabaseOptionsFactory ¶
func VStopDatabaseOptionsFactory() VStopDatabaseOptions
type VUnsandboxOptions ¶
type VUnsandboxOptions struct { DatabaseOptions SCName *string }
func VUnsandboxOptionsFactory ¶
func VUnsandboxOptionsFactory() VUnsandboxOptions
func (*VUnsandboxOptions) ValidateAnalyzeOptions ¶
func (options *VUnsandboxOptions) ValidateAnalyzeOptions(vcc *VClusterCommands) error
type VclusterOpVersion ¶
type VclusterOpVersion struct { Origin string `json:"origin"` SemVer semVer }
Source Files
¶
- adapter_pool.go
- add_node.go
- add_subcluster.go
- cluster_config.go
- cluster_op.go
- cluster_op_engine.go
- cluster_op_engine_context.go
- coordinator_database.go
- create_db.go
- drop_db.go
- fetch_node_state.go
- helpers.go
- http_adapter.go
- http_request.go
- http_request_dispatcher.go
- https_add_subcluster_op.go
- https_check_db_running_op.go
- https_check_node_state_op.go
- https_check_subcluster_op.go
- https_check_subcluster_sandbox_op.go
- https_create_cluster_depot_op.go
- https_create_node_op.go
- https_create_nodes_depot_op.go
- https_drop_node_op.go
- https_drop_subcluster_op.go
- https_find_subcluster_op.go
- https_get_cluster_info_op.go
- https_get_nodes_info_op.go
- https_get_up_nodes_op.go
- https_install_packages_op.go
- https_mark_design_ksafe_op.go
- https_mark_nodes_ephemeral_op.go
- https_poll_node_state_op.go
- https_poll_subcluster_node_state_op.go
- https_poll_subscription_state_op.go
- https_re_ip_op.go
- https_rebalance_cluster_op.go
- https_rebalance_subcluster_shards_op.go
- https_reload_spread_op.go
- https_sandbox_subcluster_op.go
- https_spread_remove_node_op.go
- https_startup_command_op.go
- https_stop_db_op.go
- https_sync_catalog_op.go
- install_packages.go
- network_adapter.go
- nma_bootstrap_catalog_op.go
- nma_check_system_tables_op.go
- nma_delete_dir_op.go
- nma_download_config.go
- nma_download_file_op.go
- nma_get_healthy_nodes_op.go
- nma_get_nodes_info_op.go
- nma_get_scrutinize_tar_op.go
- nma_health_op.go
- nma_load_remote_catalog_op.go
- nma_network_profile_op.go
- nma_prepare_directories_op.go
- nma_re_ip_op.go
- nma_read_catalog_editor_op.go
- nma_show_restore_points_op.go
- nma_spread_security_op.go
- nma_stage_dc_tables_op.go
- nma_stage_files_op.go
- nma_stage_system_tables_op.go
- nma_stage_vertica_logs_op.go
- nma_start_node_op.go
- nma_upload_config.go
- nma_vertica_version_op.go
- node_info.go
- re_ip.go
- remove_node.go
- remove_subcluster.go
- restore_points.go
- revive_db.go
- sandbox.go
- scrutinize.go
- scrutinize_op.go
- start_db.go
- start_node.go
- state_poller.go
- stop_db.go
- unsandbox.go
- vcluster_database_options.go
- vcluster_version.go