Skip to content

Commit c1e5bd2

Browse files
committed
(maint) Fix GetPEAdmConfig node group test for peadm cluster
The 'PE HA Replica' node group is present in all PE installations, installed with or without PEADM. Switched this to check for the 'PE Primary A' node group that a PEADM installation specifically creates.
1 parent 391b83d commit c1e5bd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasks/get_peadm_config.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class GetPEAdmConfig
1111
def initialize(params); end
1212

1313
def execute!
14-
# if there is no 'PE HA Replica' node group, it's not a peadm-configured cluster.
15-
replica_group = groups.data.find { |obj| obj['name'] == 'PE HA Replica' }
16-
if replica_group
14+
# if there is no 'PE Primary A' node group, it's not a peadm-configured cluster.
15+
peadm_primary_a_group = groups.data.find { |obj| obj['name'] == 'PE Primary A' }
16+
if peadm_primary_a_group
1717
puts config.to_json
1818
else
1919
puts({ 'error' => 'This is not a peadm-compatible cluster. Use peadm::convert first.' }).to_json

0 commit comments

Comments
 (0)