Skip to content

Commit

Permalink
CICD for VClusterOps Synchronization (#1061)
Browse files Browse the repository at this point in the history
This PR was automatically generated by CICD pipeline to sync
vclusterOps.

Co-authored-by: gitlab-cicd <[email protected]>
  • Loading branch information
github-actions[bot] and cchen-vertica authored Feb 7, 2025
1 parent 142e6c1 commit cd4a674
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions local-libs/vcluster/vclusterops/re_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,13 @@ func (vcc VClusterCommands) produceReIPInstructions(options *VReIPOptions, vdb *
instructions = append(instructions, &nmaNetworkProfileOp)

vdbWithPrimaryNodes := new(VCoordinationDatabase)
// When we cannot get db info from cluster_config.json, we will fetch it from NMA /nodes endpoint.
if vdb == nil {
// use a copy of vdb because we want to keep secondary nodes in vdb for next nmaReIPOP
if vdb != nil {
*vdbWithPrimaryNodes = *vdb
vdbWithPrimaryNodes.filterPrimaryNodes()
}
// When we cannot get primary nodes' info from cluster_config.json, we will fetch it from NMA /nodes endpoint.
if vdb == nil || len(vdbWithPrimaryNodes.HostNodeMap) == 0 {
vdb = new(VCoordinationDatabase)
nmaGetNodesInfoOp := makeNMAGetNodesInfoOp(options.Hosts, options.DBName, options.CatalogPrefix,
false /* report all errors */, vdb)
Expand All @@ -273,9 +278,6 @@ func (vcc VClusterCommands) produceReIPInstructions(options *VReIPOptions, vdb *
&nmaReadCatEdOp,
)
} else {
// use a copy of vdb because we want to keep secondary nodes in vdb for next nmaReIPOP
*vdbWithPrimaryNodes = *vdb
vdbWithPrimaryNodes.filterPrimaryNodes()
// read catalog editor to get hosts with latest catalog
nmaReadCatEdOp, err := makeNMAReadCatalogEditorOpWithSandbox(vdbWithPrimaryNodes, options.SandboxName)
if err != nil {
Expand Down

0 comments on commit cd4a674

Please sign in to comment.