Project

General

Profile

Bug #45151

ceph alerts module fails on setting interval

Added by Alwin Antreich almost 4 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

On Proxmox VE 6.1 with Ceph 14.2.9, setting the alerts interval results in an error on ceph alerts send and when the mgr is restarted.

root@p6c151:~# ceph config dump
WHO   MASK LEVEL    OPTION                      VALUE                  RO
  mgr      advanced mgr/alerts/interval         300
  mgr      advanced mgr/alerts/smtp_destination user@example.com
  mgr      advanced mgr/alerts/smtp_from_name   root@p6c151
  mgr      advanced mgr/alerts/smtp_host        mail.example.com
  mgr      advanced mgr/alerts/smtp_port        25
  mgr      advanced mgr/alerts/smtp_sender      root@example.com
  mgr      advanced mgr/alerts/smtp_ssl         false
root@p6c151:~# ceph alerts send
Error EIO: Module 'alerts' has experienced an error and cannot handle commands: %d format: a number is required, not str

And on ceph-mgr restart the following is logged.
/var/log/ceph/ceph-mgr.p6c151.log

2020-04-20 16:12:37.014 7f798210c700 -1 ceph_set_health_checks check ALERTS_SMTP_ERROR unexpected key count
2020-04-20 16:12:37.014 7f798310e700  1 mgr.server send_report Not sending PG status to monitor yet, waiting for OSDs
2020-04-20 16:12:37.014 7f798210c700 -1 log_channel(cluster) log [ERR] : Unhandled exception from module 'alerts' while running on mgr.p6c151: %d format: a number is required, not str
2020-04-20 16:12:37.014 7f798210c700 -1 alerts.serve:
2020-04-20 16:12:37.014 7f798210c700 -1 Traceback (most recent call last):
  File "/usr/share/ceph/mgr/alerts/module.py", line 180, in serve
    self.log.debug('Sleeping for %d seconds', self.interval)
  File "/usr/lib/python2.7/logging/__init__.py", line 1162, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1293, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1303, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1343, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 766, in handle
    self.emit(record)
  File "/usr/share/ceph/mgr/mgr_module.py", line 65, in emit
    self._module._ceph_log(ceph_level, self.format(record))
  File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
TypeError: %d format: a number is required, not str

This commit seems to fix the error.
https://github.com/ceph/ceph/commit/368c810a4200a57a772b8122fc606a2b36de7413

It came with the pull request.
https://github.com/ceph/ceph/pull/32316

Please, could this be backported?
Thank you.


Related issues

Related to mgr - Bug #43363: mgr/alert: can't set inventory_cache_timeout/service_cache_timeout from CLI Resolved

History

#1 Updated by Sebastian Wagner almost 4 years ago

  • Related to Bug #43363: mgr/alert: can't set inventory_cache_timeout/service_cache_timeout from CLI added

#2 Updated by Sebastian Wagner almost 4 years ago

  • Status changed from New to Duplicate

Thanks, I've added the nautilus backport to the other issue.

Also available in: Atom PDF