Documentation
¶
Overview ¶
TNF node replacement: restore Kubernetes Secrets from on-disk backup YAML (shared by BMC + etcd recovery).
TNF control-plane node replacement e2e: Ginkgo spec only (helpers live in tnf_node_replacement_*.go).
Typical duration (informal): A successful run of this spec usually completes in about 40 minutes; the latest lab run reported 40m16s for the spec and ~44m for the full openshift-tests invocation (teardown/overhead). Expect roughly 35–45 minutes (±5 minutes) depending on cluster load, Ironic, and etcd recovery timing.
TNF node replacement: namespaces, resource names, and phase-oriented timeouts.
TNF node replacement: pacemaker restore, cluster verification, BMH/Machine helpers, and API delete utilities.
TNF node replacement: setup, backup/recovery, VM destroy, etcd/pacemaker, and API/OVN delete path.
TNF node replacement: OVN/SB diagnostics, VM disk/recreate, provisioning, east–west, static pods, OVN-K recovery.
TNF node replacement: shared configuration structs.
Package edge_topologies contains end-to-end tests for two-node (DualReplica) OpenShift clusters.
Tests in this package verify etcd recovery, node replacement, and cluster behavior when running with only two control-plane nodes plus an arbiter for quorum.
Precondition Validation: Tests use the preconditions package (pkg/test/preconditions) to check cluster health before running. When precondition checking is invoked, a synthetic JUnit test called "[openshift-tests] cluster precondition validation" is generated:
- PASSES if all tests ran successfully (no precondition failures)
- FAILS if any tests were skipped due to unmet cluster preconditions
This provides the Technical Release Team (TRT) with a consistent test name that has meaningful pass/fail rates. See pkg/test/preconditions/preconditions.go for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdResources ¶
type EtcdResources struct {
PeerSecretName string
ServingSecretName string
ServingMetricsSecretName string
}
EtcdResources contains etcd-related Kubernetes resource names
type HypervisorConnection ¶
HypervisorConnection contains SSH connection details for the hypervisor.
type JobTracking ¶
type JobTracking struct {
AuthJobName string
AfterSetupJobName string
UpdateSetupJobTargetName string
UpdateSetupJobSurvivorName string
}
JobTracking contains test job names
type NodeInfo ¶
type NodeInfo struct {
Name string
IP string
VMName string // Hypervisor VM name
MachineName string // OpenShift Machine name
MachineHash string // Machine name hash component
BMCSecretName string // BMC secret name
BMHName string // BareMetalHost name
MAC string // MAC address
KnownHostsPath string // SSH known_hosts file path
}
NodeInfo contains information about a cluster node
type TNFTestConfig ¶
type TNFTestConfig struct {
Hypervisor HypervisorConnection
TargetNode NodeInfo
SurvivingNode NodeInfo
EtcdResources EtcdResources
Jobs JobTracking
Execution TestExecution
}
TNFTestConfig contains all configuration for two-node test execution
type TestExecution ¶
type TestExecution struct {
SetupCompleted bool // True if BeforeEach completed successfully
GlobalBackupDir string // Directory containing backup YAMLs
// NodeReplacementLogDir is ARTIFACT_DIR/node-replacement-logs/<timestamp>/ for this spec (CEO log + delete diagnostics).
NodeReplacementLogDir string
HasAttemptedNodeProvisioning bool
BackupUsedForRecovery bool // Set to true if recovery used the backup
RedfishIP string // Gateway IP for BMC access
// PreReplacementChassisID / PreReplacementNodeUID: captured immediately before deleting the
// replacement target Node; used to compare whether k8s.ovn.org/node-chassis-id reappears on
// the new Node object (same name) during BMH provisioning / MCS boots.
PreReplacementChassisID string
PreReplacementNodeUID string
// PreReplacementTargetOVSSystemID is the target node's host OVS external_ids:system-id (SSH) before VM destroy.
// OVN-K publishes k8s.ovn.org/node-chassis-id from this value; it is not read from the peer's OVS.
PreReplacementTargetOVSSystemID string
// SurvivorLibvirtDiskPaths is the set of hypervisor file paths backing the surviving control-plane VM's
// disks (captured at setup via dumpxml + vol-path). recreateTargetVM / recovery refuse to move or
// replace any path in this set so a bad target XML or vol-path resolution cannot wipe the survivor's qcow2.
SurvivorLibvirtDiskPaths map[string]struct{}
}
TestExecution tracks test state and configuration
type VMShutdownMode ¶
type VMShutdownMode int
const ( VMShutdownModeGraceful VMShutdownMode = iota + 1 VMShutdownModeUngraceful )
func (VMShutdownMode) String ¶
func (sm VMShutdownMode) String() string
Source Files
¶
- arbiter_topology.go
- tna_recovery.go
- tnf_backup_restore.go
- tnf_degraded.go
- tnf_etcd_disruption.go
- tnf_fencing_credentials.go
- tnf_kubelet_disruption.go
- tnf_node_replacement.go
- tnf_node_replacement_const.go
- tnf_node_replacement_finish.go
- tnf_node_replacement_flow.go
- tnf_node_replacement_ovn_vm.go
- tnf_node_replacement_types.go
- tnf_recovery.go
- tnf_taint.go
- tnf_topology.go
- two_node.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package utils provides common cluster utilities: topology validation, CLI management, node filtering, and operator health checks.
|
Package utils provides common cluster utilities: topology validation, CLI management, node filtering, and operator health checks. |
|
apis
Package apis provides BareMetalHost utilities: status checks, provisioning state monitoring, and Metal3 operations.
|
Package apis provides BareMetalHost utilities: status checks, provisioning state monitoring, and Metal3 operations. |
|
core
Package core provides file utilities: permission constants, temp file creation, and template processing.
|
Package core provides file utilities: permission constants, temp file creation, and template processing. |
|
services
Package services provides etcd utilities: error classification, retry detection, and learner state handling.
|
Package services provides etcd utilities: error classification, retry detection, and learner state handling. |