Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

BUG | yaml script opens for writing #25

Open
roitalpaz opened this issue Apr 11, 2021 · 0 comments
Open

BUG | yaml script opens for writing #25

roitalpaz opened this issue Apr 11, 2021 · 0 comments

Comments

@roitalpaz
Copy link

roitalpaz commented Apr 11, 2021

Description

metricbeat-yml-script.py opens it's config files (in /logzio/modules/aws.yml for example) as "r+".
this causes crashes if its mounted in read only like in k8s configmaps

Reproduce

mount a configmap into /logzio/modules

Code

2021-04-11 09:03:51,987         INFO    [__main__]      metricbeat-yml-script.py:67     Connection Established
Traceback (most recent call last):
  File "metricbeat-yml-script.py", line 265, in <module>
    _add_modules()
  File "metricbeat-yml-script.py", line 80, in _add_modules
    _enable_modules(modules)
  File "metricbeat-yml-script.py", line 91, in _enable_modules
    with open("modules/{}.yml".format(module), "r+") as module_file:
OSError: [Errno 30] Read-only file system: 'modules/aws.yml'
@roitalpaz roitalpaz changed the title BUG | yaml script opens for reading BUG | yaml script opens for writing Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant