forked from ClusterLabs/crmsh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Dev: behave: adjust functional tests for previous changes
- Loading branch information
1 parent
4215dd0
commit ae01552
Showing
5 changed files
with
63 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ Feature: geo cluster | |
Tag @clean means need to stop cluster service if the service is available | ||
Need nodes: hanode1 hanode2 hanode3 | ||
|
||
@clean | ||
Scenario: GEO cluster setup | ||
Given Cluster service is "stopped" on "hanode1" | ||
And Cluster service is "stopped" on "hanode2" | ||
|
@@ -26,31 +27,3 @@ Feature: geo cluster | |
Then Show cluster status on "hanode1" | ||
When Run "crm resource start g-booth" on "hanode2" | ||
Then Show cluster status on "hanode2" | ||
|
||
Scenario: GEO cluster setup with ssh-agent | ||
When Run "crm cluster stop" on "hanode1" | ||
And Run "crm cluster stop" on "hanode2" | ||
And Run "systemctl disable --now booth@booth" on "hanode1,hanode2,hanode3" | ||
Given Cluster service is "stopped" on "hanode1" | ||
And Cluster service is "stopped" on "hanode2" | ||
And Directory "/root/.ssh" is renamed to "/root/ssh_disabled" on nodes ["hanode1", "hanode2", "hanode3"] | ||
And ssh-agent is started at "/root/ssh-auth-sock" on nodes ["hanode1", "hanode2", "hanode3"] | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock ssh-add /root/ssh_disabled/id_rsa" on "hanode1,hanode2,hanode3" | ||
And Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init -y -n cluster1 --use-ssh-agent" on "hanode1" | ||
Then Cluster service is "started" on "hanode1" | ||
When Run "crm configure primitive vip IPaddr2 params [email protected]" on "hanode1" | ||
|
||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init -y -n cluster2 --use-ssh-agent" on "hanode2" | ||
Then Cluster service is "started" on "hanode2" | ||
When Run "crm configure primitive vip IPaddr2 params [email protected]" on "hanode2" | ||
|
||
When Run "crm cluster geo_init -y --clusters "cluster1=@vip.0 cluster2=@vip.1" --tickets tickets-geo --arbitrator hanode3" on "hanode1" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster geo_join -y --use-ssh-agent --cluster-node hanode1 --clusters "[email protected] [email protected]"" on "hanode2" | ||
Given Service "booth@booth" is "stopped" on "hanode3" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster geo_init_arbitrator -y --use-ssh-agent --cluster-node hanode1" on "hanode3" | ||
Then Service "booth@booth" is "started" on "hanode3" | ||
When Run "crm resource start g-booth" on "hanode1" | ||
Then Show cluster status on "hanode1" | ||
When Run "crm resource start g-booth" on "hanode2" | ||
Then Show cluster status on "hanode2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# vim: sw=2 sts=2 | ||
Feature: ssh-agent support | ||
|
||
Test ssh-agent support for crmsh | ||
Need nodes: hanode1 hanode2 hanode3 | ||
|
||
Scenario: Skip creating ssh key pairs with --use-ssh-agent | ||
Given Run "mkdir /root/ssh_disabled && mv /root/.ssh/id_* /root/ssh_disabled" OK on "hanode1,hanode2,hanode3" | ||
And ssh-agent is started at "/root/ssh-auth-sock" on nodes ["hanode1", "hanode2", "hanode3"] | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock ssh-add /root/ssh_disabled/id_rsa" on "hanode1,hanode2,hanode3" | ||
And Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init --use-ssh-agent -y" on "hanode1" | ||
And Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster join --use-ssh-agent -y -c hanode1" on "hanode2" | ||
And Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster join --use-ssh-agent -y -c hanode1" on "hanode3" | ||
Then Cluster service is "started" on "hanode1" | ||
And Run "test x1 == x$(awk 'END {print NR}' ~root/.ssh/authorized_keys)" OK | ||
And Run "test x3 == x$(awk 'END {print NR}' ~hacluster/.ssh/authorized_keys)" OK | ||
|
||
Scenario: Skip creating ssh key pairs with --use-ssh-agent and use -N | ||
Given Run "crm cluster stop" OK on "hanode1,hanode2,hanode3" | ||
And Run "systemctl disable --now booth@booth" OK on "hanode1,hanode2,hanode3" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init --use-ssh-agent -y -N hanode2 -N hanode3" on "hanode1" | ||
Then Cluster service is "started" on "hanode3" | ||
And Run "test x1 == x$(awk 'END {print NR}' ~root/.ssh/authorized_keys)" OK on "hanode3" | ||
And Run "test x3 == x$(awk 'END {print NR}' ~hacluster/.ssh/authorized_keys)" OK on "hanode3" | ||
|
||
Scenario: GEO cluster setup with ssh-agent | ||
Given Run "crm cluster stop" OK on "hanode1,hanode2,hanode3" | ||
And Run "systemctl disable --now booth@booth" OK on "hanode1,hanode2,hanode3" | ||
And Cluster service is "stopped" on "hanode1" | ||
And Cluster service is "stopped" on "hanode2" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init -y -n cluster1 --use-ssh-agent" on "hanode1" | ||
Then Cluster service is "started" on "hanode1" | ||
When Run "crm configure primitive vip IPaddr2 params [email protected]" on "hanode1" | ||
|
||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster init -y -n cluster2 --use-ssh-agent" on "hanode2" | ||
Then Cluster service is "started" on "hanode2" | ||
When Run "crm configure primitive vip IPaddr2 params [email protected]" on "hanode2" | ||
|
||
When Run "crm cluster geo_init -y --clusters "cluster1=@vip.0 cluster2=@vip.1" --tickets tickets-geo --arbitrator hanode3" on "hanode1" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster geo_join -y --use-ssh-agent --cluster-node hanode1 --clusters "[email protected] [email protected]"" on "hanode2" | ||
Given Service "booth@booth" is "stopped" on "hanode3" | ||
When Run "SSH_AUTH_SOCK=/root/ssh-auth-sock crm cluster geo_init_arbitrator -y --use-ssh-agent --cluster-node hanode1" on "hanode3" | ||
Then Service "booth@booth" is "started" on "hanode3" | ||
When Run "crm resource start g-booth" on "hanode1" | ||
Then Show cluster status on "hanode1" | ||
When Run "crm resource start g-booth" on "hanode2" | ||
Then Show cluster status on "hanode2" |