Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python config fetch disrupted by stderr output #13295

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

murrant
Copy link
Member

@murrant murrant commented Sep 30, 2021

I have no idea how to make command_runner not include debug output, so just use subprocess.check_output

Please give a short description what your pull request is for

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

I have no idea how to make command_runner not include debug output, so just use subprocess.check_output
@ottorei
Copy link
Contributor

ottorei commented Sep 30, 2021

@deajan Any ideas on this one?
@murrant Could it work with a different capture mode as documented in https://pypi.org/project/command-runner/

@deajan
Copy link
Contributor

deajan commented Sep 30, 2021

@ottorei @murrant Let me check this Real quick this evening, I'm pretty sure there's an easy fix for this that doesn't need a revert to subprocess.
Just a quick question, how can I reproduce the problem ? Some trivial change in config_to_json.php perhaps ?

@murrant
Copy link
Member Author

murrant commented Sep 30, 2021

Enable the snmp module in php and set mibs : BOGUS-MIB in /etc/snmp/snmp.conf (at least that is how most people trigger it)

@murrant
Copy link
Member Author

murrant commented Oct 1, 2021

@deajan merging this in the meantime.

@murrant murrant merged commit c84b462 into librenms:master Oct 1, 2021
@murrant murrant deleted the fix-py-config-debug-output branch October 1, 2021 12:58
@deajan
Copy link
Contributor

deajan commented Oct 1, 2021

No problem. Will give me more time to investigate. Sorry for the noise again, that PR was a major headache ;)

@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/21-10-0-changelog/17124/1

eskyuu pushed a commit to eskyuu/librenms that referenced this pull request Oct 21, 2021
* Fix python config fetch disrupted by stderr output

I have no idea how to make command_runner not include debug output, so just use subprocess.check_output

* restore import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants