From 742822030623c81028da3f44656d629debb2fefb Mon Sep 17 00:00:00 2001 From: Peter Jose De Sousa Date: Thu, 12 Jan 2023 19:13:23 +0000 Subject: [PATCH 1/2] hotfix - rendering issues --- reactive/filebeat.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reactive/filebeat.py b/reactive/filebeat.py index 5baf418..367df11 100644 --- a/reactive/filebeat.py +++ b/reactive/filebeat.py @@ -4,6 +4,7 @@ hook, is_state, when, + when_any, when_not, set_state, remove_state @@ -51,9 +52,11 @@ def blocked_until_reinstall(): status.blocked(msg) -@when('beat.render') -@when('apt.installed.filebeat') -@when('certificates.available') +@when_any( + 'beat.render', + 'apt.installed.filebeat', + 'certificates.available' +) @restart_on_change({ LOGSTASH_SSL_CERT: ['filebeat'], LOGSTASH_SSL_KEY: ['filebeat'], @@ -88,7 +91,6 @@ def render_filebeat_template(): # Ensure ssl files match config each time we render a new template manage_filebeat_logstash_ssl() remove_state('beat.render') - if connections: if cfg_original_hash != cfg_new_hash: service('restart', 'filebeat') From c6d989fe589c46e860ac63c13a3d50f63a9171fc Mon Sep 17 00:00:00 2001 From: Erhan Sunar Date: Fri, 13 Jan 2023 00:18:10 +0300 Subject: [PATCH 2/2] fix for bionic install problem --- charmcraft.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index 8768dd2..ae5b4b5 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -10,7 +10,10 @@ parts: charm: source: ./ plugin: reactive - build-snaps: [ charm ] + build-snaps: + # if it is build with charm/3.x it cannot be installed on bionic + # Error: pip requires Python '>=3.7' but the running Python is 3.6.9 + - charm/2.x/stable bases: - build-on: