Commit 5fe98f4
committed
Fix: libcib: Don't match element based on XPath matching an attribute
A concrete example is clearer. Suppose the CIB contains the following
constraint:
<rsc_location id="cli-prefer-dummy" rsc="dummy" role="Promoted"
node="laptop" score="INFINITY"/>
Then a cibadmin --query for the score attribute outputs the entire
rsc_location element:
$ cibadmin --query --xpath '//@score'
<rsc_location id="loc_cons" rsc="dummy" node="laptop" score="INFINITY"/>
Similarly but worse, a cibadmin --delete command for the score attribute
deletes the entire element.
$ cibadmin --delete --xpath '//@score'
$ cibadmin --query --xpath '//@score'
Call failed: No such device or address
Signed-off-by: Reid Wahl <[email protected]>1 parent 89a4476 commit 5fe98f4
1 file changed
+0
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | 715 | | |
730 | 716 | | |
731 | 717 | | |
| |||
0 commit comments