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

Added config option for database port #5517

Merged
merged 10 commits into from Jan 27, 2017

Conversation

Projects
None yet
5 participants
@geordish
Contributor

geordish commented Jan 19, 2017

Fix for #5514

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?
@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@@ -86,7 +87,6 @@ def get_config_data():
db_port = int(config['db_host'].rsplit(':')[1])
else:

This comment has been minimized.

@geordish

geordish Jan 19, 2017

Contributor

I'm tempted to just remove this elif completely, as I don't see how it could work with the rest of librenms?

This comment has been minimized.

@laf

laf Jan 23, 2017

Member

Probably a hangup from when we used mysql_connect which I think did/does accept :port

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 19, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@laf

This comment has been minimized.

Member

laf commented Jan 20, 2017

./LibreNMS/IRCBot.php needs updating

Would also be good to do ./html/plugins/Weathermap/data-pick.php from the plugins repo. Happy to do that.

Looks ok to me, needs testing quite a bit though.

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 20, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@laf

This comment has been minimized.

Member

laf commented Jan 23, 2017

Also needs:

./poller-service.py
./discovery-wrapper.py

@laf

This comment has been minimized.

Member

laf commented Jan 23, 2017

Running it in test install now.

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Jan 23, 2017

Auto-Deploy finished, Test PR at http://5517.ci.librenms.org or https://5517.ci.librenms.org

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Jan 23, 2017

The inspection completed: No new issues

@laf

laf approved these changes Jan 23, 2017

@laf

This comment has been minimized.

Member

laf commented Jan 23, 2017

@librenms/reviewers Works for me. Anyone else want to test?

@laf laf merged commit 5dd030f into librenms:master Jan 27, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@VimCommando

This comment has been minimized.

Contributor

VimCommando commented Feb 2, 2017

If you see poller-wrapper.py spit this error at you:

ERROR: Could not connect to MySQL database!

but validate.php and poller.php say the database connection is [OK]; double-check your db_host config. If you included the port previously (i.e. "localhost:3306") this update will break that.

The fix is to simply define db_port separately in config.php and poller-wrapper.py should work fine again.

@laf

This comment has been minimized.

Member

laf commented Feb 2, 2017

Sorry that this might have broken something for you - out of interest how did you have poller.php working on the non-standard port or is it just that you'd specified :3306 all along?

@VimCommando

This comment has been minimized.

Contributor

VimCommando commented Mar 1, 2017

I just had the default port specified in my URL string, even though I didn't need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment