Merge lp:~axwalk/juju-core/testing-mgo-nounixsocket into lp:~go-bot/juju-core/trunk

Proposed by Andrew Wilkins
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: 1716
Proposed branch: lp:~axwalk/juju-core/testing-mgo-nounixsocket
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
testing/mgo.go (+1/-0)
To merge this branch: bzr merge lp:~axwalk/juju-core/testing-mgo-nounixsocket
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+181218@code.launchpad.net

Commit message

testing: pass --nounixsocket to mongod

The tests are leaving Unix socket files
in $TMPDIR when mongod is killed. We
don't need Unix sockets for mongod in
our tests, so just disable them.

https://codereview.appspot.com/12828046/

Description of the change

testing: pass --nounixsocket to mongod

The tests are leaving Unix socket files
in $TMPDIR when mongod is killed. We
don't need Unix sockets for mongod in
our tests, so just disable them.

https://codereview.appspot.com/12828046/

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+181218_code.launchpad.net,

Message:
Please take a look.

Description:
testing: pass --nounixsocket to mongod

The tests are leaving Unix socket files
in $TMPDIR when mongod is killed. We
don't need Unix sockets for mongod in
our tests, so just disable them.

https://code.launchpad.net/~axwalk/juju-core/testing-mgo-nounixsocket/+merge/181218

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/12828046/

Affected files:
   A [revision details]
   M testing/mgo.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-20130821051648-ovunbhgihpcax89h
+New revision: <email address hidden>

Index: testing/mgo.go
=== modified file 'testing/mgo.go'
--- testing/mgo.go 2013-07-31 08:17:33 +0000
+++ testing/mgo.go 2013-08-21 08:25:04 +0000
@@ -78,6 +78,7 @@
    "--noprealloc",
    "--smallfiles",
    "--nojournal",
+ "--nounixsocket",
   }
   server := exec.Command("mongod", mgoargs...)
   out, err := server.StdoutPipe()

Revision history for this message
Dave Cheney (dave-cheney) wrote :

Hmm, not sure about this one, is it a 2.4.x option ? It isn't present in
the raring 2.2.x variant.

On Wed, Aug 21, 2013 at 6:33 PM, Andrew Wilkins <
<email address hidden>> wrote:

> Reviewers: mp+181218_code.launchpad.net,
>
> Message:
> Please take a look.
>
> Description:
> testing: pass --nounixsocket to mongod
>
> The tests are leaving Unix socket files
> in $TMPDIR when mongod is killed. We
> don't need Unix sockets for mongod in
> our tests, so just disable them.
>
>
> https://code.launchpad.net/~axwalk/juju-core/testing-mgo-nounixsocket/+merge/181218
>
> (do not edit description out of merge proposal)
>
>
> Please review this at https://codereview.appspot.com/12828046/
>
> Affected files:
> A [revision details]
> M testing/mgo.go
>
>
> Index: [revision details]
> === added file '[revision details]'
> --- [revision details] 2012-01-01 00:00:00 +0000
> +++ [revision details] 2012-01-01 00:00:00 +0000
> @@ -0,0 +1,2 @@
> +Old revision: tarmac-20130821051648-ovunbhgihpcax89h
> +New revision: <email address hidden>
>
> Index: testing/mgo.go
> === modified file 'testing/mgo.go'
> --- testing/mgo.go 2013-07-31 08:17:33 +0000
> +++ testing/mgo.go 2013-08-21 08:25:04 +0000
> @@ -78,6 +78,7 @@
> "--noprealloc",
> "--smallfiles",
> "--nojournal",
> + "--nounixsocket",
> }
> server := exec.Command("mongod", mgoargs...)
> out, err := server.StdoutPipe()
>
>
>
>
>
> --
>
> https://code.launchpad.net/~axwalk/juju-core/testing-mgo-nounixsocket/+merge/181218
> You are subscribed to branch lp:juju-core.
>

Revision history for this message
Andrew Wilkins (axwalk) wrote :

> Hmm, not sure about this one, is it a 2.4.x option ? It isn't present in
> the raring 2.2.x variant.

I'll have to investigate. I checked the PPA version on Precise, and it has it.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

Sorry just realised I already have 2.2.4 installed on Raring, and ... it's there. What are you looking at exactly?

$ mongod --version
db version v2.2.4, pdfile version 4.5
Wed Aug 21 17:48:35 git version: nogitversion

$ mongod --help | grep nounix
  --nounixsocket disable listening on unix sockets

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

Revision history for this message
Dave Cheney (dave-cheney) wrote :

LGTM. Fair enough, my raring mongodb doesn't have a man page, and
-nounixsocket isn't mentioned by --help, but I believe you.

On Wed, Aug 21, 2013 at 7:47 PM, Andrew Wilkins <
<email address hidden>> wrote:

> > Hmm, not sure about this one, is it a 2.4.x option ? It isn't present in
> > the raring 2.2.x variant.
>
> I'll have to investigate. I checked the PPA version on Precise, and it has
> it.
> --
>
> https://code.launchpad.net/~axwalk/juju-core/testing-mgo-nounixsocket/+merge/181218
> You are subscribed to branch lp:juju-core.
>

Revision history for this message
William Reade (fwereade) wrote :
Revision history for this message
Go Bot (go-bot) wrote :
Download full text (11.2 KiB)

The attempt to merge lp:~axwalk/juju-core/testing-mgo-nounixsocket into lp:juju-core failed. Below is the output from the failed tests.

ok launchpad.net/juju-core/agent 0.690s
ok launchpad.net/juju-core/agent/tools 0.232s
ok launchpad.net/juju-core/bzr 6.954s
ok launchpad.net/juju-core/cert 2.064s
ok launchpad.net/juju-core/charm 0.551s
? launchpad.net/juju-core/charm/hooks [no test files]
ok launchpad.net/juju-core/cloudinit 0.020s
ok launchpad.net/juju-core/cmd 0.218s
? launchpad.net/juju-core/cmd/builddb [no test files]
? launchpad.net/juju-core/cmd/charmd [no test files]
? launchpad.net/juju-core/cmd/charmload [no test files]

----------------------------------------------------------------------
PANIC: addmachine.go:0: AddUnitSuite.SetUpTest

... Panic: Couldn't create temporary directory: mkdir /tmp/gocheck-5765484004404056823: file exists (PC=0x414321)

/usr/lib/go/src/pkg/runtime/panic.c:229
  in panic
/home/tarmac/trees/src/src/launchpad.net/gocheck/gocheck.go:137
  in tempDir.newPath
/home/tarmac/trees/src/src/launchpad.net/gocheck/gocheck.go:159
  in C.MkDir
/home/tarmac/trees/src/launchpad.net/juju-core/juju/testing/conn.go:133
  in JujuConnSuite.SetUpTest
/home/tarmac/trees/src/launchpad.net/juju-core/juju/testing/repo.go:25
  in RepoSuite.SetUpTest

----------------------------------------------------------------------
PANIC: addmachine.go:0: AddUnitSuite.TearDownTest

... Panic: runtime error: invalid memory address or nil pointer dereference (PC=0x414321)

/usr/lib/go/src/pkg/runtime/panic.c:229
  in panic
/usr/lib/go/src/pkg/runtime/panic.c:487
  in panicstring
/usr/lib/go/src/pkg/runtime/os_linux.c:236
  in sigpanic
/home/tarmac/trees/src/launchpad.net/juju-core/state/state.go:1050
  in State.SetAdminMongoPassword
/home/tarmac/trees/src/launchpad.net/juju-core/juju/testing/conn.go:247
  in JujuConnSuite.tearDownConn
/home/tarmac/trees/src/launchpad.net/juju-core/juju/testing/conn.go:140
  in JujuConnSuite.TearDownTest
/home/tarmac/trees/src/launchpad.net/juju-core/juju/testing/repo.go:44
  in RepoSuite.TearDownTest

----------------------------------------------------------------------
PANIC: addunit_test.go:59: AddUnitSuite.TestAddUnit

... Panic: Fixture has panicked (see related PANIC)
listing available tools
found 4 tools
found 4 recent tools (version 1.0.0)
listing target bucket
found 3 tools in target; 4 tools to be copied
copying 1.0.0-defaultseries-amd64 from http://127.0.0.1:50956/tools/juju-1.0.0-defaultseries-amd64.tgz
copying tools/juju-1.0.0-defaultseries-amd64.tgz
downloaded tools/juju-1.0.0-defaultseries-amd64.tgz (0kB), uploading
download 0kB, uploading
copying 1.0.0-precise-amd64 from http://127.0.0.1:50956/tools/juju-1.0.0-precise-amd64.tgz
copying tools/juju-1.0.0-precise-amd64.tgz
downloaded tools/juju-1.0.0-precise-amd64.tgz (0kB), uploading
download 0kB, uploading
copying 1.0.0-quantal-amd64 from http://127.0.0.1:50956/tools/juju-1.0.0-quantal-amd64.tgz
copying tools/juju-1.0.0-quantal-amd64.tgz
downloaded tools/juju-1.0.0-quantal-amd64.tgz (0kB), uploading
download 0kB, uploading
copying 1.0.0-quantal-i386 from http://127.0.0.1:50956/tools/juju-1.0.0-quantal-i386.tgz
copying ...

Revision history for this message
John A Meinel (jameinel) wrote :

It would appear that gocheck uses its own "TempDir" implementation which just loops 100 times and tries to allocate a new directory. However it doesn't seed the random generator, so once we have 100 gocheck dirs, it just fails.

So I'll just resubmit this after cleaning out /tmp. We also had a lot of mongo-XXXX.sock files which this patch itself should make better.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'testing/mgo.go'
2--- testing/mgo.go 2013-07-31 08:17:33 +0000
3+++ testing/mgo.go 2013-08-21 08:28:19 +0000
4@@ -78,6 +78,7 @@
5 "--noprealloc",
6 "--smallfiles",
7 "--nojournal",
8+ "--nounixsocket",
9 }
10 server := exec.Command("mongod", mgoargs...)
11 out, err := server.StdoutPipe()

Subscribers

People subscribed via source and target branches

to status/vote changes: