summaryrefslogtreecommitdiffstats
path: root/test/testcases/delete.exp
blob: 87b1a7a903b18dc03679ff6afb2d3a0dfc2f4237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
.TRY Delete/Rename test
.INP: configure
.INP: # erase to start from scratch
.INP: erase
.INP: erase nodes
.INP: node node1
.INP: # create one stonith so that verify does not complain
.INP: primitive st stonith:ssh 	params hostlist='node1' 	meta target-role="Started" 	op start timeout=60s 	op monitor interval=60m timeout=60s
.EXT crm_resource --show-metadata stonith:ssh
.EXT stonithd metadata
.INP: primitive d1 ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: location d1-pref d1 100: node1
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive d2 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
        op stop timeout=15 interval=0s
location d1-pref d1 100: node1
.INP: _test
.INP: rename d1 p1
INFO: 13: modified location:d1-pref from d1 to p1
.INP: show
node node1
primitive d2 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive p1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
        op stop timeout=15 interval=0s
location d1-pref p1 100: node1
.INP: # delete primitive
.INP: delete d2
.INP: _test
.INP: show
node node1
primitive p1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
location d1-pref p1 100: node1
.INP: # delete primitive with constraint
.INP: delete p1
INFO: 20: hanging location:d1-pref deleted
.INP: _test
.INP: show
node node1
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
.INP: primitive d1 ocf:pacemaker:Dummy
.INP: location d1-pref d1 100: node1
.INP: _test
.INP: # delete primitive belonging to a group
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: _test
.INP: group g1 d2 d1
INFO: 29: modified location:d1-pref from d1 to g1
.INP: delete d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
group g1 d1
location d1-pref g1 100: node1
.INP: _test
.INP: delete g1
INFO: 33: modified location:d1-pref from g1 to d1
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
location d1-pref d1 100: node1
.INP: verify
.INP: # delete a group which is in a clone
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: group g1 d2 d1
INFO: 38: modified location:d1-pref from d1 to g1
.INP: clone c1 g1
INFO: 39: modified location:d1-pref from g1 to c1
.INP: delete g1
INFO: 40: modified location:d1-pref from c1 to g1
INFO: 40: modified location:d1-pref from g1 to d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive d2 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
location d1-pref d2 100: node1
.INP: _test
.INP: group g1 d2 d1
INFO: 43: modified location:d1-pref from d2 to g1
.INP: clone c1 g1
INFO: 44: modified location:d1-pref from g1 to c1
.INP: _test
.INP: # delete group from a clone (again)
.INP: delete g1
INFO: 47: modified location:d1-pref from c1 to g1
INFO: 47: modified location:d1-pref from g1 to d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive d2 ocf:pacemaker:Dummy \
	op monitor timeout=20s interval=10s \
	op start timeout=20s interval=0s \
	op stop timeout=20s interval=0s
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
location d1-pref d2 100: node1
.INP: _test
.INP: group g1 d2 d1
INFO: 50: modified location:d1-pref from d2 to g1
.INP: clone c1 g1
INFO: 51: modified location:d1-pref from g1 to c1
.INP: # delete primitive and its group and their clone
.INP: delete d2 d1 c1 g1
INFO: 53: modified location:d1-pref from c1 to g1
INFO: 53: modified location:d1-pref from g1 to d2
INFO: 53: hanging location:d1-pref deleted
.INP: show
node node1
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0s \
	op monitor interval=60m timeout=60s \
	op stop timeout=15 interval=0s
.INP: _test
.INP: # verify
.INP: verify
.INP: commit