Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2015-01-23 15:47:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2015-01-09 20:50:58.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2015-01-23 15:47:33.000000000 +0100 @@ -1,0 +2,17 @@ +Thu Jan 15 16:54:07 UTC 2015 - [email protected] + +- Medium: history: match error/crit messages of pcmk 1.1.12 +- medium: cibconfig: Break infinite edit loop if --force is set +- high: crm_pssh: Use correct Task API in do_pssh (bnc#913261) + +------------------------------------------------------------------- +Wed Jan 14 01:25:29 UTC 2015 - [email protected] + +- medium: utils: crm_daemon_dir is added to PATH in envsetup (#67) +- medium: config: Add 2.3 to list of supported schemas +- low: msg: Add note on modifying supported schemas +- low: config: Convert NoOptionError to ValueError +- high: utils: Locate binaries across sudo boundary (bnc#912483) +- Require /usr/bin/which, not which (bnc#912944) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.nlCh2F/_old 2015-01-23 15:47:35.000000000 +0100 +++ /var/tmp/diff_new_pack.nlCh2F/_new 2015-01-23 15:47:35.000000000 +0100 @@ -42,11 +42,11 @@ Source0: crmsh.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(pre): pacemaker +Requires: /usr/bin/which Requires: python >= 2.6 Requires: python-dateutil Requires: python-lxml Requires: python-parallax -Requires: which BuildRequires: python-lxml BuildRequires: python-setuptools @@ -168,16 +168,14 @@ %post test if [ ! -e /tmp/.crmsh_regression_tests_ran ]; then touch /tmp/.crmsh_regression_tests_ran - if ! %{_datadir}/%{name}/tests/regression.sh ; then - echo "Regression tests failed." - cat crmtestout/regression.out - exit 1 - fi + %{_datadir}/%{name}/tests/regression.sh + result1=$? cd %{_datadir}/%{name}/tests - if ! ./cib-tests.sh ; then - echo "CIB tests failed." - exit 1 - fi + ./cib-tests.sh + result2=$? + [ $result1 -ne 0 ] && (echo "Regression tests failed."; cat ${buildroot}/crmtestout/regression.out) + [ $result2 -ne 0 ] && echo "CIB tests failed." + [ $result1 -ne 0 -o $result2 -ne 0 ] && exit 1 fi %endif ++++++ crmsh.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/Makefile.am new/crmsh/Makefile.am --- old/crmsh/Makefile.am 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/Makefile.am 2015-01-15 17:51:37.000000000 +0100 @@ -78,7 +78,8 @@ test/testcases/confbasic-xml.exp test/testcases/confbasic.exp test/testcases/delete.exp test/testcases/file.exp \ test/testcases/node.exp test/testcases/ra.exp test/testcases/resource.exp test/testcases/shadow.exp test/testcases/acl.exp test/testcases/options.exp \ test/testcases/edit.exp test/testcases/rset.exp test/testcases/rset-xml.exp test/testcases/history.exp test/testcases/history.excl \ - test/testcases/newfeatures test/testcases/newfeatures.exp test/testcases/acl.excl test/testcases/commit test/testcases/commit.exp + test/testcases/newfeatures test/testcases/newfeatures.exp test/testcases/acl.excl test/testcases/commit test/testcases/commit.exp \ + test/testcases/bugs test/testcases/bugs.exp test/testcases/confbasic-xml.filter: ln test/testcases/xmlonly.sh $@ @@ -124,8 +125,9 @@ --verbose) install-exec-local: + -mkdir -p $(DESTDIR)$(pkgpythondir) $(PYTHON) $(srcdir)/setup.py install \ - --root=${DESTDIR} --prefix=${prefix} \ + --prefix=$(DESTDIR)$(prefix) \ --record $(DESTDIR)$(pkgpythondir)/install_files.txt \ --verbose $(INSTALL) -d -m 770 $(DESTDIR)/$(CRM_CACHE_DIR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/crmsh.spec new/crmsh/crmsh.spec --- old/crmsh/crmsh.spec 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/crmsh.spec 2015-01-15 17:51:37.000000000 +0100 @@ -46,7 +46,7 @@ Requires: python-dateutil Requires: python-lxml Requires: python-parallax -Requires: which +Requires: /usr/bin/which BuildRequires: python-lxml BuildRequires: python-setuptools @@ -168,16 +168,14 @@ %post test if [ ! -e /tmp/.crmsh_regression_tests_ran ]; then touch /tmp/.crmsh_regression_tests_ran - if ! %{_datadir}/%{name}/tests/regression.sh ; then - echo "Regression tests failed." - cat crmtestout/regression.out - exit 1 - fi + %{_datadir}/%{name}/tests/regression.sh + result1=$? cd %{_datadir}/%{name}/tests - if ! ./cib-tests.sh ; then - echo "CIB tests failed." - exit 1 - fi + ./cib-tests.sh + result2=$? + [ $result1 -ne 0 ] && (echo "Regression tests failed."; cat ${buildroot}/crmtestout/regression.out) + [ $result2 -ne 0 ] && echo "CIB tests failed." + [ $result1 -ne 0 -o $result2 -ne 0 ] && exit 1 fi %endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cibconfig.py new/crmsh/modules/cibconfig.py --- old/crmsh/modules/cibconfig.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/cibconfig.py 2015-01-15 17:51:37.000000000 +0100 @@ -306,7 +306,10 @@ s = open(tmp).read() if hash(s) != filehash: ok = self.save(self._post_edit(s)) - if not ok and ask("Edit or discard changes (yes to edit, no to discard)?"): + if not ok and config.core.force: + common_err("Save failed and --force is set, " + + "aborting edit to avoid infinite loop") + elif not ok and ask("Edit or discard changes (yes to edit, no to discard)?"): continue rc = True os.unlink(tmp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cmd_status.py new/crmsh/modules/cmd_status.py --- old/crmsh/modules/cmd_status.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/cmd_status.py 2015-01-15 17:51:37.000000000 +0100 @@ -29,13 +29,14 @@ """ global _crm_mon if _crm_mon is None: - if not utils.is_program("crm_mon"): + prog = utils.is_program("crm_mon") + if not prog: raise IOError("crm_mon not available, check your installation") - _, out = utils.get_stdout("crm_mon --help") + _, out = utils.get_stdout("%s --help" % (prog)) if "--pending" in out: - _crm_mon = "crm_mon -1 -j" + _crm_mon = "%s -1 -j" % (prog) else: - _crm_mon = "crm_mon -1" + _crm_mon = "%s -1" % (prog) status_cmd = "%s %s" % (_crm_mon, opts) return utils.get_stdout(utils.add_sudo(status_cmd)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/config.py new/crmsh/modules/config.py --- old/crmsh/modules/config.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/config.py 2015-01-15 17:51:37.000000000 +0100 @@ -26,7 +26,7 @@ _SYSTEMWIDE = '/etc/crm/crm.conf' _PERUSER = os.getenv("CRM_CONFIG_FILE") or os.path.join(userdir.CONFIG_HOME, 'crm.conf') -_SUPPORTED_SCHEMAS = ('1.0', '1.1', '1.2', '1.3', '2.0', '2.1', '2.2', 'next') +_SUPPORTED_SCHEMAS = ('1.0', '1.1', '1.2', '1.3', '2.0', '2.1', '2.2', '2.3', 'next') _PATHLIST = { 'datadir': ('/usr/share', '/usr/local/share', '/opt'), @@ -298,11 +298,14 @@ fp.close() def get_impl(self, section, name): - if self._user and self._user.has_option(section, name): - return self._user.get(section, name) or '' - if self._systemwide and self._systemwide.has_option(section, name): - return self._systemwide.get(section, name) or '' - return self._defaults.get(section, name) or '' + try: + if self._user and self._user.has_option(section, name): + return self._user.get(section, name) or '' + if self._systemwide and self._systemwide.has_option(section, name): + return self._systemwide.get(section, name) or '' + return self._defaults.get(section, name) or '' + except ConfigParser.NoOptionError, e: + raise ValueError(e) def get(self, section, name, raw=False): if raw: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/crm_pssh.py new/crmsh/modules/crm_pssh.py --- old/crmsh/modules/crm_pssh.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/crm_pssh.py 2015-01-15 17:51:37.000000000 +0100 @@ -76,10 +76,6 @@ os.makedirs(opts.outdir) if opts.errdir and not os.path.exists(opts.errdir): os.makedirs(opts.errdir) - if opts.send_input: - stdin = sys.stdin.read() - else: - stdin = None manager = Manager(opts) user = "" port = "" @@ -101,7 +97,14 @@ if cmdline: cmd.append(cmdline) hosts.append(host) - t = Task(host, port, user, cmd, opts, stdin) + t = Task(host, port, user, cmd, + stdin=opts.input_stream, + verbose=opts.verbose, + quiet=opts.quiet, + print_out=opts.print_out, + inline=opts.inline, + inline_stdout=opts.inline_stdout, + default_user=opts.default_user) manager.add_task(t) try: return manager.run() # returns a list of exit codes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/log_patterns_118.py new/crmsh/modules/log_patterns_118.py --- old/crmsh/modules/log_patterns_118.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/log_patterns_118.py 2015-01-15 17:51:37.000000000 +0100 @@ -65,11 +65,11 @@ ), "events": ( ( # detail 0 - "CRIT:", - "ERROR:", + "(?:CRIT|crit):", + "(?:ERROR|error):", ), ( # detail 1 - "WARN:", + "(?:WARN|warning):", ), ), } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/main.py new/crmsh/modules/main.py --- old/crmsh/modules/main.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/main.py 2015-01-15 17:51:37.000000000 +0100 @@ -75,8 +75,9 @@ # prefer the user set PATH def envsetup(): mybinpath = os.path.dirname(sys.argv[0]) + path = os.environ["PATH"].split(':') for p in mybinpath, config.path.crm_daemon_dir: - if p not in os.environ["PATH"].split(':'): + if p not in path: os.environ['PATH'] = "%s:%s" % (os.environ['PATH'], p) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/msg.py new/crmsh/modules/msg.py --- old/crmsh/modules/msg.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/msg.py 2015-01-15 17:51:37.000000000 +0100 @@ -255,6 +255,7 @@ err_buf.error("Unsupported CIB: validator '%s', release '%s'" % (validator, rel)) err_buf.error("To upgrade an old (<1.0) schema, use the upgrade command.") + err_buf.error("Edit the core.supported_schemas option to add schemas manually.") schemas = config.core.supported_schemas err_buf.error("core.supported_schemas: %s" % (', '.join(schemas))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ra.py new/crmsh/modules/ra.py --- old/crmsh/modules/ra.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/ra.py 2015-01-15 17:51:37.000000000 +0100 @@ -323,13 +323,8 @@ ''' Do external program metadata. ''' - if prog == "crmd" and os.path.isfile(os.path.join(config.path.crm_daemon_dir, 'crmd')): - prog = os.path.join(config.path.crm_daemon_dir, 'crmd') - rc, l = stdout2list("%s metadata" % prog) - if rc == 0: - return l - common_debug("%s metadata exited with code %d" % (prog, rc)) - elif is_program(prog): + prog = is_program(prog) + if prog: rc, l = stdout2list("%s metadata" % prog) if rc == 0: return l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/utils.py new/crmsh/modules/utils.py --- old/crmsh/modules/utils.py 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/modules/utils.py 2015-01-15 17:51:37.000000000 +0100 @@ -85,8 +85,11 @@ """Is this program available?""" def isexec(filename): return os.path.isfile(filename) and os.access(filename, os.X_OK) - return any(isexec(f) for f in (os.path.join(p, prog) - for p in os.getenv("PATH").split(os.pathsep))) + for p in os.getenv("PATH").split(os.pathsep): + f = os.path.join(p, prog) + if isexec(f): + return f + return None def can_ask(): @@ -403,10 +406,11 @@ def ext_cmd(cmd, shell=True): + cmd = add_sudo(cmd) if options.regression_tests: print ".EXT", cmd - common_debug("invoke: %s" % add_sudo(cmd)) - return subprocess.call(add_sudo(cmd), shell=shell) + common_debug("invoke: %s" % cmd) + return subprocess.call(cmd, shell=shell) def ext_cmd_nosudo(cmd, shell=True): @@ -1090,10 +1094,9 @@ def get_pcmk_version(dflt): version = dflt - if is_program('crmd'): - cmd = 'crmd' - elif os.path.isfile(os.path.join(config.path.crm_daemon_dir, 'crmd')): - cmd = os.path.join(config.path.crm_daemon_dir, 'crmd') + crmd = is_program('crmd') + if crmd: + cmd = crmd else: return version @@ -1316,8 +1319,9 @@ def service_info(name): - if is_program('systemctl'): - rc, outp = get_stdout(['systemctl', 'show', + p = is_program('systemctl') + if p: + rc, outp = get_stdout([p, 'show', '-p', 'UnitFileState', '-p', 'ActiveState', '-p', 'SubState', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/basicset new/crmsh/test/testcases/basicset --- old/crmsh/test/testcases/basicset 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/test/testcases/basicset 2015-01-15 17:51:37.000000000 +0100 @@ -13,3 +13,4 @@ history newfeatures commit +bugs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/bugs new/crmsh/test/testcases/bugs --- old/crmsh/test/testcases/bugs 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh/test/testcases/bugs 2015-01-15 17:51:37.000000000 +0100 @@ -0,0 +1,21 @@ +show Configuration bugs +primitive st stonith:null \ + params hostlist='node1' \ + meta description="some description here" \ + op start requires=nothing \ + op monitor interval=60m +primitive p1 Dummy +primitive p2 Dummy +primitive p3 Dummy +primitive p4 Dummy +colocation c1 inf: p1 p2 +filter "sed 's/p1 p2/& p3/'" c1 +show c1 +delete c1 +colocation c2 inf: [ p1 p2 ] p3 p4 +filter "sed 's/\[/(/;s/\]/)/'" c2 +show c2 +commit +_test +verify +. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/bugs.exp new/crmsh/test/testcases/bugs.exp --- old/crmsh/test/testcases/bugs.exp 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh/test/testcases/bugs.exp 2015-01-15 17:51:37.000000000 +0100 @@ -0,0 +1,40 @@ +.TRY Configuration bugs +.INP: configure +.INP: _regtest on +.INP: erase +.INP: erase nodes +.INP: primitive st stonith:null params hostlist='node1' meta description="some description here" op start requires=nothing op monitor interval=60m +.INP: primitive p1 Dummy +.INP: primitive p2 Dummy +.INP: primitive p3 Dummy +.INP: primitive p4 Dummy +.INP: colocation c1 inf: p1 p2 +.INP: filter "sed 's/p1 p2/& p3/'" c1 +.INP: show c1 +colocation c1 inf: p1 p2 p3 +.INP: delete c1 +.INP: colocation c2 inf: [ p1 p2 ] p3 p4 +.INP: filter "sed 's/[/(/;s/]/)/'" c2 +.INP: show c2 +colocation c2 inf: ( p1 p2 ) p3 p4 +.INP: commit +.EXT crm_resource --show-metadata stonith:heartbeat:null +.EXT stonithd metadata +.EXT crm_resource --show-metadata ocf:heartbeat:Dummy +.EXT pengine metadata +.INP: _test +.INP: verify +.INP: show +primitive p1 Dummy +primitive p2 Dummy +primitive p3 Dummy +primitive p4 Dummy +primitive st stonith:null \ + params hostlist=node1 \ + meta description="some description here" \ + op start requires=nothing interval=0 \ + op monitor interval=60m +colocation c2 inf: ( p1 p2 ) p3 p4 +.INP: commit +INFO: 21: apparently there is nothing to commit +INFO: 21: try changing something first diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/edit new/crmsh/test/testcases/edit --- old/crmsh/test/testcases/edit 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/test/testcases/edit 2015-01-15 17:51:37.000000000 +0100 @@ -47,13 +47,13 @@ modgroup g1 add c1 modgroup g1 add nosuch filter "sed 's/^/# this is a comment\\n/'" loc-d1 +rsc_defaults $id="rsc_options" failure-timeout=10m +filter "sed 's/2m/60s/'" cib-bootstrap-options +show rsc_options +property stonith-enabled=true +show cib-bootstrap-options +filter 'sed "s/stonith-enabled=true//"' +show cib-bootstrap-options _test verify . -configure rsc_defaults $id="rsc_options" failure-timeout=10m -configure filter "sed 's/2m/60s/'" cib-bootstrap-options -configure show rsc_options -configure property stonith-enabled=true -configure show cib-bootstrap-options -configure filter 'sed "s/stonith-enabled=true//"' -configure show cib-bootstrap-options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/test/testcases/edit.exp new/crmsh/test/testcases/edit.exp --- old/crmsh/test/testcases/edit.exp 2015-01-09 10:13:19.000000000 +0100 +++ new/crmsh/test/testcases/edit.exp 2015-01-15 17:51:37.000000000 +0100 @@ -51,6 +51,20 @@ .INP: modgroup g1 add nosuch ERROR: 44: g1 refers to missing object nosuch .INP: filter "sed 's/^/# this is a comment\n/'" loc-d1 +.INP: rsc_defaults $id="rsc_options" failure-timeout=10m +.INP: filter "sed 's/2m/60s/'" cib-bootstrap-options +.INP: show rsc_options +rsc_defaults rsc_options: \ + failure-timeout=10m +.INP: property stonith-enabled=true +.INP: show cib-bootstrap-options +property cib-bootstrap-options: \ + default-action-timeout=60s \ + stonith-enabled=true +.INP: filter 'sed "s/stonith-enabled=true//"' +.INP: show cib-bootstrap-options +property cib-bootstrap-options: \ + default-action-timeout=60s .INP: _test .INP: verify .EXT crm_resource --show-metadata stonith:heartbeat:null @@ -86,28 +100,7 @@ rule webserver: defined webserver order o1 inf: p3 c1 property cib-bootstrap-options: \ - default-action-timeout=2m -.INP: commit -.TRY configure rsc_defaults $id="rsc_options" failure-timeout=10m -.TRY configure filter "sed 's/2m/60s/'" cib-bootstrap-options -.EXT crmd metadata -.EXT pengine metadata -.EXT cib metadata -.TRY configure show rsc_options + default-action-timeout=60s rsc_defaults rsc_options: \ failure-timeout=10m -.TRY configure property stonith-enabled=true -.EXT crmd metadata -.EXT pengine metadata -.EXT cib metadata -.TRY configure show cib-bootstrap-options -property cib-bootstrap-options: \ - default-action-timeout=60s \ - stonith-enabled=true -.TRY configure filter 'sed "s/stonith-enabled=true//"' -.EXT crmd metadata -.EXT pengine metadata -.EXT cib metadata -.TRY configure show cib-bootstrap-options -property cib-bootstrap-options: \ - default-action-timeout=60s +.INP: commit -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
