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

Gracefully handle failure of ifcfg due to multiple IP bindings. #5914

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

jamalex
Copy link
Member

@jamalex jamalex commented Sep 3, 2019

Summary

When an interface has multiple IPs bound to it, the following issue surfaces: ftao/python-ifcfg#34

This prevents Kolibri from starting at all.

After this PR, this situation is handled somewhat gracefully:

INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Sqlite database Vacuum finished.
INFO     Running 'kolibri start' as daemon (system service)
ERROR    Error retrieving network interface list!
ERROR    Could not detect an IP address that Kolibri binds to, but try opening up the following addresses:

        http://localhost:8080
        http://127.0.0.1:8080

INFO     Going to daemon mode, logging to /home/user/.kolibri/logs/kolibri.txt

Reviewer guidance

Wasn't able to force a replication locally, but tested the fix on the remote server where the issue was being observed, and it worked.

References

Sidesteps issue caused by ftao/python-ifcfg#34


Contributor Checklist

PR process:

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Testing:

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

Reviewer Checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@jamalex jamalex added TODO: needs review Waiting for review bug Behavior is wrong or broken labels Sep 3, 2019
@jamalex jamalex added this to the 0.12.9 milestone Sep 3, 2019
@jamalex jamalex requested a review from rtibbles September 3, 2019 17:45
@codecov
Copy link

codecov bot commented Sep 3, 2019

Codecov Report

Merging #5914 into release-v0.12.x will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted Files Coverage Δ
kolibri/utils/server.py 46.54% <66.66%> (-0.15%) ⬇️

for interface in filter(lambda i: i["inet"], interfaces.values()):
urls.append("http://{}:{}/".format(interface["inet"], port))
except RuntimeError:
logger.error("Error retrieving network interface list!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreeing on the work-around! The upstream issue should be addressed, too, of course, but it's slightly complicated.

@rtibbles rtibbles merged commit dd8886f into learningequality:release-v0.12.x Sep 4, 2019
@indirectlylit indirectlylit added the changelog Important user-facing changes label Oct 26, 2019
@jonboiser jonboiser added TODO: needs review Waiting for review and removed TODO: needs review Waiting for review labels Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Behavior is wrong or broken changelog Important user-facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants