commit crmsh for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2022-08-30 14:50:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "crmsh" Tue Aug 30 14:50:39 2022 rev:254 rq:1000191 version:4.4.1+20220830.5a63c85f Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2022-08-23 14:30:17.807694134 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.2083/crmsh.changes 2022-08-30 14:51:24.196414872 +0200 @@ -1,0 +2,22 @@ +Tue Aug 30 08:19:38 UTC 2022 - XLiang@suse.com + +- Update to version 4.4.1+20220830.5a63c85f: + * Dev: unittest: Adjust unit test based on previous changes + * Dev: bootstrap: Show remote node name when stopping service remotely + +------------------------------------------------------------------- +Mon Aug 29 07:35:53 UTC 2022 - XLiang@suse.com + +- Update to version 4.4.1+20220829.08a730cb: + * Dev: log: print a full-width progress bar in status_progress to prevent interleaving with log messages + * Dev: log: print begin and end marker in different lines in status_long + +------------------------------------------------------------------- +Wed Aug 24 09:20:14 UTC 2022 - XLiang@suse.com + +- Update to version 4.4.1+20220824.c59544bf: + * Dev: ui_context: remove duplicated codes + * Dev: parallax: Add LogLevel=error ssh option to filter out warnings (bsc#1196726) + * Revert "Fix: utils: Only raise exception when return code of systemctl command over ssh larger than 4 (bsc#1196726)" (bsc#1202655) + +------------------------------------------------------------------- Old: ---- crmsh-4.4.1+20220822.c2f5d204.tar.bz2 New: ---- crmsh-4.4.1+20220830.5a63c85f.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.JV6RKf/_old 2022-08-30 14:51:24.832416494 +0200 +++ /var/tmp/diff_new_pack.JV6RKf/_new 2022-08-30 14:51:24.840416515 +0200 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.4.1+20220822.c2f5d204 +Version: 4.4.1+20220830.5a63c85f Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.JV6RKf/_old 2022-08-30 14:51:24.892416648 +0200 +++ /var/tmp/diff_new_pack.JV6RKf/_new 2022-08-30 14:51:24.896416658 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">1be81833f51a3d83b3329085cec5ab19f1957ef4</param> + <param name="changesrevision">5a63c85f3d0e2e2d1bb3407fb4de7e0b4e9a8144</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.4.1+20220822.c2f5d204.tar.bz2 -> crmsh-4.4.1+20220830.5a63c85f.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/crmsh/bootstrap.py new/crmsh-4.4.1+20220830.5a63c85f/crmsh/bootstrap.py --- old/crmsh-4.4.1+20220822.c2f5d204/crmsh/bootstrap.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/crmsh/bootstrap.py 2022-08-30 10:02:28.000000000 +0200 @@ -361,20 +361,20 @@ """ Wait for resource started """ - with logger_utils.status_long(message): + with logger_utils.status_long(message) as progress_bar: while True: if xmlutil.CrmMonXmlParser.is_resource_started(resource): break - status_progress() + status_progress(progress_bar) sleep(1) def wait_for_cluster(): - with logger_utils.status_long("Waiting for cluster"): + with logger_utils.status_long("Waiting for cluster") as progress_bar: while True: if is_online(): break - status_progress() + status_progress(progress_bar) sleep(2) @@ -438,10 +438,9 @@ time.sleep(t) -def status_progress(): +def status_progress(progress_bar): if not _context or not _context.quiet: - sys.stdout.write(".") - sys.stdout.flush() + progress_bar.progress() def partprobe(): @@ -1873,7 +1872,7 @@ """ for service in stop_list: if utils.service_is_active(service, remote_addr=remote_addr): - logger.info("Stopping the {}".format(service)) + logger.info("Stopping the %s%s", service, " on {}".format(remote_addr) if remote_addr else "") utils.stop_service(service, disable=True, remote_addr=remote_addr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/crmsh/log.py new/crmsh-4.4.1+20220830.5a63c85f/crmsh/log.py --- old/crmsh-4.4.1+20220822.c2f5d204/crmsh/log.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/crmsh/log.py 2022-08-30 10:02:28.000000000 +0200 @@ -46,14 +46,11 @@ "ERROR": constants.RED } FORMAT = "%(levelname)s: %(message)s" - FORMAT_RAW = "%(message)s" - def __init__(self, lineno=-1, raw_msg=False, fmt=None): + def __init__(self, lineno=-1, fmt=None): self.lineno = lineno if fmt: super().__init__(fmt=fmt) - elif raw_msg: - super().__init__(fmt=self.FORMAT_RAW) else: super().__init__(fmt=self.FORMAT) @@ -246,18 +243,6 @@ console_handler.terminator = "\n" @contextmanager - def raw_msg(self): - """ - Only print raw message, without levelname - """ - console_handler = self.get_handler("console") - try: - console_handler.setFormatter(ConsoleCustomFormatter(raw_msg=True)) - yield - finally: - console_handler.setFormatter(ConsoleCustomFormatter()) - - @contextmanager def only_file(self): """ Only log to file in bootstrap logger @@ -311,27 +296,19 @@ finally: self.reset_lineno(self.__save_lineno) - def status_done(self): - """ - Log info message "done" in console - """ - with self.raw_msg(): - self.logger.info("done") - @contextmanager def status_long(self, msg): """ - To wait and mark something finished, start with msg, end of done + To wait and mark something finished, start with BEGIN msg, end of END msg """ - with self.suppress_new_line(): - self.logger.info("%s...", msg) + self.logger.info("BEGIN %s", msg) try: - yield - except: - print("") + yield ProgressBar() + except Exception: + self.logger.error("FAIL %s", msg) raise else: - self.status_done() + self.logger.info("END %s", msg) def wait_input(self, prompt_string, default=""): """ @@ -423,6 +400,22 @@ self.logger.info("offending xml: %s", xml) +class ProgressBar: + def __init__(self): + self._i = 0 + + def progress(self): + try: + width, _ = os.get_terminal_size() + except OSError: + # not a terminal + return + self._i = (self._i + 1) % width + line = '\r{}{}'.format('.' * self._i, ' ' * (width - self._i)) + sys.stdout.write(line) + sys.stdout.flush() + + def setup_directory_for_logfile(): """ Create log file's parent directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/crmsh/parallax.py new/crmsh-4.4.1+20220830.5a63c85f/crmsh/parallax.py --- old/crmsh-4.4.1+20220822.c2f5d204/crmsh/parallax.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/crmsh/parallax.py 2022-08-30 10:02:28.000000000 +0200 @@ -37,7 +37,9 @@ def prepare(self): opts = parallax.Options() if self.ssh_options is None: - self.ssh_options = ['StrictHostKeyChecking=no', 'ConnectTimeout=10'] + self.ssh_options = ['StrictHostKeyChecking=no', + 'ConnectTimeout=10', + 'LogLevel=error'] opts.ssh_options = self.ssh_options opts.askpass = self.askpass # warn_message will available from parallax-1.0.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/crmsh/ui_context.py new/crmsh-4.4.1+20220830.5a63c85f/crmsh/ui_context.py --- old/crmsh-4.4.1+20220822.c2f5d204/crmsh/ui_context.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/crmsh/ui_context.py 2022-08-30 10:02:28.000000000 +0200 @@ -90,14 +90,7 @@ break if cmd: rv = self.execute_command() is not False - except ValueError as msg: - if config.core.debug or options.regression_tests: - import traceback - traceback.print_exc() - sys.stdout.flush() - logger.error("%s: %s", self.get_qualified_name(), msg) - rv = False - except IOError as msg: + except (ValueError, IOError) as msg: if config.core.debug or options.regression_tests: import traceback traceback.print_exc() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/crmsh/utils.py new/crmsh-4.4.1+20220830.5a63c85f/crmsh/utils.py --- old/crmsh-4.4.1+20220822.c2f5d204/crmsh/utils.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/crmsh/utils.py 2022-08-30 10:02:28.000000000 +0200 @@ -2539,13 +2539,10 @@ elif self.remote_addr and self.remote_addr != this_node(): prompt_msg = "Run \"{}\" on {}".format(cmd, self.remote_addr) rc, output, err = run_cmd_on_remote(cmd, self.remote_addr, prompt_msg) - # see "EXIT STATUS" in man systemctl - if rc > 4: - raise ValueError("Run \"{}\" error: {}".format(cmd, err)) else: rc, output, err = get_stdout_stderr(cmd) - if rc != 0 and err: - raise ValueError("Run \"{}\" error: {}".format(cmd, err)) + if rc != 0 and err: + raise ValueError("Run \"{}\" error: {}".format(cmd, err)) return rc == 0, output @property diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220822.c2f5d204/test/unittests/test_bootstrap.py new/crmsh-4.4.1+20220830.5a63c85f/test/unittests/test_bootstrap.py --- old/crmsh-4.4.1+20220822.c2f5d204/test/unittests/test_bootstrap.py 2022-08-22 07:51:44.000000000 +0200 +++ new/crmsh-4.4.1+20220830.5a63c85f/test/unittests/test_bootstrap.py 2022-08-30 10:02:28.000000000 +0200 @@ -1359,10 +1359,10 @@ mock.call("csync2.socket", remote_addr=None) ]) mock_status.assert_has_calls([ - mock.call("Stopping the corosync-qdevice.service"), - mock.call("Stopping the corosync.service"), - mock.call("Stopping the hawk.service"), - mock.call("Stopping the csync2.socket") + mock.call('Stopping the %s%s', 'corosync-qdevice.service', ''), + mock.call('Stopping the %s%s', 'corosync.service', ''), + mock.call('Stopping the %s%s', 'hawk.service', ''), + mock.call('Stopping the %s%s', 'csync2.socket', '') ]) mock_stop.assert_has_calls([ mock.call("corosync-qdevice.service", disable=True, remote_addr=None),
participants (1)
-
Source-Sync