Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test: tools: Always run additional cib queries as root

  • Loading branch information...
commit 6527e116c0fedaa76fca2504e2d1008787522c05 1 parent f3ee4e7
@beekhof authored
Showing with 296 additions and 1 deletion.
  1. +295 −0 tools/regression.acls.exp
  2. +1 −1  tools/regression.sh
View
295 tools/regression.acls.exp
@@ -84,34 +84,242 @@ A new shadow instance was created. To begin using it paste the following into y
* Passed: crm_attribute - Set cluster option
=#=#=#= Begin test: unknownguy: Query configuration =#=#=#=
Call failed: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: unknownguy: Query configuration - Permission denied (13) =#=#=#=
* Passed: cibadmin - unknownguy: Query configuration
=#=#=#= Begin test: unknownguy: Set enable-acl =#=#=#=
Error performing operation: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: unknownguy: Set enable-acl - Permission denied (13) =#=#=#=
* Passed: crm_attribute - unknownguy: Set enable-acl
=#=#=#= Begin test: unknownguy: Set stonith-enabled =#=#=#=
Error performing operation: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: unknownguy: Set stonith-enabled - Permission denied (13) =#=#=#=
* Passed: crm_attribute - unknownguy: Set stonith-enabled
=#=#=#= Begin test: unknownguy: Create a resource =#=#=#=
Call failed: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: unknownguy: Create a resource - Permission denied (13) =#=#=#=
* Passed: cibadmin - unknownguy: Create a resource
=#=#=#= Begin test: l33t-haxor: Query configuration =#=#=#=
Call failed: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Query configuration - Permission denied (13) =#=#=#=
* Passed: cibadmin - l33t-haxor: Query configuration
=#=#=#= Begin test: l33t-haxor: Set enable-acl =#=#=#=
Error performing operation: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Set enable-acl - Permission denied (13) =#=#=#=
* Passed: crm_attribute - l33t-haxor: Set enable-acl
=#=#=#= Begin test: l33t-haxor: Set stonith-enabled =#=#=#=
Error performing operation: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Set stonith-enabled - Permission denied (13) =#=#=#=
* Passed: crm_attribute - l33t-haxor: Set stonith-enabled
=#=#=#= Begin test: l33t-haxor: Create a resource =#=#=#=
Call failed: Permission denied
+<cib epoch="3" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Create a resource - Permission denied (13) =#=#=#=
* Passed: cibadmin - l33t-haxor: Create a resource
=#=#=#= Begin test: niceguy: Query configuration =#=#=#=
@@ -387,6 +595,35 @@ Call failed: Permission denied
error: crm_abort: crm_element_value: Triggered assert at xml.c:5511 : data != NULL
Your current configuration could only be upgraded to <null>... the minimum requirement is pacemaker-1.0.
Error performing operation: Required key not available
+<cib epoch="6" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources>
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy"/>
+ </resources>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Create a resource meta attribute - Required key not available (126) =#=#=#=
* Passed: crm_resource - l33t-haxor: Create a resource meta attribute
=#=#=#= Begin test: l33t-haxor: Query a resource meta attribute =#=#=#=
@@ -396,6 +633,35 @@ Error performing operation: Required key not available
error: crm_abort: crm_element_value: Triggered assert at xml.c:5511 : data != NULL
Your current configuration could only be upgraded to <null>... the minimum requirement is pacemaker-1.0.
Error performing operation: Required key not available
+<cib epoch="6" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources>
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy"/>
+ </resources>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Query a resource meta attribute - Required key not available (126) =#=#=#=
* Passed: crm_resource - l33t-haxor: Query a resource meta attribute
=#=#=#= Begin test: l33t-haxor: Remove a resource meta attribute =#=#=#=
@@ -405,6 +671,35 @@ Error performing operation: Required key not available
error: crm_abort: crm_element_value: Triggered assert at xml.c:5511 : data != NULL
Your current configuration could only be upgraded to <null>... the minimum requirement is pacemaker-1.0.
Error performing operation: Required key not available
+<cib epoch="6" num_updates="0" admin_epoch="0" validate-with="pacemaker-1.2">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-enable-acl" name="enable-acl" value="true"/>
+ <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/>
+ <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes/>
+ <resources>
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy"/>
+ </resources>
+ <constraints/>
+ <acls>
+ <acl_user id="l33t-haxor">
+ <deny id="crook-nothing" xpath="/cib"/>
+ </acl_user>
+ <acl_user id="niceguy">
+ <role_ref id="observer"/>
+ </acl_user>
+ <acl_role id="observer">
+ <write id="observer-write-1" xpath="//nvpair[@name=&apos;stonith-enabled&apos;]"/>
+ <write id="observer-write-2" xpath="//nvpair[@name=&apos;target-role&apos;]"/>
+ </acl_role>
+ </acls>
+ </configuration>
+ <status/>
+</cib>
=#=#=#= End test: l33t-haxor: Remove a resource meta attribute - Required key not available (126) =#=#=#=
* Passed: crm_resource - l33t-haxor: Remove a resource meta attribute
=#=#=#= Begin test: niceguy: Create a resource meta attribute =#=#=#=
View
2  tools/regression.sh
@@ -19,7 +19,7 @@ function test_assert() {
rc=$?
if [ x$cib != x0 ]; then
- cibadmin -Q
+ CIB_user=root cibadmin -Q
fi
printf "=#=#=#= End test: $desc - `crm_error $rc` ($rc) =#=#=#=\n"

0 comments on commit 6527e11

Please sign in to comment.
Something went wrong with that request. Please try again.