1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you maynot use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
22 Resource variables.resource
26 Open Connection And Log In
27 Open Connection ${HOST}
28 Login With Public Key ${USERNAME} ${KEYFILE}
32 :FOR ${node} IN @{nodes}
33 \ ${result}= Run Manager Start ${node}
37 :FOR ${node} IN @{nodes}
38 \ ${result}= Run Monitor Start ${node}
42 :FOR ${node} IN @{nodes}
43 \ ${stdout}= Execute Command ${SSH_CMD} ${node} "sudo pkill -u ceph ceph-mgr"
47 :FOR ${node} IN @{nodes}
48 \ ${stdout}= Execute Command ${SSH_CMD} ${node} "sudo pkill -u ceph ceph-mon"
50 Ceph Should Be Healthy
51 ${stdout}= Execute Command ceph health --connect-timeout 20 sudo=True
52 Should Contain ${stdout} HEALTH_OK
54 Ceph Health Should Be Degraded
55 ${stdout}= Execute Command ceph health --connect-timeout 20 sudo=True
56 Should Contain ${stdout} HEALTH_WARN
60 Execute Command ${SSH_CMD} ${node} "sudo systemctl start ceph-mgr@${node}"
61 ${stdout}= Execute Command ${SSH_CMD} ${node} "systemctl is-active ceph-mgr@${node}"
62 Return From Keyword If '${stdout}' == 'active'
63 Execute Command ${SSH_CMD} ${node} "sudo systemctl reset-failed ceph-mgr@${node}"
64 Execute Command ${SSH_CMD} ${node} "sudo systemctl start ceph-mgr@${node}"
65 ${stdout}= Execute Command ${SSH_CMD} ${node} "systemctl is-active ceph-mgr@${node}"
66 Should Be Equal As Strings ${stdout} active
70 Execute Command ${SSH_CMD} ${node} "sudo systemctl start ceph-mon@${node}"
71 ${stdout}= Execute Command ${SSH_CMD} ${node} "systemctl is-active ceph-mon@${node}"
72 Return From Keyword If '${stdout}' == 'active'
73 Execute Command ${SSH_CMD} ${node} "sudo systemctl reset-failed ceph-mon@${node}"
74 Execute Command ${SSH_CMD} ${node} "sudo systemctl start ceph-mon@${node}"
75 ${stdout}= Execute Command ${SSH_CMD} ${node} "systemctl is-active ceph-mon@${node}"
76 Should Be Equal As Strings ${stdout} active