Skip to content

Commit

Permalink
Fix: cibconfig: Disable auto add advise values for operations (bsc#12…
Browse files Browse the repository at this point in the history
…31386) (#1579)

Since this auto-add feature might surprise users, we should disable it
by setting the option 'has_ra_advised_op' value to 'no'.
  • Loading branch information
liangxin1300 authored Oct 11, 2024
2 parents 6e8ba2a + ba8e864 commit 0573690
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crmsh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def get(self, value):
'lock_timeout': opt_string('120'),
'OCF_1_1_SUPPORT': opt_boolean('yes'),
'no_ssh': opt_boolean('no'),
'has_ra_advised_op': opt_boolean('yes'),
'has_ra_advised_op': opt_boolean('no'),
'has_fa_advised_op': opt_boolean('no'),
'obscure_pattern': opt_string('passw*')
},
Expand Down
6 changes: 3 additions & 3 deletions etc/crm.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
; lock_timeout = 120
; no_ssh = no

; For resource agent, automatically add the advised values, default is yes.
; has_ra_advised_op = yes
; For resource agent, automatically add the advised values for operation, default is no.
; has_ra_advised_op = no

; For fence agent, automatically add the advised values, default is no.
; For fence agent, automatically add the advised values for operation, default is no.
; has_fa_advised_op = no

; set OCF_1_1_SUPPORT to yes is to fully turn on OCF 1.1 feature once the corresponding CIB detected.
Expand Down
11 changes: 0 additions & 11 deletions test/features/cluster_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,6 @@ Feature: Functional test to cover SAP clusterAPI
And Show cluster status on "hanode1"
When Run "su - hacluster -c 'crm configure show'" on "hanode1"
Then Expected return code is "0"
And Expected multiple lines in output
"""
primitive d2 Dummy \
params fake=test \
meta resource-stickiness=5000 \
op monitor interval=10s timeout=20s on-fail=restart \
op start timeout=20s interval=0s \
op stop timeout=20s interval=0s
group g d2 \
meta resource-stickiness=3000
"""

@clean
Scenario: pacemaker ACL related operations by hacluster
Expand Down
4 changes: 2 additions & 2 deletions test/features/crm_report_normal.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: crm report functional test for common cases

@clean
Scenario: crm report collect trace ra log
When Run "crm configure primitive d Dummy" on "hanode1"
And Run "crm configure primitive d2 Dummy" on "hanode1"
When Run "crm configure primitive d Dummy op monitor interval=10s" on "hanode1"
And Run "crm configure primitive d2 Dummy op monitor interval=10s" on "hanode1"
Then Resource "d" is started on "hanode1"
And Resource "d2" is started on "hanode2"
When Run "crm resource trace d monitor" on "hanode1"
Expand Down
2 changes: 1 addition & 1 deletion test/run-functional-tests
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ adjust_test_case() {
run_origin_regression_test() {
CONFIG_COROSYNC_FLAG=0
setup_cluster "hanode1"
docker_exec "hanode1" "echo -e '[core]\nhas_fa_advised_op = yes' > /etc/crm/crm.conf"
docker_exec "hanode1" "echo -e '[core]\nhas_ra_advised_op = yes\nhas_fa_advised_op = yes' > /etc/crm/crm.conf"
docker_exec "hanode1" "sh /usr/share/crmsh/tests/regression.sh"
return $?
}
Expand Down

0 comments on commit 0573690

Please sign in to comment.