summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamon Fernandez <ramon@mongodb.com>2017-10-24 17:36:28 -0400
committerRamon Fernandez <ramon@mongodb.com>2017-10-24 17:36:28 -0400
commit18007ba100d8716fea8925d373d61cb762a1e989 (patch)
treea4eead3f7129e10174fdf2eae46dc07b22d02579
parent01d212386db721d5e1ff6da3c17621180ab723cc (diff)
downloadmongo-18007ba100d8716fea8925d373d61cb762a1e989.tar.gz
Import tools: 75f2d994ce4bdcfca79d1b5e50c7d5125a6ab092 from branch master
ref: 7067f765eb..75f2d994ce for: 3.6.0 TOOLS-1820 Remove deprecated mongooplog tool
-rw-r--r--src/mongo/gotools/README.md1
-rw-r--r--src/mongo/gotools/build.bat2
-rwxr-xr-xsrc/mongo/gotools/build.sh2
-rw-r--r--src/mongo/gotools/common.yml53
-rw-r--r--src/mongo/gotools/import.data2
-rw-r--r--src/mongo/gotools/mongooplog/main/mongooplog.go94
-rw-r--r--src/mongo/gotools/mongooplog/mongooplog.go151
-rw-r--r--src/mongo/gotools/mongooplog/mongooplog_test.go135
-rw-r--r--src/mongo/gotools/mongooplog/options.go23
-rwxr-xr-xsrc/mongo/gotools/set_gopath.sh1
-rwxr-xr-xsrc/mongo/gotools/test.sh2
11 files changed, 10 insertions, 456 deletions
diff --git a/src/mongo/gotools/README.md b/src/mongo/gotools/README.md
index 589e6041db9..57a6c07c53d 100644
--- a/src/mongo/gotools/README.md
+++ b/src/mongo/gotools/README.md
@@ -7,7 +7,6 @@ MongoDB Tools
- **mongodump/mongorestore** - _Dump MongoDB backups to disk in .BSON format, or restore them to a live database_
- **mongostat** - _Monitor live MongoDB servers, replica sets, or sharded clusters_
- **mongofiles** - _Read, write, delete, or update files in [GridFS](http://docs.mongodb.org/manual/core/gridfs/)_
- - **mongooplog** - _Replay oplog entries between MongoDB servers_
- **mongotop** - _Monitor read/write activity on a mongo server_
- **mongoreplay** - _Capture, observe, and replay traffic for MongoDB_
diff --git a/src/mongo/gotools/build.bat b/src/mongo/gotools/build.bat
index 32418513a34..2b10ef7791a 100644
--- a/src/mongo/gotools/build.bat
+++ b/src/mongo/gotools/build.bat
@@ -9,7 +9,7 @@ call set_gopath.bat
if not exist "%cd%\bin" mkdir "%cd%\bin"
-for %%i in (bsondump, mongostat, mongofiles, mongoexport, mongoimport, mongorestore, mongodump, mongotop, mongooplog) do (
+for %%i in (bsondump, mongostat, mongofiles, mongoexport, mongoimport, mongorestore, mongodump, mongotop) do (
echo Building %%i
go build -o "%cd%\bin\%%i.exe" "%cd%\%%i\main\%%i.go"
diff --git a/src/mongo/gotools/build.sh b/src/mongo/gotools/build.sh
index 8fe2511fa7d..637c4b6704a 100755
--- a/src/mongo/gotools/build.sh
+++ b/src/mongo/gotools/build.sh
@@ -20,7 +20,7 @@ rm -rf vendor/pkg
. ./set_gopath.sh
mkdir -p bin
-for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog mongoreplay; do
+for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongoreplay; do
echo "Building ${i}..."
go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"
./bin/$i --version
diff --git a/src/mongo/gotools/common.yml b/src/mongo/gotools/common.yml
index d0a7c28abbc..f5de311b58e 100644
--- a/src/mongo/gotools/common.yml
+++ b/src/mongo/gotools/common.yml
@@ -469,7 +469,7 @@ functions:
done
#TODO mongotop needs a test
- for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do
+ for i in mongoimport mongoexport mongostat mongorestore mongodump mongofiles; do
cd $i
COVERAGE_ARGS=""
if [ "${run_coverage}" ]; then
@@ -506,7 +506,7 @@ functions:
echo "${create_mongod_users_command}" | ./bin/mongo${extension} ${mongo_args} admin
fi;
- for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do
+ for i in mongoimport mongoexport mongostat mongorestore mongodump mongofiles; do
cd $i
COVERAGE_ARGS=""
if [ "${run_coverage}" ]; then
@@ -539,7 +539,7 @@ functions:
. ./set_gopath.sh
- for i in mongoimport mongoexport mongostat mongooplog mongorestore mongodump mongofiles; do
+ for i in mongoimport mongoexport mongostat mongorestore mongodump mongofiles; do
cd $i
perl -pe 's/.*src/github.com\/mongodb\/mongo-tools/' coverage_$i.out > coverage_$i_rewrite.out
${gorootvars} go tool cover -html=coverage_$i_rewrite.out -o coverage_$i.html
@@ -788,7 +788,7 @@ pre:
script: |
set -x
set -v
- ${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongooplog; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
+ ${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
rm -rf src /data/db/*
exit 0
@@ -802,7 +802,7 @@ post:
script: |
set -x
set -v
- ${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongooplog; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
+ ${killall_mci|pkill -9 mongo; pkill -9 mongodump; pkill -9 mongoexport; pkill -9 mongoimport; pkill -9 mongofiles; pkill -9 mongorestore; pkill -9 mongostat; pkill -9 mongotop; pkill -9 mongod; pkill -9 mongos; pkill -f buildlogger.py; pkill -f smoke.py} >/dev/null 2>&1
exit 0
- command: gotest.parse_files
params:
@@ -827,7 +827,7 @@ timeout:
# don't attempt to abort on any distro which has a special way of
# killing everything (i.e. using taskkill on Windows)
if [ "${killall_mci}" = "" ]; then
- all_tools="bsondump mongodump mongoexport mongofiles mongoimport mongooplog mongorestore mongostat mongotop"
+ all_tools="bsondump mongodump mongoexport mongofiles mongoimport mongorestore mongostat mongotop"
# send SIGABRT to print a stacktrace for any hung tool
pkill -ABRT "^($(echo -n $all_tools | tr ' ' '|'))\$"
# git the processes a second or two to dump their stacks
@@ -893,13 +893,6 @@ tasks:
- func: "upload tool"
vars:
tool: mongoimport
- # mongooplog
- - func: "build tool"
- vars:
- tool: mongooplog
- - func: "upload tool"
- vars:
- tool: mongooplog
# mongorestore
- func: "build tool"
vars:
@@ -1000,9 +993,6 @@ tasks:
tool: mongorestore
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "run legacy tests"
vars:
@@ -1036,9 +1026,6 @@ tasks:
tool: mongorestore
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "run legacy tests"
vars:
@@ -1072,9 +1059,6 @@ tasks:
tool: mongorestore
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "run legacy tests"
vars:
@@ -1112,9 +1096,6 @@ tasks:
tool: mongorestore
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "run legacy tests"
vars:
@@ -1180,9 +1161,6 @@ tasks:
tool: mongotop
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "fetch tool"
vars:
@@ -1221,9 +1199,6 @@ tasks:
tool: mongotop
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "fetch tool"
vars:
@@ -1263,9 +1238,6 @@ tasks:
tool: mongotop
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "fetch tool"
vars:
@@ -1305,9 +1277,6 @@ tasks:
tool: mongotop
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "fetch tool"
vars:
@@ -1442,9 +1411,6 @@ tasks:
tool: mongotop
- func: "fetch tool"
vars:
- tool: mongooplog
- - func: "fetch tool"
- vars:
tool: mongofiles
- func: "fetch tool"
vars:
@@ -1490,13 +1456,6 @@ tasks:
params:
updates:
- key: "coverage_pkg"
- value: "mongooplog"
- - func: "upload html coverage"
- - func: "upload text coverage"
- - command: expansions.update
- params:
- updates:
- - key: "coverage_pkg"
value: "mongodump"
- func: "upload html coverage"
- func: "upload text coverage"
diff --git a/src/mongo/gotools/import.data b/src/mongo/gotools/import.data
index 081df338405..64c927394b4 100644
--- a/src/mongo/gotools/import.data
+++ b/src/mongo/gotools/import.data
@@ -1,5 +1,5 @@
{
- "commit": "7067f765eb93ff5e1c601fc57317e68eda1978a5",
+ "commit": "75f2d994ce4bdcfca79d1b5e50c7d5125a6ab092",
"github": "mongodb/mongo-tools.git",
"vendor": "tools",
"branch": "master"
diff --git a/src/mongo/gotools/mongooplog/main/mongooplog.go b/src/mongo/gotools/mongooplog/main/mongooplog.go
deleted file mode 100644
index c038db057da..00000000000
--- a/src/mongo/gotools/mongooplog/main/mongooplog.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Main package for the mongooplog tool.
-package main
-
-import (
- "github.com/mongodb/mongo-tools/common/db"
- "github.com/mongodb/mongo-tools/common/log"
- "github.com/mongodb/mongo-tools/common/options"
- "github.com/mongodb/mongo-tools/common/signals"
- "github.com/mongodb/mongo-tools/common/util"
- "github.com/mongodb/mongo-tools/mongooplog"
- "os"
-)
-
-func main() {
- // initialize command line options
- opts := options.New("mongooplog", mongooplog.Usage,
- options.EnabledOptions{Auth: true, Connection: true, Namespace: false, URI: true})
-
- // add the mongooplog-specific options
- sourceOpts := &mongooplog.SourceOptions{}
- opts.AddOptions(sourceOpts)
-
- log.Logvf(log.Always, "warning: mongooplog is deprecated, and will be removed completely in a future release")
-
- // parse the command line options
- args, err := opts.ParseArgs(os.Args[1:])
- if err != nil {
- log.Logvf(log.Always, "error parsing command line options: %v", err)
- log.Logvf(log.Always, "try 'mongooplog --help' for more information")
- os.Exit(util.ExitBadOptions)
- }
-
- if len(args) != 0 {
- log.Logvf(log.Always, "positional arguments not allowed: %v", args)
- log.Logvf(log.Always, "try 'mongooplog --help' for more information")
- os.Exit(util.ExitBadOptions)
- }
-
- // print help, if specified
- if opts.PrintHelp(false) {
- return
- }
-
- // print version, if specified
- if opts.PrintVersion() {
- return
- }
-
- // init logger
- log.SetVerbosity(opts.Verbosity)
- signals.Handle()
-
- // verify uri options and log them
- opts.URI.LogUnsupportedOptions()
-
- // validate the mongooplog options
- if sourceOpts.From == "" {
- log.Logvf(log.Always, "command line error: need to specify --from")
- os.Exit(util.ExitBadOptions)
- }
-
- // create a session provider for the destination server
- sessionProviderTo, err := db.NewSessionProvider(*opts)
- if err != nil {
- log.Logvf(log.Always, "error connecting to destination host: %v", err)
- os.Exit(util.ExitError)
- }
- defer sessionProviderTo.Close()
-
- // create a session provider for the source server
- opts.Connection.Host = sourceOpts.From
- opts.Connection.Port = ""
- sessionProviderFrom, err := db.NewSessionProvider(*opts)
- if err != nil {
- log.Logvf(log.Always, "error connecting to source host: %v", err)
- os.Exit(util.ExitError)
- }
- defer sessionProviderFrom.Close()
-
- // initialize mongooplog
- oplog := mongooplog.MongoOplog{
- ToolOptions: opts,
- SourceOptions: sourceOpts,
- SessionProviderFrom: sessionProviderFrom,
- SessionProviderTo: sessionProviderTo,
- }
-
- // kick it off
- if err := oplog.Run(); err != nil {
- log.Logvf(log.Always, "error: %v", err)
- os.Exit(util.ExitError)
- }
-
-}
diff --git a/src/mongo/gotools/mongooplog/mongooplog.go b/src/mongo/gotools/mongooplog/mongooplog.go
deleted file mode 100644
index 67f7a4e9d2f..00000000000
--- a/src/mongo/gotools/mongooplog/mongooplog.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Package mongooplog polls operations from the replication oplog of one server, and applies them to another.
-package mongooplog
-
-import (
- "fmt"
- "github.com/mongodb/mongo-tools/common/db"
- "github.com/mongodb/mongo-tools/common/log"
- "github.com/mongodb/mongo-tools/common/options"
- "github.com/mongodb/mongo-tools/common/util"
- "gopkg.in/mgo.v2"
- "gopkg.in/mgo.v2/bson"
- "time"
-)
-
-// MongoOplog is a container for the user-specified options for running mongooplog.
-type MongoOplog struct {
- // standard tool options
- ToolOptions *options.ToolOptions
-
- // mongooplog-specific options
- SourceOptions *SourceOptions
-
- // session provider for the source server
- SessionProviderFrom *db.SessionProvider
-
- // session provider for the destination server
- SessionProviderTo *db.SessionProvider
-}
-
-// Run executes the mongooplog program.
-func (mo *MongoOplog) Run() error {
-
- // split up the oplog namespace we are using
- oplogDB, oplogColl, err :=
- util.SplitAndValidateNamespace(mo.SourceOptions.OplogNS)
-
- if err != nil {
- return err
- }
-
- // the full oplog namespace needs to be specified
- if oplogColl == "" {
- return fmt.Errorf("the oplog namespace must specify a collection")
- }
-
- log.Logvf(log.DebugLow, "using oplog namespace `%v.%v`", oplogDB, oplogColl)
-
- // connect to the destination server
- toSession, err := mo.SessionProviderTo.GetSession()
- if err != nil {
- return fmt.Errorf("error connecting to destination db: %v", err)
- }
- defer toSession.Close()
- toSession.SetSocketTimeout(0)
-
- // purely for logging
- destServerStr := mo.ToolOptions.Host
- if mo.ToolOptions.Port != "" {
- destServerStr = destServerStr + ":" + mo.ToolOptions.Port
- }
- log.Logvf(log.DebugLow, "successfully connected to destination server `%v`", destServerStr)
-
- // connect to the source server
- fromSession, err := mo.SessionProviderFrom.GetSession()
- if err != nil {
- return fmt.Errorf("error connecting to source db: %v", err)
- }
- defer fromSession.Close()
- fromSession.SetSocketTimeout(0)
-
- log.Logvf(log.DebugLow, "successfully connected to source server `%v`", mo.SourceOptions.From)
-
- // set slave ok
- fromSession.SetMode(mgo.Eventual, true)
-
- // get the tailing cursor for the source server's oplog
- tail := buildTailingCursor(fromSession.DB(oplogDB).C(oplogColl),
- mo.SourceOptions)
- defer tail.Close()
-
- // read the cursor dry, applying ops to the destination
- // server in the process
- oplogEntry := &db.Oplog{}
- res := &db.ApplyOpsResponse{}
-
- log.Logv(log.DebugLow, "applying oplog entries...")
-
- opCount := 0
-
- for tail.Next(oplogEntry) {
-
- // skip noops
- if oplogEntry.Operation == "n" {
- log.Logvf(log.DebugHigh, "skipping no-op for namespace `%v`", oplogEntry.Namespace)
- continue
- }
- opCount++
-
- // prepare the op to be applied
- opsToApply := []db.Oplog{*oplogEntry}
-
- // apply the operation
- err := toSession.Run(bson.M{"applyOps": opsToApply}, res)
-
- if err != nil {
- return fmt.Errorf("error applying ops: %v", err)
- }
-
- // check the server's response for an issue
- if !res.Ok {
- return fmt.Errorf("server gave error applying ops: %v", res.ErrMsg)
- }
- }
-
- // make sure there was no tailing error
- if err := tail.Err(); err != nil {
- return fmt.Errorf("error querying oplog: %v", err)
- }
-
- log.Logvf(log.DebugLow, "done applying %v oplog entries", opCount)
-
- return nil
-}
-
-// get the cursor for the oplog collection, based on the options
-// passed in to mongooplog
-func buildTailingCursor(oplog *mgo.Collection,
- sourceOptions *SourceOptions) *mgo.Iter {
-
- // how many seconds in the past we need
- secondsInPast := time.Duration(sourceOptions.Seconds) * time.Second
- // the time threshold for oplog queries
- threshold := time.Now().Add(-secondsInPast)
- // convert to a unix timestamp (seconds since epoch)
- thresholdAsUnix := threshold.Unix()
-
- // shift it appropriately, to prepare it to be converted to an
- // oplog timestamp
- thresholdShifted := uint64(thresholdAsUnix) << 32
-
- // build the oplog query
- oplogQuery := bson.M{
- "ts": bson.M{
- "$gte": bson.MongoTimestamp(thresholdShifted),
- },
- }
-
- // TODO: wait time
- return oplog.Find(oplogQuery).Iter()
-
-}
diff --git a/src/mongo/gotools/mongooplog/mongooplog_test.go b/src/mongo/gotools/mongooplog/mongooplog_test.go
deleted file mode 100644
index de825b2117f..00000000000
--- a/src/mongo/gotools/mongooplog/mongooplog_test.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package mongooplog
-
-import (
- "github.com/mongodb/mongo-tools/common/db"
- "github.com/mongodb/mongo-tools/common/options"
- "github.com/mongodb/mongo-tools/common/testutil"
- . "github.com/smartystreets/goconvey/convey"
- "gopkg.in/mgo.v2"
- "gopkg.in/mgo.v2/bson"
- "testing"
-)
-
-func TestBasicOps(t *testing.T) {
- testutil.VerifyTestType(t, testutil.IntegrationTestType)
-
- var opts *options.ToolOptions
- var sourceOpts *SourceOptions
-
- Convey("When replicating operations", t, func() {
- ssl := testutil.GetSSLOptions()
- auth := testutil.GetAuthOptions()
-
- // specify localhost:33333 as the destination host
- opts = &options.ToolOptions{
- Namespace: &options.Namespace{},
- SSL: &ssl,
- Auth: &auth,
- Kerberos: &options.Kerberos{},
- Connection: &options.Connection{
- Host: "localhost",
- Port: db.DefaultTestPort,
- },
- }
-
- // specify localhost:33333 as the source host
- sourceOpts = &SourceOptions{
- Seconds: 84600, // the default
- OplogNS: "local.oplog.rs", // the default
- }
-
- Convey("all operations should be applied correctly, without"+
- " error", func() {
-
- // set the "oplog" we will use
- sourceOpts.OplogNS = "mongooplog_test.oplog"
-
- // initialize a session provider for the source
- sourceSP, err := db.NewSessionProvider(*opts)
- So(err, ShouldBeNil)
-
- // initialize a session provider for the destination
- destSP, err := db.NewSessionProvider(*opts)
- So(err, ShouldBeNil)
-
- // clear out the oplog
- sess, err := sourceSP.GetSession()
- So(err, ShouldBeNil)
- defer sess.Close()
- oplogColl := sess.DB("mongooplog_test").C("oplog")
- oplogColl.DropCollection()
-
- // create the oplog as a capped collection, so it can be tailed
- So(sess.DB("mongooplog_test").Run(
- bson.D{{"create", "oplog"}, {"capped", true},
- {"size", 10000}},
- bson.M{}),
- ShouldBeNil)
-
- // create the collection we are testing against (ignore errors)
- sess.DB("mongooplog_test").C("data").Create(&mgo.CollectionInfo{})
-
- // clear out the collection we'll use for testing
- testColl := sess.DB("mongooplog_test").C("data")
- _, err = testColl.RemoveAll(bson.M{})
- So(err, ShouldBeNil)
-
- // insert some "ops" into the oplog to be found and applied
- obj1 := bson.D{{"_id", 3}}
- op1 := &db.Oplog{
- Timestamp: bson.MongoTimestamp(1<<63 - 1), // years in the future
- HistoryID: 100,
- Version: 2,
- Operation: "i",
- Namespace: "mongooplog_test.data",
- Object: obj1,
- }
- So(oplogColl.Insert(op1), ShouldBeNil)
- obj2 := bson.D{{"_id", 4}}
- op2 := &db.Oplog{
- Timestamp: bson.MongoTimestamp(1<<63 - 1), // years in the future
- HistoryID: 200,
- Version: 2,
- Operation: "i",
- Namespace: "mongooplog_test.data",
- Object: obj2,
- }
- So(oplogColl.Insert(op2), ShouldBeNil)
-
- // this one should be filtered out, since it occurred before the
- // threshold
- obj3 := bson.D{{"_id", 3}}
- op3 := &db.Oplog{
- Timestamp: bson.MongoTimestamp(1<<62 - 1), // more than 1 day in the past
- HistoryID: 300,
- Version: 2,
- Operation: "i",
- Namespace: "mongooplog_test.data",
- Object: obj3,
- }
- So(oplogColl.Insert(op3), ShouldBeNil)
-
- // initialize the mongooplog
- oplog := MongoOplog{
- ToolOptions: opts,
- SourceOptions: sourceOpts,
- SessionProviderFrom: sourceSP,
- SessionProviderTo: destSP,
- }
-
- // run it
- So(oplog.Run(), ShouldBeNil)
-
- // the operations should have been applied
- var inserted []bson.M
- So(testColl.Find(bson.M{}).Sort("_id").All(&inserted),
- ShouldBeNil)
- So(len(inserted), ShouldEqual, 2)
- So(inserted[0]["_id"], ShouldEqual, 3)
- So(inserted[1]["_id"], ShouldEqual, 4)
-
- })
-
- })
-
-}
diff --git a/src/mongo/gotools/mongooplog/options.go b/src/mongo/gotools/mongooplog/options.go
deleted file mode 100644
index b7037e165d8..00000000000
--- a/src/mongo/gotools/mongooplog/options.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package mongooplog
-
-import (
- "gopkg.in/mgo.v2/bson"
-)
-
-var Usage = `--from <remote host> <options>
-
-Poll operations from the replication oplog of one server, and apply them to another.
-
-See http://docs.mongodb.org/manual/reference/program/mongooplog/ for more information.`
-
-// SourceOptions defines the set of options to use in retrieving oplog data from the source server.
-type SourceOptions struct {
- From string `long:"from" value-name:"<hostname>" description:"specify the host for mongooplog to retrive operations from"`
- OplogNS string `long:"oplogns" value-name:"<namespace>" description:"specify the namespace in the --from host where the oplog lives (default 'local.oplog.rs') " default:"local.oplog.rs" default-mask:"-"`
- Seconds bson.MongoTimestamp `long:"seconds" value-name:"<seconds>" short:"s" description:"specify a number of seconds for mongooplog to pull from the remote host" default:"86400" default-mask:"-"`
-}
-
-// Name returns a human-readable group name for source options.
-func (_ *SourceOptions) Name() string {
- return "source"
-}
diff --git a/src/mongo/gotools/set_gopath.sh b/src/mongo/gotools/set_gopath.sh
index 24b59a324e8..693c0e618a3 100755
--- a/src/mongo/gotools/set_gopath.sh
+++ b/src/mongo/gotools/set_gopath.sh
@@ -29,7 +29,6 @@ setgopath() {
cp -r `pwd`/mongoexport .gopath/src/$TOOLS_PKG
cp -r `pwd`/mongofiles .gopath/src/$TOOLS_PKG
cp -r `pwd`/mongoimport .gopath/src/$TOOLS_PKG
- cp -r `pwd`/mongooplog .gopath/src/$TOOLS_PKG
cp -r `pwd`/mongorestore .gopath/src/$TOOLS_PKG
cp -r `pwd`/mongostat .gopath/src/$TOOLS_PKG
cp -r `pwd`/mongotop .gopath/src/$TOOLS_PKG
diff --git a/src/mongo/gotools/test.sh b/src/mongo/gotools/test.sh
index e30ea3debdc..6cbf06fb438 100755
--- a/src/mongo/gotools/test.sh
+++ b/src/mongo/gotools/test.sh
@@ -20,7 +20,7 @@ rm -rf vendor/pkg
. ./set_gopath.sh
mkdir -p bin
-for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog mongoreplay; do
+for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongoreplay; do
echo "Testing ${i}..."
(cd $i && go test)
done