mongo test server should restart when address already in use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
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:
https:/
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
- Juju Engineering: Pending requested
-
Diff: 86 lines (+38/-13)1 file modifiedtesting/mgo.go (+38/-13)
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: intermittent-failure test-failure |
Changed in juju-core: | |
milestone: | none → 1.19.3 |
Changed in juju-core: | |
assignee: | nobody → Andrew Wilkins (axwalk) |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |