~ubuntu-branches/ubuntu/utopic/pacemaker/utopic-proposed

« back to all changes in this revision

Viewing changes to shell/regression/testcases/resource.exp

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-07-16 16:40:24 UTC
  • mfrom: (1.1.11) (2.2.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130716164024-lvwrf4xivk1wdr3c
Tags: 1.1.9+git20130321-1ubuntu1
* Resync from debian expiremental.
* debian/control:
  - Use lower version for Build-Depends on libcorosync-dev
    and libqb-dev.
  - Build-Depends on libcfg-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TRY resource status p0
2
 
.EXT crm_resource -W -r 'p0'
3
 
resource p0 is NOT running
4
 
.SETENV showobj=p3
5
 
.TRY resource start p3
6
 
.INP: configure
7
 
.INP: _regtest on
8
 
.INP: show xml p3
9
 
<?xml version="1.0" ?>
10
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
11
 
  <configuration>
12
 
    <crm_config/>
13
 
    <nodes/>
14
 
    <resources>
15
 
      <primitive class="ocf" id="p3" provider="pacemaker" type="Dummy">
16
 
        <meta_attributes id="p3-meta_attributes">
17
 
          <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Started"/>
18
 
        </meta_attributes>
19
 
      </primitive>
20
 
    </resources>
21
 
    <constraints/>
22
 
  </configuration>
23
 
</cib>
24
 
 
25
 
.TRY resource stop p3
26
 
.INP: configure
27
 
.INP: _regtest on
28
 
.INP: show xml p3
29
 
<?xml version="1.0" ?>
30
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
31
 
  <configuration>
32
 
    <crm_config/>
33
 
    <nodes/>
34
 
    <resources>
35
 
      <primitive class="ocf" id="p3" provider="pacemaker" type="Dummy">
36
 
        <meta_attributes id="p3-meta_attributes">
37
 
          <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
38
 
        </meta_attributes>
39
 
      </primitive>
40
 
    </resources>
41
 
    <constraints/>
42
 
  </configuration>
43
 
</cib>
44
 
 
45
 
.SETENV showobj=c1
46
 
.TRY resource manage c1
47
 
.INP: configure
48
 
.INP: _regtest on
49
 
.INP: show xml c1
50
 
<?xml version="1.0" ?>
51
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
52
 
  <configuration>
53
 
    <crm_config/>
54
 
    <nodes/>
55
 
    <resources>
56
 
      <clone id="c1">
57
 
        <meta_attributes id="c1-meta_attributes">
58
 
          <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="true"/>
59
 
        </meta_attributes>
60
 
        <primitive class="ocf" id="p1" provider="pacemaker" type="Dummy"/>
61
 
      </clone>
62
 
    </resources>
63
 
    <constraints/>
64
 
  </configuration>
65
 
</cib>
66
 
 
67
 
.TRY resource unmanage c1
68
 
.INP: configure
69
 
.INP: _regtest on
70
 
.INP: show xml c1
71
 
<?xml version="1.0" ?>
72
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
73
 
  <configuration>
74
 
    <crm_config/>
75
 
    <nodes/>
76
 
    <resources>
77
 
      <clone id="c1">
78
 
        <meta_attributes id="c1-meta_attributes">
79
 
          <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="false"/>
80
 
        </meta_attributes>
81
 
        <primitive class="ocf" id="p1" provider="pacemaker" type="Dummy"/>
82
 
      </clone>
83
 
    </resources>
84
 
    <constraints/>
85
 
  </configuration>
86
 
</cib>
87
 
 
88
 
.SETENV showobj=cli-prefer-p3
89
 
.TRY resource migrate p3
90
 
.EXT crm_resource -M -r 'p3' 
91
 
Resource p3 not moved: not-active and no preferred location specified.
92
 
Error performing operation: cib object missing
93
 
.INP: configure
94
 
.INP: _regtest on
95
 
.INP: show xml cli-prefer-p3
96
 
<?xml version="1.0" ?>
97
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
98
 
  <configuration>
99
 
    <crm_config/>
100
 
    <nodes/>
101
 
    <resources/>
102
 
    <constraints/>
103
 
  </configuration>
104
 
</cib>
105
 
 
106
 
.TRY resource migrate p3 node1
107
 
.EXT crm_resource -M -r 'p3' --node='node1'
108
 
.INP: configure
109
 
.INP: _regtest on
110
 
.INP: show xml cli-prefer-p3
111
 
<?xml version="1.0" ?>
112
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
113
 
  <configuration>
114
 
    <crm_config/>
115
 
    <nodes/>
116
 
    <resources/>
117
 
    <constraints>
118
 
      <rsc_location id="cli-prefer-p3" rsc="p3">
119
 
        <rule id="cli-prefer-rule-p3" score="INFINITY">
120
 
          <expression attribute="#uname" id="cli-prefer-expr-p3" operation="eq" value="node1"/>
121
 
        </rule>
122
 
      </rsc_location>
123
 
    </constraints>
124
 
  </configuration>
125
 
</cib>
126
 
 
127
 
.TRY resource unmigrate p3
128
 
.EXT crm_resource -U -r 'p3'
129
 
.INP: configure
130
 
.INP: _regtest on
131
 
.INP: show xml cli-prefer-p3
132
 
<?xml version="1.0" ?>
133
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
134
 
  <configuration>
135
 
    <crm_config/>
136
 
    <nodes/>
137
 
    <resources/>
138
 
    <constraints/>
139
 
  </configuration>
140
 
</cib>
141
 
 
142
 
.SETENV showobj=p0
143
 
.TRY resource param p0 set a0 "1 2 3"
144
 
.EXT crm_resource -r 'p0' -p 'a0' -v '1 2 3'
145
 
.INP: configure
146
 
.INP: _regtest on
147
 
.INP: show xml p0
148
 
<?xml version="1.0" ?>
149
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
150
 
  <configuration>
151
 
    <crm_config/>
152
 
    <nodes/>
153
 
    <resources>
154
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy">
155
 
        <instance_attributes id="p0-instance_attributes">
156
 
          <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/>
157
 
        </instance_attributes>
158
 
      </primitive>
159
 
    </resources>
160
 
    <constraints/>
161
 
  </configuration>
162
 
</cib>
163
 
 
164
 
.TRY resource param p0 show a0
165
 
.EXT crm_resource -r 'p0' -g 'a0'
166
 
1 2 3
167
 
.INP: configure
168
 
.INP: _regtest on
169
 
.INP: show xml p0
170
 
<?xml version="1.0" ?>
171
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
172
 
  <configuration>
173
 
    <crm_config/>
174
 
    <nodes/>
175
 
    <resources>
176
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy">
177
 
        <instance_attributes id="p0-instance_attributes">
178
 
          <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/>
179
 
        </instance_attributes>
180
 
      </primitive>
181
 
    </resources>
182
 
    <constraints/>
183
 
  </configuration>
184
 
</cib>
185
 
 
186
 
.TRY resource param p0 delete a0
187
 
.EXT crm_resource -r 'p0' -d 'a0'
188
 
Deleted p0 option: id=p0-instance_attributes-a0 name=a0
189
 
.INP: configure
190
 
.INP: _regtest on
191
 
.INP: show xml p0
192
 
<?xml version="1.0" ?>
193
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
194
 
  <configuration>
195
 
    <crm_config/>
196
 
    <nodes/>
197
 
    <resources>
198
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
199
 
    </resources>
200
 
    <constraints/>
201
 
  </configuration>
202
 
</cib>
203
 
 
204
 
.TRY resource meta p0 set m0 123
205
 
.EXT crm_resource --meta -r 'p0' -p 'm0' -v '123'
206
 
.INP: configure
207
 
.INP: _regtest on
208
 
.INP: show xml p0
209
 
<?xml version="1.0" ?>
210
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
211
 
  <configuration>
212
 
    <crm_config/>
213
 
    <nodes/>
214
 
    <resources>
215
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy">
216
 
        <meta_attributes id="p0-meta_attributes">
217
 
          <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/>
218
 
        </meta_attributes>
219
 
      </primitive>
220
 
    </resources>
221
 
    <constraints/>
222
 
  </configuration>
223
 
</cib>
224
 
 
225
 
.TRY resource meta p0 show m0
226
 
.EXT crm_resource --meta -r 'p0' -g 'm0'
227
 
123
228
 
.INP: configure
229
 
.INP: _regtest on
230
 
.INP: show xml p0
231
 
<?xml version="1.0" ?>
232
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
233
 
  <configuration>
234
 
    <crm_config/>
235
 
    <nodes/>
236
 
    <resources>
237
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy">
238
 
        <meta_attributes id="p0-meta_attributes">
239
 
          <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/>
240
 
        </meta_attributes>
241
 
      </primitive>
242
 
    </resources>
243
 
    <constraints/>
244
 
  </configuration>
245
 
</cib>
246
 
 
247
 
.TRY resource meta p0 delete m0
248
 
.EXT crm_resource --meta -r 'p0' -d 'm0'
249
 
Deleted p0 option: id=p0-meta_attributes-m0 name=m0
250
 
.INP: configure
251
 
.INP: _regtest on
252
 
.INP: show xml p0
253
 
<?xml version="1.0" ?>
254
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
255
 
  <configuration>
256
 
    <crm_config/>
257
 
    <nodes/>
258
 
    <resources>
259
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
260
 
    </resources>
261
 
    <constraints/>
262
 
  </configuration>
263
 
</cib>
264
 
 
265
 
.TRY resource failcount p0 set node1 5
266
 
.EXT crm_attribute -t status -n 'fail-count-p0' -N 'node1' -v '5' -d 0
267
 
.INP: configure
268
 
.INP: _regtest on
269
 
.INP: show xml p0
270
 
<?xml version="1.0" ?>
271
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
272
 
  <configuration>
273
 
    <crm_config/>
274
 
    <nodes/>
275
 
    <resources>
276
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
277
 
    </resources>
278
 
    <constraints/>
279
 
  </configuration>
280
 
</cib>
281
 
 
282
 
.TRY resource failcount p0 show node1
283
 
.EXT crm_attribute -t status -n 'fail-count-p0' -N 'node1' -G -d 0
284
 
scope=status  name=fail-count-p0 value=0
285
 
.INP: configure
286
 
.INP: _regtest on
287
 
.INP: show xml p0
288
 
<?xml version="1.0" ?>
289
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
290
 
  <configuration>
291
 
    <crm_config/>
292
 
    <nodes/>
293
 
    <resources>
294
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
295
 
    </resources>
296
 
    <constraints/>
297
 
  </configuration>
298
 
</cib>
299
 
 
300
 
.TRY resource failcount p0 delete node1
301
 
.EXT crm_attribute -t status -n 'fail-count-p0' -N 'node1' -D -d 0
302
 
.INP: configure
303
 
.INP: _regtest on
304
 
.INP: show xml p0
305
 
<?xml version="1.0" ?>
306
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
307
 
  <configuration>
308
 
    <crm_config/>
309
 
    <nodes/>
310
 
    <resources>
311
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
312
 
    </resources>
313
 
    <constraints/>
314
 
  </configuration>
315
 
</cib>
316
 
 
317
 
.TRY resource cleanup p0 node1
318
 
.EXT crm_resource -C -r 'p0' -H 'node1'
319
 
Error performing operation: connection failed
320
 
.INP: configure
321
 
.INP: _regtest on
322
 
.INP: show xml p0
323
 
<?xml version="1.0" ?>
324
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
325
 
  <configuration>
326
 
    <crm_config/>
327
 
    <nodes/>
328
 
    <resources>
329
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
330
 
    </resources>
331
 
    <constraints/>
332
 
  </configuration>
333
 
</cib>
334
 
 
335
 
.TRY resource cleanup p0
336
 
.EXT crm_resource -C -r 'p0'
337
 
Error performing operation: connection failed
338
 
.INP: configure
339
 
.INP: _regtest on
340
 
.INP: show xml p0
341
 
<?xml version="1.0" ?>
342
 
<cib admin_epoch="0" crm_feature_set="3.0.1" dc-uuid="f36760d8-d84a-46b2-b452-4c8cac8b3396" epoch="0" have-quorum="1" num_updates="1" remote-tls-port="0" validate-with="pacemaker-1.1">
343
 
  <configuration>
344
 
    <crm_config/>
345
 
    <nodes/>
346
 
    <resources>
347
 
      <primitive class="ocf" id="p0" provider="pacemaker" type="Dummy"/>
348
 
    </resources>
349
 
    <constraints/>
350
 
  </configuration>
351
 
</cib>
352