diff options
Diffstat (limited to '')
-rw-r--r-- | test/testcases/resource | 84 | ||||
-rw-r--r-- | test/testcases/resource.exp | 1450 |
2 files changed, 1534 insertions, 0 deletions
diff --git a/test/testcases/resource b/test/testcases/resource new file mode 100644 index 0000000..8fad9b6 --- /dev/null +++ b/test/testcases/resource @@ -0,0 +1,84 @@ +resource status p0 +%setenv showobj=p3 +resource start p3 +resource stop p3 +%setenv showobj=c1 +resource manage c1 +resource unmanage c1 +%setenv showobj=p2 +resource maintenance p2 on +resource maintenance p2 off +%setenv showobj=cli-prefer-p3 +resource migrate p3 node1 +%setenv showobj= +resource unmigrate p3 +%setenv showobj=cli-prefer-p3 +resource migrate p3 node1 force +%setenv showobj= +resource unmigrate p3 +%setenv showobj=p0 +resource param p0 set a0 "1 2 3" +resource param p0 show a0 +resource param p0 delete a0 +resource meta p0 set m0 123 +resource meta p0 show m0 +resource meta p0 delete m0 +resource trace p0 probe +resource trace p0 start +resource trace p0 stop +resource untrace p0 probe +resource untrace p0 start +resource untrace p0 stop +configure group g p0 p3 +options manage-children never +resource start g +resource start p0 +resource stop g +configure clone cg g +options manage-children always +resource start g +resource stop g +resource start cg +resource stop p0 +resource start cg +resource stop cg +resource stop p3 +%setenv showobj= +configure rename p3 p4 +configure primitive p3 Dummy +resource stop p3 +resource start p3 +resource cleanup +resource cleanup p3 +resource cleanup p3 node1 +resource cleanup force +resource cleanup p3 force +resource cleanup p3 node1 force +resource refresh +resource refresh p3 +resource refresh p3 node1 +resource refresh force +resource refresh p3 force +resource refresh p3 node1 force +resource stop p3 +configure rm cg +configure ms msg g +resource scores +%setenv showobj= +configure primitive p5 Dummy +configure group g1 p5 +resource manage p5 +%setenv showobj=p5 +-F resource maintenance p5 on +%setenv showobj=p5 +-F resource unmanage p5 +%setenv showobj=p5 +-F resource maintenance g1 +resource start p5 +%setenv showobj=g1 +-F resource manage g1 +resource start p5 +%setenv showobj=p5 +-F resource maintenance p5 on +%setenv showobj=g1 +-F resource maintenance g1 diff --git a/test/testcases/resource.exp b/test/testcases/resource.exp new file mode 100644 index 0000000..c03aae7 --- /dev/null +++ b/test/testcases/resource.exp @@ -0,0 +1,1450 @@ +.TRY resource status p0 +.EXT crm_resource --locate --resource 'p0' +resource p0 is NOT running +.SETENV showobj=p3 +.TRY resource start p3 +.INP: configure +.INP: _regtest on +.INP: show xml p3 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop p3 +.INP: configure +.INP: _regtest on +.INP: show xml p3 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=c1 +.TRY resource manage c1 +.INP: configure +.INP: _regtest on +.INP: show xml c1 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="c1"> + <meta_attributes id="c1-meta_attributes"> + <nvpair id="c1-meta_attributes-interleave" name="interleave" value="true"/> + <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="true"/> + </meta_attributes> + <primitive id="p1" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p1-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p1-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p1-stop-0s"/> + </operations> + </primitive> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource unmanage c1 +.INP: configure +.INP: _regtest on +.INP: show xml c1 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="c1"> + <meta_attributes id="c1-meta_attributes"> + <nvpair id="c1-meta_attributes-interleave" name="interleave" value="true"/> + <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="false"/> + </meta_attributes> + <primitive id="p1" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p1-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p1-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p1-stop-0s"/> + </operations> + </primitive> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=p2 +.TRY resource maintenance p2 on +.INP: configure +.INP: _regtest on +.INP: show xml p2 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="m1"> + <meta_attributes id="m1-meta_attributes"> + <nvpair name="promotable" value="true" id="m1-meta_attributes-promotable"/> + <nvpair id="m1-meta_attributes-interleave" name="interleave" value="true"/> + <nvpair id="m1-meta_attributes-maintenance" name="maintenance" value="true"/> + </meta_attributes> + <primitive id="p2" class="ocf" provider="heartbeat" type="Delay"> + <instance_attributes id="p2-instance_attributes"> + <nvpair name="startdelay" value="2" id="p2-instance_attributes-startdelay"/> + <nvpair name="mondelay" value="2" id="p2-instance_attributes-mondelay"/> + <nvpair name="stopdelay" value="2" id="p2-instance_attributes-stopdelay"/> + </instance_attributes> + <operations> + <op name="monitor" timeout="30s" interval="10s" id="p2-monitor-10s"/> + <op name="start" timeout="30s" interval="0s" id="p2-start-0s"/> + <op name="stop" timeout="30s" interval="0s" id="p2-stop-0s"/> + </operations> + </primitive> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource maintenance p2 off +.INP: configure +.INP: _regtest on +.INP: show xml p2 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="m1"> + <meta_attributes id="m1-meta_attributes"> + <nvpair name="promotable" value="true" id="m1-meta_attributes-promotable"/> + <nvpair id="m1-meta_attributes-interleave" name="interleave" value="true"/> + <nvpair id="m1-meta_attributes-maintenance" name="maintenance" value="false"/> + </meta_attributes> + <primitive id="p2" class="ocf" provider="heartbeat" type="Delay"> + <instance_attributes id="p2-instance_attributes"> + <nvpair name="startdelay" value="2" id="p2-instance_attributes-startdelay"/> + <nvpair name="mondelay" value="2" id="p2-instance_attributes-mondelay"/> + <nvpair name="stopdelay" value="2" id="p2-instance_attributes-stopdelay"/> + </instance_attributes> + <operations> + <op name="monitor" timeout="30s" interval="10s" id="p2-monitor-10s"/> + <op name="start" timeout="30s" interval="0s" id="p2-start-0s"/> + <op name="stop" timeout="30s" interval="0s" id="p2-stop-0s"/> + </operations> + </primitive> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=cli-prefer-p3 +.TRY resource migrate p3 node1 +WARNING: This command 'migrate' is deprecated, please use 'move' +INFO: "migrate" is accepted as "move" +.EXT crm_resource --quiet --move --resource 'p3' --node 'node1' +INFO: Move constraint created for p3 to node1 +INFO: Use `crm resource clear p3` to remove this constraint +.INP: configure +.INP: _regtest on +.INP: show xml cli-prefer-p3 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources/> + <constraints> + <rsc_location id="cli-prefer-p3" rsc="p3" role="Started" node="node1" score="INFINITY"/> + </constraints> + </configuration> +</cib> + +.SETENV showobj= +.TRY resource unmigrate p3 +WARNING: This command 'unmigrate' is deprecated, please use 'clear' +INFO: "unmigrate" is accepted as "clear" +.EXT crm_resource --quiet --clear --resource 'p3' +INFO: Removed migration constraints for p3 +.SETENV showobj=cli-prefer-p3 +.TRY resource migrate p3 node1 force +WARNING: This command 'migrate' is deprecated, please use 'move' +INFO: "migrate" is accepted as "move" +.EXT crm_resource --quiet --move --resource 'p3' --node 'node1' --force +INFO: Move constraint created for p3 to node1 +INFO: Use `crm resource clear p3` to remove this constraint +.INP: configure +.INP: _regtest on +.INP: show xml cli-prefer-p3 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources/> + <constraints> + <rsc_location id="cli-prefer-p3" rsc="p3" role="Started" node="node1" score="INFINITY"/> + </constraints> + </configuration> +</cib> + +.SETENV showobj= +.TRY resource unmigrate p3 +WARNING: This command 'unmigrate' is deprecated, please use 'clear' +INFO: "unmigrate" is accepted as "clear" +.EXT crm_resource --quiet --clear --resource 'p3' +INFO: Removed migration constraints for p3 +.SETENV showobj=p0 +.TRY resource param p0 set a0 "1 2 3" +.EXT crm_resource --resource 'p0' --set-parameter 'a0' --parameter-value '1 2 3' +Set 'p0' option: id=p0-instance_attributes-a0 set=p0-instance_attributes name=a0 value=1 2 3 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"> + <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/> + </instance_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource param p0 show a0 +.EXT crm_resource --resource 'p0' --get-parameter 'a0' +1 2 3 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"> + <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/> + </instance_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource param p0 delete a0 +.EXT crm_resource --resource 'p0' --delete-parameter 'a0' +Deleted 'p0' option: id=p0-instance_attributes-a0 name=a0 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource meta p0 set m0 123 +.EXT crm_resource --meta --resource 'p0' --set-parameter 'm0' --parameter-value '123' +Set 'p0' option: id=p0-meta_attributes-m0 set=p0-meta_attributes name=m0 value=123 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/> + </meta_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource meta p0 show m0 +.EXT crm_resource --meta --resource 'p0' --get-parameter 'm0' +123 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/> + </meta_attributes> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource meta p0 delete m0 +.EXT crm_resource --meta --resource 'p0' --delete-parameter 'm0' +Deleted 'p0' option: id=p0-meta_attributes-m0 name=m0 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource trace p0 probe +INFO: Trace for p0:monitor is written to /var/lib/heartbeat/trace_ra/Dummy +INFO: Trace set, restart p0 to trace non-monitor operations +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + <op name="monitor" interval="0" id="p0-monitor-0"> + <instance_attributes id="p0-monitor-0-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource trace p0 start +INFO: Trace for p0:start is written to /var/lib/heartbeat/trace_ra/Dummy +INFO: Trace set, restart p0 to trace the start operation +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + <op name="monitor" interval="0" id="p0-monitor-0"> + <instance_attributes id="p0-monitor-0-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"> + <instance_attributes id="p0-start-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-start-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource trace p0 stop +INFO: Trace for p0:stop is written to /var/lib/heartbeat/trace_ra/Dummy +INFO: Trace set, restart p0 to trace the stop operation +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="monitor" interval="0" id="p0-monitor-0"> + <instance_attributes id="p0-monitor-0-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"> + <instance_attributes id="p0-start-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-start-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"> + <instance_attributes id="p0-stop-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-stop-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource untrace p0 probe +INFO: Stop tracing p0 for operation monitor +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"> + <instance_attributes id="p0-start-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-start-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"> + <instance_attributes id="p0-stop-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-stop-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource untrace p0 start +INFO: Stop tracing p0 for operation start +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"> + <instance_attributes id="p0-stop-0s-instance_attributes"> + <nvpair name="trace_ra" value="1" id="p0-stop-0s-instance_attributes-trace_ra"/> + </instance_attributes> + </op> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource untrace p0 stop +INFO: Stop tracing p0 for operation stop +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY configure group g p0 p3 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY options manage-children never +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <instance_attributes id="p0-instance_attributes"/> + <meta_attributes id="p0-meta_attributes"/> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start g +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g"> + <meta_attributes id="g-meta_attributes"> + <nvpair id="g-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start p0 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g"> + <meta_attributes id="g-meta_attributes"> + <nvpair id="g-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop g +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g"> + <meta_attributes id="g-meta_attributes"> + <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY configure clone cg g +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <group id="g"> + <meta_attributes id="g-meta_attributes"> + <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY options manage-children always +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <group id="g"> + <meta_attributes id="g-meta_attributes"> + <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start g +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop g +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start cg +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop p0 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + <meta_attributes id="p0-meta_attributes"> + <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start cg +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop cg +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource stop p3 +.INP: configure +.INP: _regtest on +.INP: show xml p0 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <clone id="cg"> + <meta_attributes id="cg-meta_attributes"> + <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + <group id="g"> + <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p0-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p0-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p0-stop-0s"/> + </operations> + </primitive> + <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p3-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p3-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p3-stop-0s"/> + </operations> + <meta_attributes id="p3-meta_attributes"> + <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/> + </meta_attributes> + </primitive> + </group> + </clone> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj= +.TRY configure rename p3 p4 +.EXT crm_resource --show-metadata stonith:null +.EXT stonithd metadata +.EXT crm_resource --show-metadata ocf:pacemaker:Dummy +.EXT crm_resource --show-metadata ocf:heartbeat:Delay +.TRY configure primitive p3 Dummy +.EXT crm_resource --show-metadata ocf:heartbeat:Dummy +.EXT crm_resource --show-metadata stonith:null +.EXT stonithd metadata +.EXT crm_resource --show-metadata ocf:pacemaker:Dummy +.EXT crm_resource --show-metadata ocf:heartbeat:Delay +.TRY resource stop p3 +.TRY resource start p3 +.TRY resource cleanup +.EXT crm_resource --cleanup +.TRY resource cleanup p3 +.EXT crm_resource --cleanup --resource p3 +.TRY resource cleanup p3 node1 +.EXT crm_resource --cleanup --resource p3 --node node1 +.TRY resource cleanup force +.EXT crm_resource --cleanup --force +.TRY resource cleanup p3 force +.EXT crm_resource --cleanup --resource p3 --force +.TRY resource cleanup p3 node1 force +.EXT crm_resource --cleanup --resource p3 --node node1 --force +.TRY resource refresh +.EXT crm_resource --refresh +.TRY resource refresh p3 +.EXT crm_resource --refresh --resource p3 +.TRY resource refresh p3 node1 +.EXT crm_resource --refresh --resource p3 --node node1 +.TRY resource refresh force +.EXT crm_resource --refresh --force +.TRY resource refresh p3 force +.EXT crm_resource --refresh --resource p3 --force +.TRY resource refresh p3 node1 force +.EXT crm_resource --refresh --resource p3 --node node1 --force +.TRY resource stop p3 +.TRY configure rm cg +WARNING: This command 'rm' is deprecated, please use 'delete' +INFO: "rm" is accepted as "delete" +.TRY configure ms msg g +WARNING: "ms" is deprecated. Please use "clone msg g meta promotable=true" +.TRY resource scores +.EXT crm_simulate -sUL +2 of 6 resource instances DISABLED and 0 BLOCKED from further action due to failure + +Node node1: UNCLEAN (offline) + + st (stonith:null): Stopped + Stopped: [ node1 ] + Stopped: [ node1 ] + p3 (ocf::heartbeat:Dummy): Stopped ( disabled ) + Stopped: [ node1 ] + +Original: node1 capacity: +pcmk__primitive_assign: st allocation score on node1: 0 +pcmk__clone_assign: c1 allocation score on node1: 0 +pcmk__clone_assign: p1:0 allocation score on node1: 0 +pcmk__primitive_assign: p1:0 allocation score on node1: -INFINITY +pcmk__clone_assign: m1 allocation score on node1: 0 +pcmk__clone_assign: p2:0 allocation score on node1: 0 +pcmk__primitive_assign: p2:0 allocation score on node1: -INFINITY +p2:0 promotion score on none: 0 +pcmk__primitive_assign: p3 allocation score on node1: -INFINITY +pcmk__clone_assign: msg allocation score on node1: 0 +pcmk__clone_assign: g:0 allocation score on node1: 0 +pcmk__clone_assign: p0:0 allocation score on node1: 0 +pcmk__clone_assign: p4:0 allocation score on node1: 0 +pcmk__group_assign: g:0 allocation score on node1: -INFINITY +pcmk__group_assign: p0:0 allocation score on node1: -INFINITY +pcmk__group_assign: p4:0 allocation score on node1: -INFINITY +pcmk__primitive_assign: p0:0 allocation score on node1: -INFINITY +pcmk__primitive_assign: p4:0 allocation score on node1: -INFINITY +g:0 promotion score on none: 0 +Remaining: node1 capacity: + +.SETENV showobj= +.TRY configure primitive p5 Dummy +.EXT crm_resource --show-metadata ocf:heartbeat:Dummy +.EXT crm_resource --show-metadata stonith:null +.EXT stonithd metadata +.EXT crm_resource --show-metadata ocf:pacemaker:Dummy +.EXT crm_resource --show-metadata ocf:heartbeat:Delay +.TRY configure group g1 p5 +.TRY resource manage p5 +.SETENV showobj=p5 +.TRY -F resource maintenance p5 on +INFO: 'maintenance' conflicts with 'is-managed' attribute. Remove 'is-managed' for resource p5? [YES] +.INP: configure +.INP: _regtest on +.INP: show xml p5 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes-0"> + <nvpair id="p5-meta_attributes-0-maintenance" name="maintenance" value="true"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=p5 +.TRY -F resource unmanage p5 +INFO: 'is-managed' conflicts with 'maintenance' attribute. Remove 'maintenance' for resource p5? [YES] +.INP: configure +.INP: _regtest on +.INP: show xml p5 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-is-managed" name="is-managed" value="false"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=p5 +.TRY -F resource maintenance g1 +.INP: configure +.INP: _regtest on +.INP: show xml p5 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes"> + <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start p5 +.INP: configure +.INP: _regtest on +.INP: show xml p5 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes"> + <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=g1 +.TRY -F resource manage g1 +INFO: 'is-managed' conflicts with 'maintenance' attribute. Remove 'maintenance' for resource g1? [YES] +.INP: configure +.INP: _regtest on +.INP: show xml g1 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes-0"> + <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.TRY resource start p5 +.INP: configure +.INP: _regtest on +.INP: show xml g1 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes-0"> + <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=p5 +.TRY -F resource maintenance p5 on +.INP: configure +.INP: _regtest on +.INP: show xml p5 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes-0"> + <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/> + <nvpair id="p5-meta_attributes-maintenance" name="maintenance" value="true"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + +.SETENV showobj=g1 +.TRY -F resource maintenance g1 +INFO: 'maintenance' conflicts with 'is-managed' attribute. Remove 'is-managed' for resource g1? [YES] +.INP: configure +.INP: _regtest on +.INP: show xml g1 +<?xml version="1.0" ?> +<cib> + <configuration> + <crm_config/> + <nodes/> + <resources> + <group id="g1"> + <meta_attributes id="g1-meta_attributes"> + <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/> + </meta_attributes> + <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"> + <operations> + <op name="monitor" timeout="20s" interval="10s" id="p5-monitor-10s"/> + <op name="start" timeout="20s" interval="0s" id="p5-start-0s"/> + <op name="stop" timeout="20s" interval="0s" id="p5-stop-0s"/> + </operations> + <meta_attributes id="p5-meta_attributes"> + <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/> + </meta_attributes> + </primitive> + </group> + </resources> + <constraints/> + </configuration> +</cib> + |