diff options
author | Mario Splivalo <mario.splivalo@canonical.com> | 2018-04-25 16:19:18 +0200 |
---|---|---|
committer | Mario Splivalo <mario.splivalo@canonical.com> | 2018-04-25 16:19:18 +0200 |
commit | 20aaba6374ed0b6a5263147ad86481738073112c (patch) | |
tree | 828929bbd7b7f91a879c50f79b7b1205b7b166ea | |
parent | 001d9b56d9597c8b20dc3b5b8cf7927a12a243b2 (diff) |
Removed extra_daemon_options charm option.
The update_daemon_options function, which utilized the extra_daemon_options was broken and it didn't set the daemon options as the initial author envisioned. As it is touching the upstart init file, which is nonexistant in bionic for mongodb-server package, the charm failed during the config-changed hook. Removal of update_daemon_options fixes this issue. Fixes-bug: LP: #1748214
-rw-r--r-- | config.yaml | 4 | ||||
-rwxr-xr-x | hooks/hooks.py | 18 |
2 files changed, 0 insertions, 22 deletions
diff --git a/config.yaml b/config.yaml index cbaf414..c71b260 100644 --- a/config.yaml +++ b/config.yaml @@ -151,10 +151,6 @@ options: default: "none" type: string description: Extra options ( comma separated ) to be included ( at the end ) in the mongodb.conf file. - extra_daemon_options: - default: "none" - type: string - description: Extra options ( exactly as you would type them in the command line ) to be added via the command line to the mongodb daemon backups_enabled: default: False type: boolean diff --git a/hooks/hooks.py b/hooks/hooks.py index d3774a7..5e00355 100755 --- a/hooks/hooks.py +++ b/hooks/hooks.py @@ -616,21 +616,6 @@ def remove_rest_from_upstart(): return(retVal) -def update_daemon_options(daemon_options=None): - mongodb_init_config = open(default_mongodb_init_config).read() - pat_replace = [] - if daemon_options is None or daemon_options == "none": - pat_replace.append( - (' --config /etc/mongodb.conf.*', - ' --config /etc/mongodb.conf; fi')) - else: - pat_replace.append( - (' --config /etc/mongodb.conf.*', - ' --config /etc/mongodb.conf %s; fi' % daemon_options)) - regex_sub(pat_replace, mongodb_init_config) - return(update_file(default_mongodb_init_config, mongodb_init_config)) - - def enable_arbiter(master_node=None, host=None): juju_log("enable_arbiter: master_node: %s, host: %s" % (master_node, host)) @@ -1002,9 +987,6 @@ def config_changed(): enable_replset(config_data['replicaset']) join_replset(config_data['replicaset_master']) - # extra demon options - update_daemon_options(config_data['extra_daemon_options']) - # write mongodb logrotate configuration file write_logrotate_config(config_data) |