clusterlabs / crmsh Goto Github PK
View Code? Open in Web Editor NEWCommand-line interface for High-Availability cluster management on GNU/Linux systems.
License: GNU General Public License v2.0
Command-line interface for High-Availability cluster management on GNU/Linux systems.
License: GNU General Public License v2.0
from https://bugzilla.suse.com/show_bug.cgi?id=930237
We could take log coloring a bit further.
The idea is to have regular expressions and color whatever matches. For instance, it would be useful to color red everything starting with "ERROR" and "CRIT" (nowadays aka "error" and "crit").
It should be configurable, i.e. let the user add regex-color mapping to a file.
It is important to reset back to the initial color at the end of the match, so we need to keep track of the current color on the line.
It'd be good to allow more than eight colors we currently have.
I think I've seen once some utility which does this for syslog based logs.
And we could also this way make RA messages stand out.
I've thought about this for the log viewer in the web interface, which currently doesn't do any kind of highlighting at all. At the very least, it should highlight which node the log comes from, but I also think highlighting error lines would be great.
Hello,
Sorry if this is not appropriate place to ask, I'm new to CRMSH.
I'm using CentOS 7 and this http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-7/network:ha-clustering:Stable.repo repository. I used yum to install software:
yum install pacemaker corosync crmsh
Everything looks to be installed correctly and now I'm following http://crmsh.github.io/start-guide/ tutorial for initial configuration. Unfortunately I'm getting this:
[root@node-1 corosync]# crm cluster init -R node-1,node-2,node-3,node-4
INFO: Initialize a new cluster
INFO: Nodes: -R, node-1, node-2, node-3, node-4
ERROR: [-R]: Start: Exited with error code 255, Error output: Bad remote forwarding specification '-o'
ERROR: [node-4]: Clean: Exited with error code 127, Error output: bash: /tmp/crm-tmp-5706396592ada0f12ba6/crm_clean.py: No such file or directory
ERROR: [node-2]: Clean: Exited with error code 127, Error output: bash: /tmp/crm-tmp-5706396592ada0f12ba6/crm_clean.py: No such file or directory
ERROR: [node-3]: Clean: Exited with error code 127, Error output: bash: /tmp/crm-tmp-5706396592ada0f12ba6/crm_clean.py: No such file or directory
ERROR: [-R]: Clean: Exited with error code 255, Error output: Bad remote forwarding specification '-o'
ERROR: cluster.init: Failed to connect to one or more of these hosts via SSH: -R, node-2, node-3, node-4
Each of my nodes has one crm_clean.py file located under /usr/share/crmsh/utils/. It looks for crm_script.debug file that I don't have.
I would appreciate any assistance or if someone will point me to the correct place to post my problem in case here is wrong.
Thanks a lot!
Garbage characters are displayed in the crmsh prompt when the help text of meta-data is printed by a tab completion.
# crm configure
crm(live)configure# property stonith-action=[HIT TAB]
stonith-action (enum, [reboot]): Action to send to STONITH device
Action to send to STONITH device Allowed values: reboot, poweroff, off
^G^A^Bcrm(live)configure# ^A^Bproperty stonith-action=
crm(live)configure# Ctrl-C, leaving
# echo $TERM
xterm
#
Revision: 2.0 (061be79)
It is apparently introduced with colorized prompt (534d7ba, 37add18, 4de2a67)
but I'm not sure how to fix it because it's not clear to me what RLIGNORE* characters are intended for.
Thanks,
hello, after reboot of secundary node of the ha cluster the crm show an error and configure show dump a traceback.
[root@pvarnish01 ~]# crm status
Last updated: Thu Sep 18 13:51:39 2014
Last change: Thu Sep 18 13:05:25 2014 via crmd on pvarnish01
Stack: classic openais (with plugin)
Current DC: pvarnish01 - partition with quorum
Version: 1.1.10-14.el6_5.3-368c726
3 Nodes configured, 2 expected votes
3 Resources configured
Online: [ pvarnish01 pvarnish02 ]
OFFLINE: [ varnish ]
Resource Group: varnish-cluster
cache-vip (ocf::heartbeat:IPaddr2): Started pvarnish01
varnish (lsb:varnish): Started pvarnish01
varnishncsa (lsb:varnishncsa): Stopped
Failed actions:
varnish_monitor_5000 on pvarnish01 'not running' (7): call=1184, status=complete, last-rc-change='Mon Sep 1 13:28:23 2014', queued=0ms, exec=0ms
[root@pvarnish01 ~]# crm configure show
Traceback (most recent call last):
File "/usr/sbin/crm", line 56, in
rc = main.run()
File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 383, in run
return do_work(context, user_args)
File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 222, in do_work
if context.run(' '.join(l)):
File "/usr/lib64/python2.6/site-packages/crmsh/ui_context.py", line 87, in run
rv = self.execute_command() is not False
File "/usr/lib64/python2.6/site-packages/crmsh/ui_context.py", line 244, in execute_command
rv = self.command_info.function(*arglist)
File "/usr/lib64/python2.6/site-packages/crmsh/ui_configure.py", line 302, in do_show
return set_obj.show()
File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line 417, in show
s = self.repr()
File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line 567, in repr
for obj in processing_sort_cli(list(self.obj_set)))
File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line 567, in
for obj in processing_sort_cli(list(self.obj_set)))
File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line 993, in repr_cli
head_s = self._repr_cli_head(format)
File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line 1307, in _repr_cli_head
s = '%s %s' % (s, clidisplay.id(uname))
File "/usr/lib64/python2.6/site-packages/crmsh/clidisplay.py", line 103, in id
return _colorize(s, config.color.identifier)
File "/usr/lib64/python2.6/site-packages/crmsh/clidisplay.py", line 45, in _colorize
return ''.join(('${%s}' % clr.upper()) for clr in colors) + s + '${NORMAL}'
TypeError: cannot concatenate 'str' and 'NoneType' objects
Installed Packages
Name : pacemaker
Arch : x86_64
Version : 1.1.10
Release : 14.el6_5.3
Size : 1.3 M
Repo : installed
From repo : updates
Summary : Scalable High-Availability cluster resource manager
URL : http://www.clusterlabs.org
License : GPLv2+ and LGPLv2+
Name : corosync
Arch : x86_64
Version : 1.4.1
Release : 17.el6_5.1
Size : 433 k
Repo : installed
From repo : updates
Summary : The Corosync Cluster Engine and Application Programming Interfaces
URL : http://ftp.corosync.org
License : BSD
Name : crmsh
Arch : x86_64
Version : 2.1
Release : 1.5
Size : 2.2 M
Repo : installed
From repo : haclustering
Summary : High Availability cluster command-line interface
URL : http://crmsh.github.io
License : GPL-2.0+
The order of elements in the CIB is significant, so don't do any reordering unless instructed to.
crmsh should also allow edits to the CIB that are reorderings of elements only.
Hi All,
I fail when I carry out stash in the environment that put Pacemaker1.1.14 and crmsh2.1.5 together.
(and pssh 2.3.1(pssh-2.3.1-5.el7.noarch.rpm))
Step 1) Start a cluster in 2 nodes.
[root@rh72-01 ~]# crm_mon -1 -Af
Last updated: Tue Mar 22 10:10:51 2016 Last change: Tue Mar 22 10:10:45 2016 by root via cibadmin on rh72-01
Stack: corosync
Current DC: rh72-02 (version 1.1.14-70404b0) - partition with quorum
2 nodes and 2 resources configured
Online: [ rh72-01 rh72-02 ]
prmStonith1-2 (stonith:external/ssh): Started rh72-01
prmStonith2-2 (stonith:external/ssh): Started rh72-02
Node Attributes:
* Node rh72-01:
* Node rh72-02:
Migration Summary:
* Node rh72-02:
* Node rh72-01:
Step 2) Carry out stash, but an option of pssh fails by injustice
[root@rh72-01 ~]# crm resource secret prmStonith1-2 stash hostlist
INFO: syncing /var/lib/heartbeat/lrm/secrets/prmStonith1-2/hostlist to rh72-02 ...
Usage: pssh [OPTIONS] command [...]
pssh: error: no such option: -q
However, the practice of stash succeeds when I compose a cluster of a single node.
In crmsh2.2.x, it seems to be switched from pssh to the use of parallax.
In crmsh2.1.5, can the user not carry out stash in plural nodes?
Is the practice of stash possible by some kind of setting?
Best Regards,
Hideo Yamauchi.
crm(live)# cluster init
ERROR: cluster.init: PSSH library is not installed or is not up to date.
crmsh-2.1.0, compiled on debian jessie (8.1)
I try to build crmsh on rhel7 but I get following error:
./configure
....
checking for glue_config.h... no
configure: error: in `/root/crmsh':
configure: error: Core development headers were not found
It seems like that "libcluster-glue-dev " package is missing. I couldn't find this package in the rhel7 distribution.
Any idea where I can find the package? Or maybe the package has been renamed?
Instead of requiring a restart to update parameter values, this procedure should be usable:
With crmsh version 1.x I used the '--wait' option to wait until resources are balanced. This sequence of commands did a balance reliably and waited exactly until the balance was done:
%> crm --wait -F configure rsc_defaults resource-stickiness=0; crm -F configure rsc_defaults resource-stickiness=1000
With version 2.x I found that this is highly unreliable. Sometimes it waits, sometimes it doesn't. Looks like a race condition. Is this a bug in crmsh?
Here is what this problem is:
Online: [ juju-machine-1-lxc-20 juju-machine-2-lxc-20 juju-machine-8-lxc-20 ]
Clone Set: cl_ping [ping]
Started: [ juju-machine-1-lxc-20 juju-machine-2-lxc-20 juju-machine-8-lxc-20 ]
res_nova_consoleauth (ocf::openstack:nova-consoleauth): Started juju-machine-8-lxc-20
Resource Group: grp_nova_vips
res_nova_eth0_vip (ocf::heartbeat:IPaddr2): Started juju-machine-8-lxc-20
Clone Set: cl_nova_haproxy [res_nova_haproxy]
Started: [ juju-machine-1-lxc-20 juju-machine-2-lxc-20 juju-machine-8-lxc-20 ]`
crm configure primitive compute0-B3 ocf:pacemaker:remote op monitor interval=20
Segmentation fault (core dumped) ERROR: crm_mon exited with code 139 and said:
Segmentation fault (core dumped)`
My setup:
Probably 'pager' should be automatically set to 'less -r' if color mode is chosen and PAGER shell var is not set.
The verify command should try to detect and warn about dependency loops.
Hi,
Apologies if you're not the maintainer. Haven't done too much research, I admit :)
Anyway, the CentOS7 packages are out of date:
# yum update python
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* extras: mirror.denit.net
* updates: mirror.denit.net
Resolving Dependencies
--> Running transaction check
---> Package python.x86_64 0:2.7.5-18.el7_1.1 will be updated
---> Package python.x86_64 0:2.7.5-34.el7 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-34.el7 for package: python-2.7.5-34.el7.x86_64
--> Running transaction check
---> Package python-libs.x86_64 0:2.7.5-18.el7_1.1 will be updated
---> Package python-libs.x86_64 0:2.7.5-34.el7 will be an update
--> Processing Dependency: /bin/python for package: python-parallax-1.0.1-10.1.noarch
--> Finished Dependency Resolution
Error: Package: python-parallax-1.0.1-10.1.noarch (@/python-parallax-1.0.1-10.1.noarch)
Requires: /bin/python
Removing: python-2.7.5-18.el7_1.1.x86_64 (@updates)
Not found
Updated By: python-2.7.5-34.el7.x86_64 (base)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@backend2 ~]# rpm -q python
python-2.7.5-18.el7_1.1.x86_64
I suspect it's relatively easy to fix though. Could you also make the srpm available?
Thanks!
http://lists.linux-ha.org/pipermail/linux-ha/2014-November/048357.html
It seems like with introduction of 'resource-discovery'
'symmetric-cluster=true' becomes not so strict in sense of resource
agents sets across nodes.
May be it is possible to add a config options to disable error messages
like:
got no meta-data, does this RA exist?
no such resource agent
(Description copied from mailing list email by Vladislav Bogdanov)
when performing a delete operation, crmsh (2.2.0) having -F tries
to stop passed op arguments and then waits for DC to become idle.
That is not needed if only constraints are passed to delete.
Could that be changed? Or, could it wait only if there is something to stop?
Something like this:
diff --git a/modules/ui_configure.py b/modules/ui_configure.py
index cf98702..96ab77e 100644
--- a/modules/ui_configure.py
+++ b/modules/ui_configure.py
@@ -552,6 +552,9 @@ class CibConfig(command.UI):
if not ok or not cib_factory.commit():
raise ValueError("Failed to stop one or more running resources: %s"
%
(', '.join(to_stop)))
+ return True
+ else:
+ return False
@command.skill_level('administrator')
@command.completers_repeating(_id_list)
@@ -562,8 +565,8 @@ class CibConfig(command.UI):
arg_force = any((x in ('-f', '--force')) for x in argl)
argl = [x for x in argl if (x not in ('-f', '--force'))]
if arg_force or config.core.force:
- self._stop_if_running(argl)
- utils.wait4dc(what="Stopping %s" % (", ".join(argl)))
+ if (self._stop_if_running(argl)):
+ utils.wait4dc(what="Stopping %s" % (", ".join(argl)))
return cib_factory.delete(*argl)
@command.name('default-timeouts')
More, it may be worth checking stop-orphan-resources property and pass stop
work to pacemaker if it is set to true.
I try to build crmsh at FreeBSD.
./configure failes
What can i do to make it work?
[email protected]:/home/admin/crmsh# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
Our Host OS: /
configure: Sanitizing prefix: NONE
configure: Sanitizing exec_prefix: NONE
configure: Sanitizing libdir: ${exec_prefix}/lib
checking which lib directory to use... /usr/lib
configure: WARNING: sysconfdir directory (/usr/etc) does not exist!
configure: WARNING: sharedstatedir directory (/usr/com) does not exist!
configure: WARNING: localstatedir directory (/usr/var) does not exist!
configure: WARNING: docdir directory (/usr/share/doc/crmsh) does not exist!
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking dependency style of cc... none
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking crm_config.h usability... no
checking crm_config.h presence... no
checking for crm_config.h... no
checking glue_config.h usability... no
checking glue_config.h presence... no
checking for glue_config.h... no
configure: error: in `/home/admin/crmsh':
configure: error: Core development headers were not found
See `config.log' for more details
my config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by crmsh configure 2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = sg.wcl.instatfootball.tv
uname -m = amd64
uname -r = 10.0-RELEASE-p7
uname -s = FreeBSD
uname -v = FreeBSD 10.0-RELEASE-p7 #2: Sat Aug 23 19:42:04 SGT 2014 [email protected]:/usr/obj/usr/src/sys/CORV1
/usr/bin/uname -p = amd64
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/games
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /root/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2131: checking for a BSD-compatible install
configure:2199: result: /usr/bin/install -c
configure:2210: checking whether build environment is sane
configure:2265: result: yes
configure:2416: checking for a thread-safe mkdir -p
configure:2455: result: ./install-sh -c -d
configure:2462: checking for gawk
configure:2492: result: no
configure:2462: checking for mawk
configure:2492: result: no
configure:2462: checking for nawk
configure:2478: found /usr/bin/nawk
configure:2489: result: nawk
configure:2500: checking whether make sets $(MAKE)
configure:2522: result: yes
configure:2551: checking whether make supports nested variables
configure:2568: result: yes
configure:2714: checking whether make supports nested variables
configure:2731: result: yes
configure:2763: Sanitizing prefix: NONE
configure:2769: Sanitizing exec_prefix: NONE
configure:2776: Sanitizing libdir: ${exec_prefix}/lib
configure:2780: checking which lib directory to use
configure:2792: result: /usr/lib
configure:2828: WARNING: sysconfdir directory (/usr/etc) does not exist!
configure:2828: WARNING: sharedstatedir directory (/usr/com) does not exist!
configure:2828: WARNING: localstatedir directory (/usr/var) does not exist!
configure:2828: WARNING: docdir directory (/usr/share/doc/crmsh) does not exist!
configure:2845: checking for style of include used by make
configure:2873: result: GNU
configure:2944: checking for gcc
configure:2974: result: no
configure:3037: checking for cc
configure:3058: found /usr/bin/cc
configure:3081: result: cc
configure:3200: checking for C compiler version
configure:3209: cc --version >&5
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix
configure:3220: $? = 0
configure:3209: cc -v >&5
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix
configure:3220: $? = 0
configure:3209: cc -V >&5
cc: error: argument to '-V' is missing (expected 1 value)
cc: error: no input files
configure:3220: $? = 1
configure:3209: cc -qversion >&5
cc: error: no input files
configure:3220: $? = 1
configure:3240: checking whether the C compiler works
configure:3262: cc -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3266: $? = 0
configure:3314: result: yes
configure:3317: checking for C compiler default output file name
configure:3319: result: a.out
configure:3325: checking for suffix of executables
configure:3332: cc -o conftest -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3336: $? = 0
configure:3358: result:
configure:3380: checking whether we are cross compiling
configure:3388: cc -o conftest -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3392: $? = 0
configure:3399: ./conftest
configure:3403: $? = 0
configure:3418: result: no
configure:3423: checking for suffix of object files
configure:3445: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3449: $? = 0
configure:3470: result: o
configure:3474: checking whether we are using the GNU C compiler
configure:3493: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3493: $? = 0
configure:3502: result: yes
configure:3511: checking whether cc accepts -g
configure:3531: cc -c -g conftest.c >&5
configure:3531: $? = 0
configure:3572: result: yes
configure:3589: checking for cc option to accept ISO C89
configure:3652: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:3652: $? = 0
configure:3665: result: none needed
configure:3690: checking whether cc understands -c and -o together
configure:3712: cc -c conftest.c -o conftest2.o
configure:3715: $? = 0
configure:3712: cc -c conftest.c -o conftest2.o
configure:3715: $? = 0
configure:3727: result: yes
configure:3746: checking dependency style of cc
configure:3857: result: none
configure:3878: checking how to run the C preprocessor
configure:3909: cc -E conftest.c
configure:3909: $? = 0
configure:3923: cc -E conftest.c
conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^
1 error generated.
configure:3923: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3948: result: cc -E
configure:3968: cc -E conftest.c
configure:3968: $? = 0
configure:3982: cc -E conftest.c
conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^
1 error generated.
configure:3982: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4011: checking for grep that handles long lines and -e
configure:4069: result: /usr/bin/grep
configure:4074: checking for egrep
configure:4136: result: /usr/bin/grep -E
configure:4141: checking for ANSI C header files
configure:4161: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4161: $? = 0
configure:4234: cc -o conftest -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4234: $? = 0
configure:4234: ./conftest
configure:4234: $? = 0
configure:4245: result: yes
configure:4258: checking for sys/types.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for sys/stat.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for stdlib.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for string.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for memory.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for strings.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for inttypes.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for stdint.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4258: checking for unistd.h
configure:4258: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
configure:4258: $? = 0
configure:4258: result: yes
configure:4272: checking crm_config.h usability
configure:4272: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
conftest.c:55:10: fatal error: 'crm_config.h' file not found
#include <crm_config.h>
^
1 error generated.
configure:4272: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <crm_config.h>
configure:4272: result: no
configure:4272: checking crm_config.h presence
configure:4272: cc -E conftest.c
conftest.c:22:10: fatal error: 'crm_config.h' file not found
#include <crm_config.h>
^
1 error generated.
configure:4272: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <crm_config.h>
configure:4272: result: no
configure:4272: checking for crm_config.h
configure:4272: result: no
configure:4284: checking glue_config.h usability
configure:4284: cc -c -I/usr/include/heartbeat -I/usr/include/pacemaker conftest.c >&5
conftest.c:55:10: fatal error: 'glue_config.h' file not found
#include <glue_config.h>
^
1 error generated.
configure:4284: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <glue_config.h>
configure:4284: result: no
configure:4284: checking glue_config.h presence
configure:4284: cc -E conftest.c
conftest.c:22:10: fatal error: 'glue_config.h' file not found
#include <glue_config.h>
^
1 error generated.
configure:4284: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "crmsh"
| #define PACKAGE_TARNAME "crmsh"
| #define PACKAGE_VERSION "2.0"
| #define PACKAGE_STRING "crmsh 2.0"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "crmsh"
| #define VERSION "2.0"
| #define PACEMAKER_VERSION "2.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <glue_config.h>
configure:4284: result: no
configure:4284: checking for glue_config.h
configure:4284: result: no
configure:4302: error: in `/home/admin/crmsh':
configure:4305: error: Core development headers were not found
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_LDFLAGS_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_PYTHON_set=''
ac_cv_env_PYTHON_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_header_crm_config_h=no
ac_cv_header_glue_config_h=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_objext=o
ac_cv_path_EGREP='/usr/bin/grep -E'
ac_cv_path_GREP=/usr/bin/grep
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=nawk
ac_cv_prog_CC=cc
ac_cv_prog_CPP='cc -E'
ac_cv_prog_cc_c89=''
ac_cv_prog_cc_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=none
am_cv_make_support_nested_variables=yes
am_cv_prog_cc_c_o=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/admin/crmsh/missing aclocal-1.14'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
ASCIIDOC=''
AUTOCONF='${SHELL} /home/admin/crmsh/missing autoconf'
AUTOHEADER='${SHELL} /home/admin/crmsh/missing autoheader'
AUTOMAKE='${SHELL} /home/admin/crmsh/missing automake-1.14'
AWK='nawk'
BUILD_ASCIIDOC_FALSE=''
BUILD_ASCIIDOC_TRUE=''
BUILD_VERSION=''
CC='cc'
CCDEPMODE='depmode=none'
CFLAGS=' -I/usr/include/heartbeat -I/usr/include/pacemaker'
CPP='cc -E'
CPPFLAGS=''
CRM_CACHE_DIR=''
CRM_CONFIG_DIR=''
CRM_DAEMON_DIR=''
CRM_DAEMON_GROUP=''
CRM_DAEMON_USER=''
CRM_DTD_DIRECTORY=''
CRM_STATE_DIR=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/usr/bin/grep -E'
EXEEXT=''
GIT=''
GREP='/usr/bin/grep'
HA_VARLIBHBDIR=''
HG=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/admin/crmsh/missing makeinfo'
MD5=''
MKDIR_P='./install-sh -c -d'
OBJEXT='o'
OCF_ROOT_DIR=''
PACKAGE='crmsh'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='crmsh'
PACKAGE_SERIES='2.0'
PACKAGE_STRING='crmsh 2.0'
PACKAGE_TARNAME='crmsh'
PACKAGE_URL=''
PACKAGE_VERSION='2.0'
PATH_SEPARATOR=':'
PE_STATE_DIR=''
PKGCONFIG=''
PYTHON=''
PYTHON_EXEC_PREFIX=''
PYTHON_PLATFORM=''
PYTHON_PREFIX=''
PYTHON_VERSION=''
SCP=''
SET_MAKE=''
SHELL='/bin/sh'
SSH=''
STRIP=''
TAR=''
TEST=''
VERSION='2.0'
ac_ct_CC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE='#'
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='/usr/bin'
build_alias=''
datadir='/usr/share'
datarootdir='${prefix}/share'
docdir='/usr/share/doc/crmsh'
dvidir='${docdir}'
exec_prefix='/usr'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='/usr/share/info'
install_sh='${SHELL} /home/admin/crmsh/install-sh'
libdir='/usr/lib'
libexecdir='/usr/libexec'
localedir='${datarootdir}/locale'
localstatedir='/usr/var'
mandir='/usr/share/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgpyexecdir=''
pkgpythondir=''
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
pyexecdir=''
pythondir=''
sbindir='/usr/sbin'
sharedstatedir='/usr/com'
sysconfdir='/usr/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "crmsh"
#define PACKAGE_TARNAME "crmsh"
#define PACKAGE_VERSION "2.0"
#define PACKAGE_STRING "crmsh 2.0"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "crmsh"
#define VERSION "2.0"
#define PACEMAKER_VERSION "2.0"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
configure: exit 1
Should we include a chef recipe / puppet module using crmsh to configure a cluster?
On gentoo, I have this issue on crm command :
File "/usr/sbin/crm", line 34
except ImportError, msg:
Syntax Error : invalid syntax
Version: 2.0-3
crm resource migrate
Traceback (most recent call last):
File "/usr/sbin/crm", line 56, in <module>
rc = main.run()
File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 432, in run
return do_work(context, user_args)
File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 271, in do_work
if context.run(' '.join(l)):
File "/usr/lib64/python2.6/site-packages/crmsh/ui_context.py", line 87, in run
rv = self.execute_command() is not False
File "/usr/lib64/python2.6/site-packages/crmsh/ui_context.py", line 244, in execute_command
rv = self.command_info.function(*arglist)
File "/usr/lib64/python2.6/site-packages/crmsh/ui_resource.py", line 270, in do_migrate
rsc = argl[0]
IndexError: list index out of range
From https://bugzilla.suse.com/show_bug.cgi?id=927475
Transition usage:
transition [<number>|<index>|<file>] [nograph] [v...] [scores] [actions] [utilization]
transition showdot [<number>|<index>|<file>]
transition log [<number>|<index>|<file>]
transition save [<number>|<index>|<file> [name]]
Without a subcommand the local pengine is used to calculate and show the graph.
Subcommand showdot displays the .dot file delivered with the report.
graph usage (which shows the configuration of the PE):
graph <pe> [<gtype> [<file> [<img_format>]]]
Perhaps sth like:
transition graph [<number>|<index>|<file>] [<gtype> [<file> [<img_format>]]]
Or to extend showdot (graph is already used hence may cause confusion):
transition showdot [<number>|<index>|<file>] [<file> [<img_format>]]
In the latter case we'd need to default to the local pengine to provide the graph if there's no dot file in the report.
The current version of crmsh doesn't interact well with CIB schemas that are configured to validate with the schema for pacemaker-1.0, for example. It would be useful if crmsh had some means of detecting and upgrading such schemas so that they can be validated with the latest schema.
Support for CentOS 7 soon ?
crmsh should detect and warn about constraints applying to members of a group. Exactly how such constraints would be applied seems poorly defined and may change between versions.
b007bc3 added support for resource-discovery
in location
constraints, but it did not update the man page, so it's not obvious to users how to harness this new feature.
[root@MYSQL01 crmsh-master]# uname -a
Linux MYSQL01 2.6.32-262.el6.x86_64 #1 SMP Sun Apr 8 18:38:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@MYSQL01 crmsh-master]# crm
Fatal error:
No module named crmsh
No module named modules
Failed to start the crm shell! This is likely due to
a broken installation or a missing dependency.
If you are using a packaged version of the crm shell,
please try reinstalling the package. Also check your
PYTHONPATH and make sure that the crmsh module is
reachable.
Please file an issue describing your installation at
https://github.com/crmsh/crmsh/issues/ .
From @beekhof:
FYI, I am making the following changes to constraint sets
diff --git a/xml/constraints-2.1.rng b/xml/constraints-2.1.rng
index 85fcf48..6f40d9b 100644
--- a/xml/constraints-2.1.rng
+++ b/xml/constraints-2.1.rng
@@ -62,6 +62,14 @@
<attribute name="require-all"><data type="boolean"/></attribute>
</optional>
<optional>
+ <attribute name="ordering">
+ <choice>
+ <value>group</value>
+ <value>listed</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
<attribute name="action">
<ref name="attribute-actions"/>
</attribute>
The current behaviour 'group' will remain the default.
'group' will remain consistent with the ordering and colocation logic used by groups.
'listed' will be what most people expect when they create a colocated set.
- 'group'
crm colocate A B C => B with A, C with B
crm order A B C => A then B, B then C
- 'listed'
crm colocate A B C => A with B, B with C
crm order A B C => A then B, B then C
It is suggested that CLI's begin explicitly setting one of these values and, because
so many people seem to get it wrong, work out a way to use 'listed' by default.
Not sure which order or structure is applied in the Command Reference section of the manpage.
IMHO, it is a bit hard to find the needed information. :) As such, I would like to suggest the following changes:
cd
, up
, etc. into its own section. cib
could be named: cib -- CIB Shadow Management
. For consistency reasons, it would makes sense to use the same text as you've used in crm help
.Trying to configure stonith:external/vmware as follows:
primitive vfencing stonith:external/vcenter
params VI_SERVER="vcenter1.example.com"
VI_CREDSTORE="/etc/vicredentials.xml"
HOSTLIST="cdn1=cdn1.example.com;cdn2=cdn2.example.com;cdn3=cdn3.example.com;cdn4=cdn4.example.com"
RESETPOWERON="0"
pcmk_host_check="static-list"
pcmk_host_list="cdn1;cdn2;cdn3;cdn4"
op monitor interval="60"
Upon commit:
stonith:external/vcenter: got no meta-data, does this RA exist?
Checked here:
[root@cdn1 ~]# stonith -L
...
external/vmware
...
stonith -m -t external/vmware <--- output looks like valid xml describing the resource.
and here:
[root@cdn1 ~]# ls -l /usr/lib64/stonith/plugins/external/
...
-rwxr-xr-x 1 root root 5109 Feb 23 12:37 vmware
...
At this time, crm.conf is stock as far as I know:
[path]
sharedir = /usr/share/crmsh
cache = /var/cache/crm
crm_config = /var/lib/pacemaker/cib
crm_daemon_dir = /usr/libexec/pacemaker
crm_daemon_user = hacluster
ocf_root = /usr/lib/ocf
crm_dtd_dir = /usr/share/pacemaker
pe_state_dir = /var/lib/pacemaker/pengine
heartbeat_dir = /var/lib/heartbeat
hb_delnode = /usr/share/heartbeat/hb_delnode
nagios_plugins = /usr/lib64/nagios/plugins
All other items are commented out.
Also:
[root@cdn1 ~]# crm --version
2.1-1.6 (Build unknown)
[root@cdn1 ~]# pacemakerd --version
Pacemaker 1.1.11
Compiled and installed:
cluster-glue-1.0.9-1.el6.x86_64
Hi and congrats for 2.2.0!
I'm playing with it on a lab cluster running on CentOS 7.2
For some reasons, the completion for "verify" under "configure" doesn't work for me.
v-TAB-TAB correctly gives me "validate-all validate_all verify", but ve-TAB-TAB gives me nothing.
Very very minor annoyance,
crmsh does not respect EDITOR and/or PAGER, for example when doing
# crm configure edit
This always opens vi/vim instead of the chosen EDITOR environment
variable. (Unless vi/vim is not installed, then it might fall back to
either emacs or nano.)
This is due to a simple one-character bug in the code, the current
code actually intends to parse those variables.
This is a regression as compared to the crm command that is part of
previous Pacemaker versions.
I've also filed this bug with Debian, which you can find here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749370
I've uploaded a patch (git format-patch) against current git master here:
https://gist.github.com/chris-se/dedf35cc6d92405f4416#file-0001-respect-editor-and-pager-environment-variables-patch
With crmsh v. 2.2.0-1,
# crm configure
crm(live)configure# property no-quorum-policy=ignore
crm(live)configure# commit force
Traceback (most recent call last):
File "/usr/sbin/crm", line 54, in <module>
rc = main.run()
File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 351, in run
return main_input_loop(context, user_args)
File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 255, in main_input_loop
if not context.run(inp):
File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 75, in run
rv = self.execute_command() is not False
File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 245, in execute_command
rv = self.command_info.function(*arglist)
File "/usr/lib/python2.7/dist-packages/crmsh/ui_configure.py", line 648, in do_commit
return self._commit(force=force, replace=replace)
File "/usr/lib/python2.7/dist-packages/crmsh/ui_configure.py", line 614, in _commit
syntax_err(('configure.commit', force))
File "/usr/lib/python2.7/dist-packages/crmsh/msg.py", line 216, in syntax_err
err += " parsing '%s'" % (' '.join(s))
TypeError: sequence item 1: expected string, bool found
While just "commit" works
The cib versioning uses epoch configuration and num_updates for status changes.
In an heavy used big system with lot of attribute changes and updates apply of configuration often fail with cib error "update was older than existing configuration".
Reason is the fact, that every status update increments num_updates and it is a high chance that source num_updates has changed when offending the xml diff to cibadmin.
A possible fix for this scenario is to remove num_updates from the offending cib diff.
As we rely on epoch for configuration updates, it does not brake the cib version check.
With Pacemaker 1.1.12 this is verified to work.
If num_updates is not present, neither for source nor target, cibadmin applies the xml diff for every current num_updates and set the new one to 0.
Example:
cib counters when cib_origin was taken epoch="562" num_updates="237"
cib has changed in the meanwhile due to status updates epoch="562" num_updates="275"
XML diff which crmsh wants to apply:
< version >
< source admin_epoch="0" epoch="562" num_updates="237"/>
< target admin_epoch="0" epoch="563" num_updates="237"/>
< /version>
This fails due to num_updates.
Possible changed XML diff to apply:
< version>
< source admin_epoch="0" epoch="562"/>
< target admin_epoch="0" epoch="563"/>
< /version>
This diff gets applied and cib start with epoch="563" and num_updates="0".
during some automation work we figured out that crm seems to writer info messages into the error out. I would expect to find info message in the standard out. Is that as designed, configurable or a bug?
We use version 2.0-3.
Example of info message written into the error,
crm resource restart elasticsearchEverywhere
INFO: ordering elasticsearchEverywhere to stop\nINFO: ordering elasticsearchEverywhere to start\nINFO: ordering elasticsearchTribeEverywhere to stop\nINFO: ordering elasticsearchTribeEverywhere to start\n
q_attr
of ResourceSet class looks like to set action
or role
.
https://github.com/crmsh/crmsh/blob/master/modules/parse.py#L981
But ResourceSet never be call with type=order
, so q_attr
is always role
.
Therefore, action resources are processed as role resources.
https://github.com/crmsh/crmsh/blob/master/modules/parse.py#L1035-L1038
root@d52-54-02-77-77-02:~ # crm configure
crm(live)configure# fencing_topology attr:OpenStack-role=compute stonith-libvirt,fence-nova
crm(live)configure# There are changes pending. Do you want to commit them (y/n)? y
Traceback (most recent call last):
File "/usr/sbin/crm", line 54, in <module>
rc = main.run()
File "/usr/lib/python2.7/site-packages/crmsh/main.py", line 351, in run
return main_input_loop(context, user_args)
File "/usr/lib/python2.7/site-packages/crmsh/main.py", line 253, in main_input_loop
context.quit(rc)
File "/usr/lib/python2.7/site-packages/crmsh/ui_context.py", line 319, in quit
ok = self.current_level().end_game()
File "/usr/lib/python2.7/site-packages/crmsh/ui_configure.py", line 859, in end_game
ok = self._commit()
File "/usr/lib/python2.7/site-packages/crmsh/ui_configure.py", line 584, in _commit
self._verify(mkset_obj("xml", "changed"), mkset_obj("xml"))
File "/usr/lib/python2.7/site-packages/crmsh/ui_configure.py", line 430, in _verify
rc2 = set_obj_semantic.semantic_check(set_obj_all)
File "/usr/lib/python2.7/site-packages/crmsh/cibconfig.py", line 494, in semantic_check
rc |= obj.check_sanity()
File "/usr/lib/python2.7/site-packages/crmsh/cibconfig.py", line 2017, in check_sanity
if target.lower() not in [id.lower() for id in cib_factory.node_id_list()]:
AttributeError: 'NoneType' object has no attribute 'lower'
When using the classes
command inside ra
, as in
crm(live)ra# classes
we have this error:
print "%s / " % (c, ' '.join(providers))
TypeError: not all arguments converted during string formatting
I think another %s
is missing there, like
print "%s / %s" % (c, ' '.join(providers))
The crmsh syntax no longer allows only foo instead of foo="" as nvpair value assignments.
I don't want to allow just foo as this limits the possible extensions of the language too much, but enabling the use of a trailing = to signify empty values should be allowed. That is, foo= rather than foo.
From a discussion upstream:
ClusterLabs/pacemaker@94d528b#commitcomment-10012335
We should probably rewrite the ACL code to always generate xpaths as @beekhof suggests.
Given the colocation:
colocation c-nfs inf: nfs-server fs1
But fs1
is running on sle12-c
, while virtual-ip
which belongs to the same group with nfs-server
is running on sle12-a
It's not a good idea to use the primitives for colocation instead of groups, especially if they are not the first children in their groups.
I'd use this instead:
colocation c-nfs inf: nfs-srv nfs-disk
/usr/share/crmsh/scripts/health/collect.py
has a function sys_info()
sys_info() has the following statement which returns the host portion of a FQDN.
hostname = platform.node().split('.')[0]
This results in the error message:
ERROR: Hostname mismatch: control1.gate.rtf is not control1
If sys_info() simply uses the statement:
hostname = platform.node()
"crm cluster health"
doesn't produce the bogus error message.
Hi,
I'm executing the following command `crm cluster init nodes=alfa,charlie ´ and I get the error Failed to install cluster-glue.
When I try to install cluster glue I have dependency errors.
I have tried several solutions even a force install but I get the same error with crm.
Any help?
crm cluster init nodes=alfa,charlie
INFO: Initialize a new cluster
INFO: Nodes: alfa, charlie
OK: Configure SSH
OK: Check state of nodes
OK: Verify parameters
ERROR: [charlie]: Exited with error code 1, Error output: Failed to install cluster-glue: / Traceback (most recent call last):
File "./crm_pkg.py", line 281, in <module>
main()
...
File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings
ERROR: [alfa]: Error (1): Failed to install cluster-glue: / Traceback (most recent call last):
...
TypeError: execv() arg 2 must contain only strings
And here the yum result:
yum install cluster-glue
Error: Package: cluster-glue-1.0.12-1.15.1.x86_64 (network_ha-clustering_Stable)
Requires: libnetsnmp.so.30()(64bit)
Error: Package: sbd-1.1-4.8.x86_64 (network_ha-clustering_Stable)
Requires: libcrmcluster.so.2()(64bit)
Error: Package: sbd-1.1-4.8.x86_64 (network_ha-clustering_Stable)
Requires: libcib.so.2()(64bit)
crm node list
doesn't list remote nodes, because that code path does not invoke the listnodes()
function; instead it simply calls cib_elem.xpath("//configuration/nodes")[0]
itself and then iterates over the result of that.
Seems to be due to the node / resource id clash:
Hi All,
I put Pacemaker1.1.14 and crmsh2.1.5 together on RHEL7.2 and confirmed a history function.
I start a node and constitute a cluster.
[root@rh72-01 ~]# crm_mon -1 -Af
Last updated: Tue Apr 5 10:06:05 2016 Last change: Tue Apr 5 10:06:01 2016 by root via cibadmin on rh72-01
Stack: corosync
Current DC: rh72-01 (version 1.1.14-70404b0) - partition WITHOUT quorum
1 node and 1 resource configured
Online: [ rh72-01 ]
prmDummy (ocf::heartbeat:Dummy): Started rh72-01
Node Attributes:
* Node rh72-01:
Migration Summary:
* Node rh72-01:
I cause trouble in a resource.
[root@rh72-01 ~]# rm -rf /var/run/resource-agents/Dummy-prmDummy.state
[root@rh72-01 ~]# crm_mon -1 -Af
Last updated: Tue Apr 5 10:06:38 2016 Last change: Tue Apr 5 10:06:01 2016 by root via cibadmin on rh72-01
Stack: corosync
Current DC: rh72-01 (version 1.1.14-70404b0) - partition WITHOUT quorum
1 node and 1 resource configured
Online: [ rh72-01 ]
prmDummy (ocf::heartbeat:Dummy): Started rh72-01
Node Attributes:
* Node rh72-01:
Migration Summary:
* Node rh72-01:
prmDummy: migration-threshold=1000000 fail-count=1 last-failure='Tue Apr 5 10:06:33 2016'
Failed Actions:
* prmDummy_monitor_10000 on rh72-01 'not running' (7): call=7, status=complete, exitreason='No process state file found',
last-rc-change='Tue Apr 5 10:06:33 2016', queued=0ms, exec=0ms
I was going to use the history function of crmsh, but it does not seem to move well.
[root@rh72-01 rhel7]# crm --version
2.1.5 (Build unknown)
[root@rh72-01 rhel7]# crm history
crm(live)history# latest
INFO: fetching new logs, please wait ...
[1] 10:07:16 [FAILURE] rh72-01 Exited with error code 120
ERROR: no transitions found in the source
crm(live)history# info
Source: live
Created on: Tue Apr 5 09:54:32 JST 2016
By: report -Z -Q -f Tue Apr 5 08:54:30 2016 /var/cache/crm/history/live
Period: 2016-04-05 09:07:16 - 2016-04-05 09:54:30
Nodes: rh72-01
Groups:
Resources: prmDummy
Transitions:
crm(live)history# peinputs v
Date Start End Filename Client User Origin
==== ===== === ======== ====== ==== ======
crm(live)history# resource prmDummy
ERROR: Dummy(prmDummy)[17229]:: unknown string format
When I use the history function, is there any insufficient setting?
Can the history function use Pacemaker1.1.14 and crmsh2.1.5 at the time of a combination?
I put Pacemaker1.1.12 and crmsh2.1.4 together, and I confirmed the same operation, but it seemed to move well.
[root@rh67-01 ~]# crm --version
2.1.4 (Build unknown)
[root@rh67-01 ~]# crm history
crm(live)history# latest
WARNING: pssh not installed, slow live updates ahead
INFO: retrieving information from cluster nodes, please wait ...
WARNING: end of transition rh67-01:pe-input-3 not found in logs (transition not complete yet?)
Transition rh67-01:pe-input-4 (11:34:46 - 11:34:46):
total 2 actions: 2 Complete
Apr 5 11:34:46 rh67-01 Dummy(prmDummy)[13184]: ERROR: No process state file found
Apr 5 11:34:46 rh67-01 crmd[13126]: notice: te_rsc_command: Initiating action 2: stop prmDummy_stop_0 on rh67-01 (local)
Apr 5 11:34:46 rh67-01 crmd[13126]: notice: te_rsc_command: Initiating action 4: start prmDummy_start_0 on rh67-01 (local)
crm(live)history# info
Source: live
Created on: Tue Apr 5 11:34:55 JST 2016
By: report -Z -Q -f Tue Apr 5 10:34:51 2016 /var/cache/crm/history/live
Period: 2016-04-05 10:34:51 - 2016-04-05 11:34:52
Nodes: rh67-01
Groups:
Resources: prmDummy
Transitions: 0 1 2 3 4
crm(live)history# peinputs v
Date Start End Filename Client User Origin
==== ===== === ======== ====== ==== ======
2016-04-05 11:34:26 11:34:26 pe-input-0 no-client no-user no-origin
2016-04-05 11:34:26 11:34:26 pe-input-1 no-client no-user no-origin
2016-04-05 11:34:46 11:34:46 pe-input-2 no-client no-user no-origin
2016-04-05 11:34:46 11:34:46 pe-input-3 no-client no-user no-origin
2016-04-05 11:34:46 11:34:46 pe-input-4 no-client no-user no-origin
crm(live)history# resource prmDummy
Apr 5 11:34:26 rh67-01 crmd[13126]: notice: te_rsc_command: Initiating action 5: start prmDummy_start_0 on rh67-01 (local)
Apr 5 11:34:46 rh67-01 Dummy(prmDummy)[13184]: ERROR: No process state file found
Apr 5 11:34:46 rh67-01 crmd[13126]: notice: te_rsc_command: Initiating action 2: stop prmDummy_stop_0 on rh67-01 (local)
Apr 5 11:34:46 rh67-01 crmd[13126]: notice: te_rsc_command: Initiating action 4: start prmDummy_start_0 on rh67-01 (local)
Best Regards,
Hideo Yamauchi.
For remote nodes, it is common to have a remote resource named the same as the remote node. In that case, the node uname is the same as the resource id.
However, a common assumption in crmsh is that the node uname can be used as a unique id for the node, which in this case then breaks down.
This is non-trivial to fix since it is a hidden assumption across most of cibconfig.py :/
When attempting to disable stonith, there is an error. Team members have said although the error occurs the property is still set appropriately; though for me it did not stick:
root@mmasx:~# crm configure property stonith-enabled=false
Traceback (most recent call last):
File "/usr/sbin/crm", line 56, in <module>
rc = main.run()
File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 382, in run
return do_work(context, user_args)
File "/usr/lib/python2.7/dist-packages/crmsh/main.py", line 221, in do_work
if context.run(' '.join(l)):
File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 83, in run
self.enter_level(self.command_info.level)
File "/usr/lib/python2.7/dist-packages/crmsh/ui_context.py", line 236, in enter_level
if 'requires' in dir(entry) and not entry.requires():
File "/usr/lib/python2.7/dist-packages/crmsh/ui_configure.py", line 250, in requires
if not cib_factory.initialize():
File "/usr/lib/python2.7/dist-packages/crmsh/cibconfig.py", line 2539, in initialize
if not self._import_cib(cib):
File "/usr/lib/python2.7/dist-packages/crmsh/cibconfig.py", line 2270, in _import_cib
schema.init_schema(self.cib_elem)
File "/usr/lib/python2.7/dist-packages/crmsh/schema.py", line 90, in init_schema
_crm_schema = _load_schema(cib)
File "/usr/lib/python2.7/dist-packages/crmsh/schema.py", line 85, in _load_schema
return CrmSchema(cib, config.path.crm_dtd_dir)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 90, in CrmSchema
return RngSchema(cib_elem, local_dir)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 222, in __init__
Schema.__init__(self, cib_elem, local_dir, is_local=is_local, get_schema_fn=get_schema_fn)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 104, in __init__
self.refresh(cib_elem)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 121, in refresh
return self.update_schema()
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 227, in update_schema
self.update_rng_docs(self.validate_name, self.schema_filename)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 231, in update_rng_docs
self.rng_docs[file] = self.find_start_rng_node(validate_name, file)
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 242, in find_start_rng_node
os.path.join(self.local_dir, file))
File "/usr/lib/python2.7/dist-packages/crmsh/pacemaker.py", line 54, in read_schema_local
raise PacemakerError("Cannot read the schema file: " + str(msg))
crmsh.pacemaker.PacemakerError: Cannot read the schema file: [Errno 2] No such file or directory: 'pacemaker-2.0.rng'
@krig
Though this issue seems like it may be a pacemaker issue instead...I'll keep digging, but this was the summary of the issue we're experiencing; everything else is working great :)
hello
running crmsh 2.1 or 2.2-rc1 on debian with pacemaker 1.1.12 I get all the time errors like this:
crm configure property maintenance-mode=true
ERROR: crmd:metadata: got no meta-data, does this RA exist?
ERROR: cib-bootstrap-options: attribute symmetric-cluster does not exist
ERROR: cib-bootstrap-options: attribute stonith-action does not exist
ERROR: cib-bootstrap-options: attribute maintenance-mode does not exist
Although the config changes are valid and are accepted by the cluster... possibly a problem parsing output from cibadmin?
enabling debug does not give me any hints on what crmsh is missing...
Hi!
I've installed successfully crmsh 1.2.6 and 2.0.0 in CentOS 5.10, which ships python2.4 (and 2.6 in EPEL repo). I know it's old, but I'm stuck with it.
With both python versions, syntax errors are thrown when executing crm. It would be helpful to require a minimum python version during the installation to help diagnosing errors earlier.
Thank you very much. Regards,
Miquel Ruiz
We confirmed a function of crmsh by the next combination.
We prepared the following cli file.
property no-quorum-policy="ignore" \
stonith-enabled="true" \
startup-fencing="false"
rsc_defaults resource-stickiness="INFINITY" \
migration-threshold="1"
group grpPostgreSQLDB \
prmExPostgreSQLDB \
prmApPostgreSQLDB
group grpStonith1 \
prmStonith1-2
group grpStonith2 \
prmStonith2-2
fencing_topology \
rh66-01: prmStonith1-2 \
rh66-02: prmStonith2-2
primitive prmExPostgreSQLDB ocf:heartbeat:Dummy \
op start interval="0s" timeout="90s" on-fail="restart" \
op monitor interval="10s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="60s" on-fail="fence"
primitive prmApPostgreSQLDB ocf:heartbeat:Dummy \
op start interval="0s" timeout="300s" on-fail="restart" \
op monitor interval="10s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="300s" on-fail="fence"
primitive prmStonith1-2 stonith:external/ssh \
params \
hostlist="rh66-01" \
op start interval="0s" timeout="60s" on-fail="restart" \
op monitor interval="3600s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="60s" on-fail="ignore"
primitive prmStonith2-2 stonith:external/ssh \
params \
hostlist="rh66-02" \
op start interval="0s" timeout="60s" on-fail="restart" \
op monitor interval="3600s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="60s" on-fail="ignore"
location rsc_location-grpPostgreSQLDB-1 grpPostgreSQLDB \
rule 200: #uname eq rh66-01 \
rule 100: #uname eq rh66-02
location rsc_location-grpStonith1-2 grpStonith1 \
rule -INFINITY: #uname eq rh66-01
location rsc_location-grpStonith2-3 grpStonith2 \
rule -INFINITY: #uname eq rh66-02
We set "sort-elements no" and read cli file in crm.
[root [at] rh66-0 ~]# crm options sort-elements no
[root [at] rh66-0 ~]# cat .config/crm/crm.conf�
[core]
sort_elements = no
We thought that a resource was sent to pacemaker in order of cli file.
[root [at] rh66-0 ~]# crm configure load update trac2980.crm�
However, the order of resources seems to be changed by crm.
(We thought that grpPostgreSQLDB was displayed by the top.)
[root [at] rh66-0 ~]# crm_mon -1 -Af
Last updated: Thu Jan 22 02:02:15 2015
Last change: Thu Jan 22 02:01:59 2015
Stack: corosync
Current DC: rh66-01 (3232256178) - partition with quorum
Version: 1.1.12-561c4cf
2 Nodes configured
4 Resources configured
Online: [ rh66-01 rh66-02 ]
� Resource Group: grpStonith2
� � � prmStonith2-2 � � �(stonith:external/ssh): Started rh66-01�
�Resource Group: grpStonith1
� � � prmStonith1-2 � � �(stonith:external/ssh): Started rh66-02�
� Resource Group: grpPostgreSQLDB
� � �prmExPostgreSQLDB �(ocf::heartbeat:Dummy): Started rh66-01�
� � �prmApPostgreSQLDB �(ocf::heartbeat:Dummy): Started rh66-01�
We sent similar cli file in environment of pacemaker1.0, but the order of resources was not changed by crm.
(The grpPostgreSQLDB is displayed by the top.)
[root [at] rh64-heartbeat ~]# crm_mon -1 -Af
============
Last updated: Wed Jan 21 15:12:08 2015
Stack: Heartbeat
Current DC: rh64-heartbeat2 (eac5dbcb-78ae-4450-8d44-b8175e5638dd) - partition with quorum
Version: 1.0.13-9227e89
2 Nodes configured, unknown expected votes
6 Resources configured.
============
Online: [ rh64-heartbeat1 rh64-heartbeat2 ]
�Resource Group: grpPostgreSQLDB
� � �prmExPostgreSQLDB �(ocf::heartbeat:Dummy): Started rh64-heartbeat1
� � �prmFsPostgreSQLDB1 (ocf::heartbeat:Dummy): Started rh64-heartbeat1
� � �prmIpPostgreSQLDB �(ocf::heartbeat:Dummy): Started rh64-heartbeat1
� � �prmApPostgreSQLDB �(ocf::heartbeat:Dummy): Started rh64-heartbeat1
�Resource Group: grpStonith1
� � �prmStonith1-1 � � �(stonith:external/ssh): Started rh64-heartbeat2
� � �prmStonith1-2 � � �(stonith:external/ssh): Started rh64-heartbeat2
�Resource Group: grpStonith2
� � �prmStonith2-1 � � �(stonith:external/ssh): Started rh64-heartbeat1
� � �prmStonith2-2 � � �(stonith:external/ssh): Started rh64-heartbeat1
By new crmsh, does "options sort-elements no" not work?
Is there the option which does not change order elsewhere?
Best Regards,
Hideo Yamauchi.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.