mongo test server should restart when address already in use

Bug #1301467 reported by Roger Peppe on 2014-04-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Andrew Wilkins

Bug Description

One cause of intermittent test failures is when mongo fails because of a port
in use. Although we try to pick a new unused port, there is no guarantee that
some other process will not have grabbed it by the time mongo tries to
bind to it. Currently if this happens, we see a test timeout.

Here's an example of a test that failed like that:

As a first step, we could monitor the mongo output
for an occurrence of the string

"ERROR: listen(): bind() failed errno:98 Address already in use for socket".

and panic if we saw that.

Better would be to monitor the output for some indication that
the mongo server has actually successfully bound to the port,
and don't return from the mongo instance creation code until
that happens, which would enable us to restart the mongod automatically
in this case.

Related branches

Curtis Hovey (sinzui) on 2014-04-02
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: intermittent-failure test-failure
Ian Booth (wallyworld) on 2014-05-12
Changed in juju-core:
milestone: none → 1.19.3
Andrew Wilkins (axwalk) on 2014-05-14
Changed in juju-core:
assignee: nobody → Andrew Wilkins (axwalk)
status: Triaged → In Progress
Andrew Wilkins (axwalk) on 2014-05-14
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2014-05-30
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers