diff --git a/cts/cli/regression.crm_simulate.exp b/cts/cli/regression.crm_simulate.exp new file mode 100644 index 00000000000..cc442403a1a --- /dev/null +++ b/cts/cli/regression.crm_simulate.exp @@ -0,0 +1,806 @@ +=#=#=#= Begin test: Show allocation scores with crm_simulate =#=#=#= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=#=#=#= End test: Show allocation scores with crm_simulate - OK (0) =#=#=#= +* Passed: crm_simulate - Show allocation scores with crm_simulate +=#=#=#= Begin test: Show utilization with crm_simulate =#=#=#= +4 of 32 resource instances DISABLED and 0 BLOCKED from further action due to failure + +Current cluster status: + * Node List: + * Online: [ cluster01 cluster02 ] + * GuestOnline: [ httpd-bundle-0 httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Unpromoted: [ cluster01 ] + +Utilization Information: +Only 'private' parameters to 1m-interval monitor for dummy on cluster02 changed: 0:0;16:2:0:4a9e64d6-e1dd-4395-917c-1596312eafe4 + * Original: cluster01 capacity: + * Original: cluster02 capacity: + * pcmk__assign_resource: ping:0 utilization on cluster02: + * pcmk__assign_resource: ping:1 utilization on cluster01: + * pcmk__assign_resource: Fencing utilization on cluster01: + * pcmk__assign_resource: dummy utilization on cluster02: + * pcmk__assign_resource: httpd-bundle-docker-0 utilization on cluster01: + * pcmk__assign_resource: httpd-bundle-docker-1 utilization on cluster02: + * pcmk__assign_resource: httpd-bundle-ip-192.168.122.131 utilization on cluster01: + * pcmk__assign_resource: httpd-bundle-0 utilization on cluster01: + * pcmk__assign_resource: httpd:0 utilization on httpd-bundle-0: + * pcmk__assign_resource: httpd-bundle-ip-192.168.122.132 utilization on cluster02: + * pcmk__assign_resource: httpd-bundle-1 utilization on cluster02: + * pcmk__assign_resource: httpd:1 utilization on httpd-bundle-1: + * pcmk__assign_resource: httpd-bundle-2 utilization on cluster01: + * pcmk__assign_resource: httpd:2 utilization on httpd-bundle-2: + * pcmk__assign_resource: Public-IP utilization on cluster02: + * pcmk__assign_resource: Email utilization on cluster02: + * pcmk__assign_resource: mysql-proxy:0 utilization on cluster02: + * pcmk__assign_resource: mysql-proxy:1 utilization on cluster01: + * pcmk__assign_resource: promotable-rsc:0 utilization on cluster02: + * pcmk__assign_resource: promotable-rsc:1 utilization on cluster01: + * Remaining: cluster01 capacity: + * Remaining: cluster02 capacity: + +Transition Summary: + * Start httpd-bundle-2 ( cluster01 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + * Start httpd:2 ( httpd-bundle-2 ) due to unrunnable httpd-bundle-docker-2 start (blocked) +=#=#=#= End test: Show utilization with crm_simulate - OK (0) =#=#=#= +* Passed: crm_simulate - Show utilization with crm_simulate +=#=#=#= Begin test: Simulate injecting a failure =#=#=#= +4 of 32 resource instances DISABLED and 0 BLOCKED from further action due to failure + +Current cluster status: + * Node List: + * Online: [ cluster01 cluster02 ] + * GuestOnline: [ httpd-bundle-0 httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Unpromoted: [ cluster01 ] + +Performing Requested Modifications: + * Injecting ping_monitor_10000@cluster02=1 into the configuration + * Injecting attribute fail-count-ping#monitor_10000=1 into /node_state '2' + * Injecting attribute last-failure-ping#monitor_10000= into /node_state '2' + +Transition Summary: + * Recover ping:0 ( cluster02 ) + * Start httpd-bundle-2 ( cluster01 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + * Start httpd:2 ( httpd-bundle-2 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + +Executing Cluster Transition: + * Cluster action: clear_failcount for ping on cluster02 + * Pseudo action: ping-clone_stop_0 + * Pseudo action: httpd-bundle_start_0 + * Resource action: ping stop on cluster02 + * Pseudo action: ping-clone_stopped_0 + * Pseudo action: ping-clone_start_0 + * Pseudo action: httpd-bundle-clone_start_0 + * Resource action: ping start on cluster02 + * Resource action: ping monitor=10000 on cluster02 + * Pseudo action: ping-clone_running_0 + * Pseudo action: httpd-bundle-clone_running_0 + * Pseudo action: httpd-bundle_running_0 + +Revised Cluster Status: + * Node List: + * Online: [ cluster01 cluster02 ] + * GuestOnline: [ httpd-bundle-0 httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Unpromoted: [ cluster01 ] +=#=#=#= End test: Simulate injecting a failure - OK (0) =#=#=#= +* Passed: crm_simulate - Simulate injecting a failure +=#=#=#= Begin test: Simulate bringing a node down =#=#=#= +4 of 32 resource instances DISABLED and 0 BLOCKED from further action due to failure + +Current cluster status: + * Node List: + * Online: [ cluster01 cluster02 ] + * GuestOnline: [ httpd-bundle-0 httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Unpromoted: [ cluster01 ] + +Performing Requested Modifications: + * Taking node cluster01 offline + +Transition Summary: + * Fence (off) httpd-bundle-0 (resource: httpd-bundle-docker-0) 'guest is unclean' + * Start Fencing ( cluster02 ) + * Start httpd-bundle-0 ( cluster02 ) due to unrunnable httpd-bundle-docker-0 start (blocked) + * Stop httpd:0 ( httpd-bundle-0 ) due to unrunnable httpd-bundle-docker-0 start + * Start httpd-bundle-2 ( cluster02 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + * Start httpd:2 ( httpd-bundle-2 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + +Executing Cluster Transition: + * Resource action: Fencing start on cluster02 + * Pseudo action: stonith-httpd-bundle-0-off on httpd-bundle-0 + * Pseudo action: httpd-bundle_stop_0 + * Pseudo action: httpd-bundle_start_0 + * Resource action: Fencing monitor=60000 on cluster02 + * Pseudo action: httpd-bundle-clone_stop_0 + * Pseudo action: httpd_stop_0 + * Pseudo action: httpd-bundle-clone_stopped_0 + * Pseudo action: httpd-bundle-clone_start_0 + * Pseudo action: httpd-bundle_stopped_0 + * Pseudo action: httpd-bundle-clone_running_0 + * Pseudo action: httpd-bundle_running_0 + +Revised Cluster Status: + * Node List: + * Online: [ cluster02 ] + * OFFLINE: [ cluster01 ] + * GuestOnline: [ httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster02 ] + * Stopped: [ cluster01 ] + * Fencing (stonith:fence_xvm): Started cluster02 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): FAILED + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster02 ] + * Stopped: [ cluster01 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Stopped: [ cluster01 ] +=#=#=#= End test: Simulate bringing a node down - OK (0) =#=#=#= +* Passed: crm_simulate - Simulate bringing a node down +=#=#=#= Begin test: Simulate a node failing =#=#=#= +4 of 32 resource instances DISABLED and 0 BLOCKED from further action due to failure + +Current cluster status: + * Node List: + * Online: [ cluster01 cluster02 ] + * GuestOnline: [ httpd-bundle-0 httpd-bundle-1 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Started cluster02 + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): Started cluster02 + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster02 + * Email (lsb:exim): Started cluster02 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Promoted: [ cluster02 ] + * Unpromoted: [ cluster01 ] + +Performing Requested Modifications: + * Failing node cluster02 + +Transition Summary: + * Fence (off) httpd-bundle-1 (resource: httpd-bundle-docker-1) 'guest is unclean' + * Fence (reboot) cluster02 'peer is no longer part of the cluster' + * Stop ping:0 ( cluster02 ) due to node availability + * Stop dummy ( cluster02 ) due to node availability + * Stop httpd-bundle-ip-192.168.122.132 ( cluster02 ) due to node availability + * Stop httpd-bundle-docker-1 ( cluster02 ) due to node availability + * Stop httpd-bundle-1 ( cluster02 ) due to unrunnable httpd-bundle-docker-1 start + * Stop httpd:1 ( httpd-bundle-1 ) due to unrunnable httpd-bundle-docker-1 start + * Start httpd-bundle-2 ( cluster01 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + * Start httpd:2 ( httpd-bundle-2 ) due to unrunnable httpd-bundle-docker-2 start (blocked) + * Move Public-IP ( cluster02 -> cluster01 ) + * Move Email ( cluster02 -> cluster01 ) + * Stop mysql-proxy:0 ( cluster02 ) due to node availability + * Stop promotable-rsc:0 ( Promoted cluster02 ) due to node availability + +Executing Cluster Transition: + * Pseudo action: httpd-bundle-1_stop_0 + * Pseudo action: promotable-clone_demote_0 + * Pseudo action: httpd-bundle_stop_0 + * Pseudo action: httpd-bundle_start_0 + * Fencing cluster02 (reboot) + * Pseudo action: ping-clone_stop_0 + * Pseudo action: dummy_stop_0 + * Pseudo action: httpd-bundle-docker-1_stop_0 + * Pseudo action: exim-group_stop_0 + * Pseudo action: Email_stop_0 + * Pseudo action: mysql-clone-group_stop_0 + * Pseudo action: promotable-rsc_demote_0 + * Pseudo action: promotable-clone_demoted_0 + * Pseudo action: promotable-clone_stop_0 + * Pseudo action: stonith-httpd-bundle-1-off on httpd-bundle-1 + * Pseudo action: ping_stop_0 + * Pseudo action: ping-clone_stopped_0 + * Pseudo action: httpd-bundle-clone_stop_0 + * Pseudo action: httpd-bundle-ip-192.168.122.132_stop_0 + * Pseudo action: Public-IP_stop_0 + * Pseudo action: mysql-group:0_stop_0 + * Pseudo action: mysql-proxy_stop_0 + * Pseudo action: promotable-rsc_stop_0 + * Pseudo action: promotable-clone_stopped_0 + * Pseudo action: httpd_stop_0 + * Pseudo action: httpd-bundle-clone_stopped_0 + * Pseudo action: httpd-bundle-clone_start_0 + * Pseudo action: exim-group_stopped_0 + * Pseudo action: exim-group_start_0 + * Resource action: Public-IP start on cluster01 + * Resource action: Email start on cluster01 + * Pseudo action: mysql-group:0_stopped_0 + * Pseudo action: mysql-clone-group_stopped_0 + * Pseudo action: httpd-bundle_stopped_0 + * Pseudo action: httpd-bundle-clone_running_0 + * Pseudo action: exim-group_running_0 + * Pseudo action: httpd-bundle_running_0 + +Revised Cluster Status: + * Node List: + * Online: [ cluster01 ] + * OFFLINE: [ cluster02 ] + * GuestOnline: [ httpd-bundle-0 ] + + * Full List of Resources: + * Clone Set: ping-clone [ping]: + * Started: [ cluster01 ] + * Stopped: [ cluster02 ] + * Fencing (stonith:fence_xvm): Started cluster01 + * dummy (ocf:pacemaker:Dummy): Stopped + * Clone Set: inactive-clone [inactive-dhcpd] (disabled): + * Stopped (disabled): [ cluster01 cluster02 ] + * Resource Group: inactive-group (disabled): + * inactive-dummy-1 (ocf:pacemaker:Dummy): Stopped (disabled) + * inactive-dummy-2 (ocf:pacemaker:Dummy): Stopped (disabled) + * Container bundle set: httpd-bundle [pcmk:http]: + * httpd-bundle-0 (192.168.122.131) (ocf:heartbeat:apache): Started cluster01 + * httpd-bundle-1 (192.168.122.132) (ocf:heartbeat:apache): FAILED + * httpd-bundle-2 (192.168.122.133) (ocf:heartbeat:apache): Stopped + * Resource Group: exim-group: + * Public-IP (ocf:heartbeat:IPaddr): Started cluster01 + * Email (lsb:exim): Started cluster01 + * Clone Set: mysql-clone-group [mysql-group]: + * Started: [ cluster01 ] + * Stopped: [ cluster02 ] + * Clone Set: promotable-clone [promotable-rsc] (promotable): + * Unpromoted: [ cluster01 ] + * Stopped: [ cluster02 ] +=#=#=#= End test: Simulate a node failing - OK (0) =#=#=#= +* Passed: crm_simulate - Simulate a node failing +=#=#=#= Begin test: Run crm_simulate with invalid CIB (enum violation) =#=#=#= +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-1.2 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-1.3 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.0 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.1 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.2 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.3 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.4 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.5 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.6 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.7 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.8 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.9 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-2.10 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.0 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.1 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.2 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.3 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.4 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.5 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.6 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.7 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.8 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.9 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-3.10 does not validate +Invalid attribute first-action for element rsc_order +Element constraints has extra content: rsc_order +pcmk__update_schema debug: Schema pacemaker-4.0 does not validate +Cannot upgrade configuration (claiming pacemaker-1.2 schema) to at least pacemaker-4.0 because it does not validate with any schema from pacemaker-1.2 to the latest +=#=#=#= End test: Run crm_simulate with invalid CIB (enum violation) - Invalid configuration (78) =#=#=#= +* Passed: crm_simulate - Run crm_simulate with invalid CIB (enum violation) +=#=#=#= Begin test: Run crm_simulate with invalid CIB (unrecognized validate-with) =#=#=#= +=#=#=#= End test: Run crm_simulate with invalid CIB (unrecognized validate-with) - Invalid configuration (78) =#=#=#= +* Passed: crm_simulate - Run crm_simulate with invalid CIB (unrecognized validate-with) +=#=#=#= Begin test: Run crm_simulate with invalid, but possibly recoverable CIB (valid with X.Y+1) =#=#=#= +Element configuration has extra content: tags +pcmk__update_schema debug: Schema pacemaker-1.2 does not validate +pcmk__update_schema debug: Schema pacemaker-1.3 validates +pcmk__update_schema debug: Schema pacemaker-2.0 validates +pcmk__update_schema debug: Schema pacemaker-2.1 validates +pcmk__update_schema debug: Schema pacemaker-2.2 validates +pcmk__update_schema debug: Schema pacemaker-2.3 validates +pcmk__update_schema debug: Schema pacemaker-2.4 validates +pcmk__update_schema debug: Schema pacemaker-2.5 validates +pcmk__update_schema debug: Schema pacemaker-2.6 validates +pcmk__update_schema debug: Schema pacemaker-2.7 validates +pcmk__update_schema debug: Schema pacemaker-2.8 validates +pcmk__update_schema debug: Schema pacemaker-2.9 validates +pcmk__update_schema debug: Schema pacemaker-2.10 validates +pcmk__update_schema debug: Schema pacemaker-3.0 validates +pcmk__update_schema debug: Schema pacemaker-3.1 validates +pcmk__update_schema debug: Schema pacemaker-3.2 validates +pcmk__update_schema debug: Schema pacemaker-3.3 validates +pcmk__update_schema debug: Schema pacemaker-3.4 validates +pcmk__update_schema debug: Schema pacemaker-3.5 validates +pcmk__update_schema debug: Schema pacemaker-3.6 validates +pcmk__update_schema debug: Schema pacemaker-3.7 validates +pcmk__update_schema debug: Schema pacemaker-3.8 validates +pcmk__update_schema debug: Schema pacemaker-3.9 validates +pcmk__update_schema debug: Schema pacemaker-3.10 validates +pcmk__update_schema debug: Schema pacemaker-4.0 validates +pcmk__update_schema info: Transformed the configuration schema to pacemaker-4.0 +unpack_resources error: Resource start-up disabled since no STONITH resources have been defined +unpack_resources error: Either configure some or disable STONITH with the stonith-enabled option +unpack_resources error: NOTE: Clusters with shared data need STONITH to ensure data integrity +unpack_resources error: Resource start-up disabled since no STONITH resources have been defined +unpack_resources error: Either configure some or disable STONITH with the stonith-enabled option +unpack_resources error: NOTE: Clusters with shared data need STONITH to ensure data integrity +Current cluster status: + * Full List of Resources: + * dummy1 (ocf:pacemaker:Dummy): Stopped + * dummy2 (ocf:pacemaker:Dummy): Stopped + +Transition Summary: + +Executing Cluster Transition: + +Revised Cluster Status: + * Full List of Resources: + * dummy1 (ocf:pacemaker:Dummy): Stopped + * dummy2 (ocf:pacemaker:Dummy): Stopped +=#=#=#= End test: Run crm_simulate with invalid, but possibly recoverable CIB (valid with X.Y+1) - OK (0) =#=#=#= +* Passed: crm_simulate - Run crm_simulate with invalid, but possibly recoverable CIB (valid with X.Y+1) +=#=#=#= Begin test: Run crm_simulate with valid CIB, but without validate-with attribute =#=#=#= +=#=#=#= End test: Run crm_simulate with valid CIB, but without validate-with attribute - Invalid configuration (78) =#=#=#= +* Passed: crm_simulate - Run crm_simulate with valid CIB, but without validate-with attribute +=#=#=#= Begin test: Run crm_simulate with invalid CIB, also without validate-with attribute =#=#=#= +=#=#=#= End test: Run crm_simulate with invalid CIB, also without validate-with attribute - Invalid configuration (78) =#=#=#= +* Passed: crm_simulate - Run crm_simulate with invalid CIB, also without validate-with attribute diff --git a/cts/cts-cli.in b/cts/cts-cli.in index bf1e0807440..7c23b11da3c 100644 --- a/cts/cts-cli.in +++ b/cts/cts-cli.in @@ -9,7 +9,7 @@ # We know this is a very long file. # pylint: disable=too-many-lines -__copyright__ = "Copyright 2024 the Pacemaker project contributors" +__copyright__ = "Copyright 2024-2025 the Pacemaker project contributors" __license__ = "GNU General Public License version 2 or later (GPLv2+) WITHOUT ANY WARRANTY" import argparse @@ -45,7 +45,7 @@ from pacemaker.exitstatus import ExitStatus # Individual tool tests are split out, but can also be accessed as a group with "tools" tools_tests = ["cibadmin", "crm_attribute", "crm_standby", "crm_resource", - "crm_ticket", "crmadmin", "crm_shadow", "crm_verify"] + "crm_ticket", "crmadmin", "crm_shadow", "crm_verify", "crm_simulate"] # The default list of tests to run, in the order they should be run default_tests = ["access_render", "daemons", "dates", "error_codes"] + tools_tests + \ ["crm_mon", "acls", "validity", "upgrade", "rules", "feature_set"] @@ -246,6 +246,7 @@ def sanitize_output(s): (r'Created new pacemaker-.* configuration', r'Created new pacemaker configuration'), (r'Device not configured', r'No such device or address'), (r'^Entity: line [0-9]+: ', r''), + (r'(Injecting attribute last-failure-ping#monitor_10000=)[0-9]*', r'\1'), (r'Last change: .*', r'Last change:'), (r'Last updated: .*', r'Last updated:'), (r'^Migration will take effect until: .*', r'Migration will take effect until:'), @@ -282,6 +283,7 @@ def sanitize_output(s): (r'(@validate-with=pacemaker-)[0-9.]+,', r'\1X,'), (r' version="[^"]*"', r' version=""'), (r'\(version .*\)', r'(version)'), + (r'-x .*cli/(.*)\.xml', r'-x \1.xml'), (r'--xml-file .*cli/(.*)\.xml', r'--xml-file \1.xml'), ] @@ -2394,6 +2396,88 @@ class CrmVerifyRegressionTest(RegressionTest): return invalid_tests + valid_tests +class CrmSimulateRegressionTest(RegressionTest): + """A class for testing crm_simulate.""" + + @property + def name(self): + """Return the name of this regression test.""" + return "crm_simulate" + + @property + def tests(self): + """A list of Test instances to be run as part of this regression test.""" + + good_cib = """ + + + + + + + + + + + + + + +""" + + bad_cib = good_cib.replace("start", "break") + + bad_version_cib = good_cib.replace("pacemaker-1.2", "pacemaker-9999.0") + + recoverable_cib = good_cib.replace("", "") + + no_version_cib = good_cib.replace('validate-with="pacemaker-1.2" ', "") + + no_version_bad_cib = bad_version_cib.replace('epoch="3"', 'epoch="30"').replace("start", "break") + + basic_tests = [ + Test("Show allocation scores with crm_simulate", + "crm_simulate -x {cts_cli_data}/crm_mon.xml --show-scores --output-as=xml"), + Test("Show utilization with crm_simulate", + "crm_simulate -x {cts_cli_data}/crm_mon.xml --show-utilization"), + Test("Simulate injecting a failure", + "crm_simulate -x {cts_cli_data}/crm_mon.xml -S -i ping_monitor_10000@cluster02=1"), + Test("Simulate bringing a node down", + "crm_simulate -x {cts_cli_data}/crm_mon.xml -S --node-down=cluster01"), + Test("Simulate a node failing", + "crm_simulate -x {cts_cli_data}/crm_mon.xml -S --node-fail=cluster02"), + Test("Run crm_simulate with invalid CIB (enum violation)", + "crm_simulate -p -S", + stdin=bad_cib, + env={"PCMK_trace_functions": "apply_upgrade,pcmk__update_schema"}, + expected_rc=ExitStatus.CONFIG), + Test("Run crm_simulate with invalid CIB (unrecognized validate-with)", + "crm_simulate -p -S", + stdin=bad_version_cib, + env={"PCMK_trace_functions": "apply_upgrade,pcmk__update_schema"}, + expected_rc=ExitStatus.CONFIG), + Test("Run crm_simulate with invalid, but possibly recoverable CIB (valid with X.Y+1)", + "crm_simulate -p -S", + stdin=recoverable_cib, + env={"PCMK_trace_functions": "apply_upgrade,pcmk__update_schema"}), + Test("Run crm_simulate with valid CIB, but without validate-with attribute", + "crm_simulate -p -S", + stdin=no_version_cib, + env={"PCMK_trace_functions": "apply_upgrade,pcmk__update_schema"}, + expected_rc=ExitStatus.CONFIG), + Test("Run crm_simulate with invalid CIB, also without validate-with attribute", + "crm_simulate -p -S", + stdin=no_version_bad_cib, + env={"PCMK_trace_functions": "apply_upgrade,pcmk__update_schema"}, + expected_rc=ExitStatus.CONFIG), + ] + + return [ + ShadowTestGroup(basic_tests, create=False, + env={"CIB_shadow": None}), + ] + + class CrmMonRegressionTest(RegressionTest): """A class for testing crm_mon.""" @@ -3354,6 +3438,7 @@ regression_classes = [ CrmadminRegressionTest, CrmShadowRegressionTest, CrmVerifyRegressionTest, + CrmSimulateRegressionTest, CrmMonRegressionTest, AclsRegressionTest, ValidityRegressionTest,