]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: ceph_default_alerts.yml can be utf-8 encoded 34977/head
authorMichael Fritch <mfritch@suse.com>
Mon, 11 May 2020 00:43:21 +0000 (18:43 -0600)
committerMichael Fritch <mfritch@suse.com>
Mon, 11 May 2020 01:02:59 +0000 (19:02 -0600)
non-ascii chars introduced by 653c3f66823

Fixes: https://tracker.ceph.com/issues/45458
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/services/monitoring.py

index 242afdc390fe529a8033cbd91b890db40f43f888..e3ca8a804f65b187359bf046711e0f86c5703cb8 100644 (file)
@@ -263,7 +263,7 @@ scrape_configs:
 
         # include alerts, if present in the container
         if os.path.exists(self.mgr.prometheus_alerts_path):
-            with open(self.mgr.prometheus_alerts_path, "r") as f:
+            with open(self.mgr.prometheus_alerts_path, 'r', encoding='utf-8') as f:
                 alerts = f.read()
             r['files']['/etc/prometheus/alerting/ceph_alerts.yml'] = alerts