PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 12th of March, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:03:47] <daidoji> GothAlice: I think mongo-connector looks a bit too automagic for what I have in mind
[00:04:00] <daidoji> I'm looking for something more like https://github.com/sheharyarn/mongo-sync but with a bit more battle testing
[00:04:28] <GothAlice> My typical approach is to temporarily add a hidden replica, let it sync, and stop it when it's done. Bam, instant local copy.
[00:05:50] <daidoji> and then how do I then push that replica to production db?
[00:05:57] <daidoji> set it as master on prod and then sync again?
[00:06:21] <grazfather> GothAlice: Yeah I thought about it a lot and I think we need a new collection :(
[00:33:10] <GrubLord> Hi all
[00:33:34] <GrubLord> I’m doing some mongodb admin and I’d like help with a little issue - anyone around?
[00:33:50] <GothAlice> Probably several. Ask, don't ask to ask. What's the problem?
[00:34:12] <GrubLord> Cool. =) So, I’ve been following the LDAP instructions here: http://docs.mongodb.org/manual/tutorial/configure-ldap-sasl-openldap/
[00:34:34] <GrubLord> Everything works nicely, up to the point where I do the auth() function check at the bottom
[00:34:45] <GrubLord> Where I get “Error: 2 PLAIN mechanism support not compiled into client library.”
[00:35:21] <GrubLord> What I’d like to know is - where is this mechanism not compiled into? MongoDB itself? saslauthd? Do I have to recompile mongo from source?
[00:35:59] <GrubLord> On here: http://search.cpan.org/~mongodb/MongoDB-v0.707.2.0/lib/MongoDB/MongoClient.pm I see an option for building Mongo with SASL via Perl, but the previous page seems to imply that’s not necessary.
[00:36:31] <GrubLord> I’m running MongoDB v2.6.8, on CentOS 7
[00:37:11] <GrubLord> Installed it via the Mongo RPMs.
[00:38:18] <GothAlice> Hmm.
[00:38:50] <GothAlice> Where, exactly, are you seeing that error? Which log?
[00:40:26] <GrubLord> It’s just
[00:40:39] <GrubLord> when I do the db.getSiblingDB(“$external”).auth call
[00:40:41] <GrubLord> in the mongo console
[00:41:18] <GrubLord> also, adding the “auth=true
[00:41:18] <GrubLord> setParameter=saslauthdPath=/<some>/<path>/saslauthd/mux
[00:41:19] <GrubLord> setParameter=authenticationMechanisms=PLAIN” to the mongod.conf causes it to crash on startup
[00:44:46] <GrubLord> Thanks for your help
[00:44:47] <GothAlice> I'd expect to see client crashes if the CXX driver is compiled without --use-sasl-client, and issues if the installed SASL lib wasn't compiled with PLAIN support. Similarly, server-side.
[00:45:11] <GrubLord> hmm
[00:45:13] <GrubLord> CXX driver?
[00:46:24] <GrubLord> What confuses me is that the saslauthd conf file is supposed to be set to MECH=ldap… saslauthd doesn’t even list a “PLAIN” mechanism in its list of mechanisms.
[00:46:27] <GrubLord> i.e. [root@localhost system]# saslauthd -v
[00:46:27] <GrubLord> saslauthd 2.1.26
[00:46:28] <GrubLord> authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap httpform
[00:46:46] <GrubLord> That’s even though I installed the saslauthd-plain package…
[01:04:28] <GrubLord> I think I’ve tracked something down…
[01:04:33] <GrubLord> running this: mongod --dbpath /var/lib/mongo/ --auth --setParameter saslauthdPath="/var/run/saslauthd/mux" --setParameter authenticationMechanisms=PLAIN
[01:04:43] <GrubLord> gives me: BadValue Illegal --setParameter parameter: "authenticationMechanisms”
[01:04:57] <GrubLord> Even though that’s exactly how they do it in: http://docs.mongodb.org/manual/tutorial/configure-ldap-sasl-openldap/
[01:48:09] <drlewis> Is there a way to slow down mongoimport to avoid disrupting my production servers?
[02:14:33] <GothAlice> drlewis: You could perform the inserts manually.
[02:14:53] <GothAlice> Then you would have full control over any rate limiting.
[04:12:15] <jclif> Is anyone using MMS for backups on large datasets?
[04:21:01] <Freman> so... mongo is pretty magical... I have a small collection... { "name" : "role1", "description" : "a test role", "permit" : [ "scheduled", "persistent" ], "matches" : [ "shan" ] }
[04:21:24] <Freman> ^ with records like that (getting ahead of myself)
[04:21:50] <joannac> jclif: yes
[04:21:58] <Freman> I'd like to do a find where doc.matches.filter(function(match){ var re = new RegExp(matches, 'i'); return match.test($GIVENARG) });
[04:22:01] <Freman> possible?
[04:22:20] <Freman> (ie: matches is a list of regular expressions that I want to match against)
[04:22:45] <joannac> I guess. why not run the queries one by one?
[04:23:33] <joannac> as in, run the regexes one by one on the whole collection
[04:25:03] <Freman> db.collection.find({matches ~ 'servernamedshannon'}) :D
[04:27:37] <Freman> or am I going to have to grab the entire collection and do it in app? (not really a problem, it's a small collection and it'll never be very big, but I thought it'd be cool to do it in mongo :D)
[04:33:02] <jclif> We're trying to get a 1.6 TB dataset from MMS but it's projected to take around 50 hours; is this something that people just grin and bare?
[04:37:01] <joannac> jclif: that's 8mb/s which is pretty slow
[04:37:39] <Freman> dn.cluster.find({$where: "var found = this.matches.filter(function(match){ var re = new RegExp(match, 'i'); return re.test('someshanserver'); }); return found.length > 0;"}) works :D
[04:37:41] <joannac> MMS outbound is faster than that .. are you maxing out your netowrk?
[04:41:54] <jclif> 2000 ios
[04:44:15] <joannac> jclif: pull or push restore?
[04:51:11] <jclif> we tried both
[04:54:18] <joannac> jclif: PM
[04:54:21] <joannac> d you
[05:51:55] <arussel> is there a way to have a selector that returns an object but not its fields (without know all the fields in advance) ? something like {"myobj.*" : 0}
[05:56:04] <cbuckley> hi there, I'm having trouble updating my mongodb insall on CentOS 6 to 2.4.13. yum keeps telling me its obsoleted by mongodb-org 2.6.8. Does anyone have any information on how to accomplish this, or have a URL I can look at?
[06:03:44] <joannac> cbuckley: http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/#manage-installed-versions
[06:04:49] <joannac> arussel: why can't you do {myobj : 0}
[07:47:23] <kali> weird
[07:47:40] <kali> somebody knows what this mean: "08:41 -!- kali #mongodb Cannot change nickname while banned on channel" ?
[07:57:13] <joannac> kali: did you try to change your nick?
[08:11:14] <kali> yeah, i did, i was on my fallback "kalink" after a deco/reco
[08:11:24] <kali> i had to leave, change nick and come back
[08:11:52] <kali> no biggie, just trying to understand
[08:12:45] <joannac> oh... i think i get it
[08:12:48] <joannac> let's take it to PM
[08:22:52] <Cygn> Is there any function in the mongodb query syntax that accepts a string and returns a regex expression? f.e. "/[a-Z]/" would return /[a-Z]/ ?
[08:25:02] <kali> Cygn: what language ?
[08:26:25] <Cygn> kali: the mongo shell?
[08:27:41] <kali> javascript. new RegExp("/[a-Z]/") should
[11:44:40] <Kamuela> love me some mongo
[11:53:32] <tiwest> I've just upgraded php from 5.4.* to 5.6.6 on a CentOS 5.6 box and now it looks like the MongoDB driver is out of date. Is anyone able to point me in the right direction for upgrading that?
[11:53:42] <tiwest> CentOS 6.5 even
[11:53:54] <Derick> tiwest: "pecl install mongo"
[11:53:59] <Derick> or rather, "pecl upgrade mongo"
[11:54:03] <tiwest> Thank you!
[12:16:32] <Freman> '$where': "return this.matches.filter(function(m){new RegExp(m, 'i').test('someshanserver')}).length > 0" :D
[13:04:56] <klevison> Is there a "tool" way to show easily a query (that has loc fields) into a map.
[13:13:08] <steerio> hi
[13:13:53] <steerio> is this behaviour (expected order of keys in compound ID) normal or a bug? http://pastie.org/private/gtbgwgtkll8wyccuqghkg
[13:14:58] <steerio> this means I can only query safely as { "_id.s": "ABC", "_id.b": 1 }, which does not use the _id index
[13:16:52] <cheeser> document order matters
[13:17:09] <cheeser> what gets indexed is the byte sequence of the id
[13:17:46] <steerio> for me it's weird that a key->value map is treated as ordered
[13:18:03] <steerio> in most languages I cannot guarantee the order in which keys of a map (hash, object) will show up in BSON/JSON
[13:18:05] <cheeser> value is the document and it's treated atomically
[13:18:23] <cheeser> all the drivers accomodate for this.
[13:18:30] <cheeser> all the mongodb ones anyway
[13:18:42] <steerio> I'm not sure I understand you
[13:19:28] <cheeser> the drivers support ordered maps so that queries will work.
[13:19:52] <steerio> I have a compound ID and I can only query it if the query doc has the keys in the same order as the ID had when it was inserted
[13:20:06] <steerio> right. does this mean {a:1, b:1} and {b:1, a:1} are different IDs?
[13:20:15] <cheeser> yes
[13:20:19] <steerio> wow.
[13:20:48] <cheeser> i agree it's unfortunate but it's a performance thing.
[13:20:51] <steerio> even though in any sane language they are treated as equal
[13:21:07] <cheeser> we're not talking langauges here. we're talking databases and indexing.
[13:21:12] <steerio> yeah, well, so we're trying to use something else than composite IDs then
[13:21:29] <cheeser> i've never really felt the need for a compound ID, personally.
[13:21:33] <steerio> I see, but the databases are usually queried from some kind of other environment
[13:21:58] <cheeser> yes but you're trying to apply constraints from one domain on to another.
[13:22:20] <cheeser> yes, it could've been implemented differently but it wasn't. this is the world as it is.
[13:23:33] <steerio> well, thanks.
[13:23:37] <cheeser> np
[13:24:48] <android6011> I need to create a query that grabs records for 2 days and on both days where the time is between 3:00PM and 5:00PM, if $hour and $minute the best way to do this?
[13:25:14] <Derick> how did you store the time?
[13:25:23] <Derick> (and date)
[13:25:24] <android6011> date and time are in one ISODate
[13:26:00] <Derick> i'd aggregate, with the first step ($match) selecting the two dates
[13:26:13] <Derick> the 2nd step, project to get the hour out into a new field
[13:26:26] <Derick> and then in the third step, match the hour against 15 and 16
[13:26:29] <cheeser> then check for 15 or 16
[13:26:31] <cheeser> :D
[13:26:43] <android6011> the user can select minutes as well so should i just project out like hhmm ?
[13:26:58] <Derick> that works too
[13:28:15] <android6011> ok thanks. also im on ubuntu using the mongo apt repo but when i try to set a 2D index i get unkown index plugin 2D
[13:29:04] <Derick> how old is that mongodb?
[13:29:06] <Derick> 2.2 ?
[13:29:25] <android6011> 2.6.7?
[13:29:35] <android6011> db.version()
[13:29:48] <Derick> can you show how you create the index?
[13:30:26] <android6011> db.events.createIndex({location:'2D'});
[13:30:43] <android6011> tried without the quotes too but 'unexpected token ILLEGAL'
[13:31:19] <Derick> ah
[13:31:21] <android6011> on the record there is a location prop that looks like location: { "lng": xxx, "lat": yyy }
[13:31:26] <Derick> android6011: first of all, you want: 2dsphere
[13:31:31] <Derick> (not 2d, or 2D)
[13:31:37] <Derick> and you need to store your location as:
[13:31:49] <Derick> location: [ longValue, latValue ]
[13:31:52] <Derick> erm
[13:31:53] <Derick> sorry
[13:32:13] <Derick> location: { type: 'Point', 'coordinates' : [ longValue, latValue ] }
[13:32:19] <Derick> (geojson format)
[13:32:41] <android6011> ah ok. thought i read the format i have was supported
[13:32:46] <Derick> the "2d" index and the old format is deprecated
[13:33:47] <android6011> ok ty
[13:35:08] <android6011> is there a recommended way of migrating data from postgresql into mongo? right now i have just been writing code to transform the data
[13:36:04] <Derick> android6011: that's probably the best way, but do realize that you often need to change your data schema too, to make optimal use of mongodb
[13:37:01] <android6011> ya i have been thats why i figured just writing code would be the best way
[13:38:06] <cheeser> that's what i ended up doing. thankfully my data was mostly flat and not terribly relational
[13:38:37] <android6011> also for things that we had before like "reference types" a table with type values like event_types, the text on those is very small so I am assuming its best just to put the type on each doc rather than have to requery by id to pull the type, especially when a doc might have 4 or 5 ref values on it?
[13:43:23] <d0x> Any ideas why com.mongodb.DBObject isn't available on my emr cluster after putting the dependencies into the lib folder (like described on the mongo-hadoop connector emr example?) I put this question also to stackoverflow: http://stackoverflow.com/questions/28998333/connect-hadoophive-with-mongodb-on-aws-emr-class-not-found-com-mongodb-dbobjec
[13:43:36] <jokke> hello
[13:44:01] <jokke> is it possible to make a query with the $in operator and preserve the order of the given array?
[13:45:17] <jokke> as in db.books.find({_id: {$in: [ObjectId('someid'), ObjectId('someotherid'), ObjectId('thirdid')]}})
[13:45:44] <jokke> which would return the books in order 'someid', 'someotherid', 'thirdid'
[14:15:20] <dbclk> folks I use the rs.reconfig to remove a replic set from my primary that's complaining it can't connect to primary over port 27017
[14:16:01] <dbclk> problem is now, on the secondary machine, when I try to reconnect to primary it's still complaining about the port but, when I go inside the mongo terminal, it's marked as rs0:remove
[14:16:03] <dbclk> any ideas?
[14:43:13] <spuz> Does the getN() method in the Java api ever return anything other than 0 after a document is inserted? http://api.mongodb.org/java/2.6/com/mongodb/WriteResult.html#getN%28%29
[14:43:34] <spuz> I seem to be receiving 0 even after a successful insert
[14:52:58] <Diegao> hi
[14:53:30] <Diegao> is there a way to run a distinct wich returns a list of documents instead of the list of ids? I'm using mongoengine for python
[15:10:50] <pamp> hi, when querying with find, its possible using statments like IF for projection ?
[15:15:16] <GothAlice> pamp: Alas, $cond, which sounds like what you want, is an aggregate operator. Ref: http://docs.mongodb.org/manual/reference/operator/aggregation/cond/
[15:16:49] <pamp> thanks :)
[16:58:48] <technoid_> Anyone happen to know if the rockmongo project is still active?
[17:04:05] <boutell> Hi. I am inserting multiple documents with a single insert() call. There is a lot of confusing information about the limitations. Am I restricted to no more than 1,000 documents per insert? What is the maximum combined size of the documents? Right now my code just starts a new batch if the total raw BSON size of the documents exceeds 16MB, but I’m getting complaints that writes are being refused for batches near that
[17:04:24] <boutell> I suppose inserting *one* 16MB document *must* be allowed, because that is the per-document limit.
[17:04:30] <boutell> (these are inserts in raw mode.)
[17:05:15] <boutell> I am guessing that there is overhead per each document in the “batch,” which is pushing me just over 16MB if, for instance, there are four documents that are exactly 4MB. But I don’t know how to account for the overhead correctly. Any thoughts?
[17:08:30] <technoid_> rockmongo.com appears to be down, PHPMoAdmin just had a vulnerability found...what web based gui for managing Mongo would anyone recommend?
[17:13:18] <krisfremen> nothing that is written in php
[17:31:02] <aliasc> hi,
[17:38:37] <schu> hi there. how can I install mongodb 2.4.9 on a debian system via apt? (I need this special release but apt always tries to force me to use 3.0.0)
[17:46:03] <Boomtime> schu: try this: http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-debian/#manage-installed-versions
[17:47:00] <schu> Boomtime: awesome, thanks!
[17:47:13] <ndb> hi, I have a string field '00:02:04.234', is there some way to apply a function on all rows using a find?
[17:47:50] <ndb> I want to compare it with $lt, $gt seconds as numbers (360 for example), but need to convert it first
[17:48:06] <GothAlice> ndb: You're somewhat pooched by virtue of the fact that you're storing those as strings.
[17:48:53] <ndb> ok, just can't change it now
[17:49:11] <GothAlice> Storing them as proper date objects, just ignoring the date component, would be both more efficient than storing them as strings like that, but also allow you to use http://docs.mongodb.org/manual/reference/operator/aggregation/#date-operators
[17:49:42] <ndb> GothAlice: yes, I'm aware of the fact, just can't change it ASAP
[17:50:04] <GothAlice> ndb: I feel that pain. Alas, until you do, you can't do what you want.
[17:50:27] <ndb> gonna 2 finds so
[17:50:44] <ndb> or filter it after, what is pretty much crap
[17:51:09] <ndb> GothAlice: but ok, thanks
[17:53:50] <wc-> hi all, currently in the process of upgrading to mongo 3, i am using user authorization and having some issues with connecting to the mongod v3 from a mongo client v2.0.4
[17:54:29] <wc-> were there some authorization-related changes in mongod v3 that require clients, code libraries etc to be updated?
[17:54:42] <GothAlice> wc-: Yes.
[17:55:30] <GothAlice> wc-: http://docs.mongodb.org/manual/core/authentication/#authentication-mechanisms
[17:55:51] <GothAlice> Very specifically, this section: http://docs.mongodb.org/manual/core/authentication/#mongodb-cr-authentication
[17:56:27] <wc-> what about users that connect with RoboMongo?
[17:56:32] <wc-> will they be left behind?
[17:57:08] <GothAlice> Also: http://docs.mongodb.org/manual/release-notes/3.0-compatibility/#compatibility-security-changes
[17:57:45] <wc-> luckily our users have been upgraded already
[17:58:00] <wc-> ah nice didnt see that driver compatibility list
[17:58:01] <wc-> that will help
[17:58:02] <wc-> thanks!
[18:15:33] <wc-> for anyone else that might hit this auth with old clients problem, this jira ticket has helpful info and a temporary solution: https://jira.mongodb.org/browse/SERVER-17459
[18:32:15] <wc-> im trying to completely remove all traces of any user accounts imight have on this mongod instance
[18:32:27] <wc-> ive removed /data/admin* local* /_tmp*
[18:32:40] <wc-> even /data/jounral*
[18:32:56] <wc-> then i restart mongod, i have auth enabled and enableLocalhostAuthBypass enabled
[18:33:10] <wc-> its my understanding if i log in via localhost with no users, i should have full access until i create a user?
[18:33:19] <GothAlice> :|
[18:33:57] <wc-> i know, not the recommended way to go about things, just getting a feel for what all needs to change
[18:36:00] <wc-> so am i missing something in how the authentication works?
[18:37:11] <wc-> when mongod starts up i can see enableLocalhostAuthBypass is set to 1 in the params
[18:52:17] <CrazyTux[m]> claygorman_, Hi
[18:52:46] <claygorman_> CrazyTux[m], hello
[18:53:15] <claygorman_> what has been peoples experience in upgrading from 2.6.8 to 3.0 using PHP driver?
[18:54:44] <CrazyTux[m]> claygorman_, what has been anyones experiencing using mongo ...
[18:56:11] <GothAlice> CrazyTux[m] / claygorman_: Talking to yourself? ;)
[18:56:31] <claygorman_> lol wow he's my co worker sitting next to me being a pain lol
[18:56:31] <CrazyTux[m]> GothAlice, nah, just giving a colleague shit :)
[18:56:35] <GothAlice> XP
[18:56:38] <claygorman_> he's a sql guy so beware folks
[18:59:36] <claygorman_> i know there was a change in the auth scheme for 3.0 that I think broke my application when I upgraded, so i rolled back until i could figure it out
[18:59:48] <GothAlice> claygorman_: A popular topic today.
[18:59:55] <claygorman_> really?
[18:59:57] <GothAlice> http://docs.mongodb.org/manual/release-notes/3.0-compatibility/
[19:00:06] <wc-> ya claygorman_ it seems to be a common issue :(
[19:00:24] <claygorman_> yeah kinda weird... i even tested the 1.6 driver and 1.7(dev) driver for PHP
[19:00:26] <claygorman_> nothing worked
[19:00:32] <claygorman_> minimum is 1.5 for PHP
[19:00:51] <claygorman_> atleast I'm not the only one
[19:00:55] <GothAlice> See also: https://jira.mongodb.org/browse/SERVER-17459
[19:01:34] <claygorman_> yeah that looks like my issue haha.. even the robo mongo
[19:01:53] <wc-> ya
[19:01:56] <wc-> im in the proces sof fixing that
[19:02:02] <wc-> locally
[19:02:20] <wc-> sort of following the exampel at the bottom of this jira ticket: https://jira.mongodb.org/browse/SERVER-17459
[19:02:25] <claygorman_> i tried mongo 3 with auth scheme 2.6 and that didn't work either so kinda weird
[19:02:28] <wc-> people losing their minds because robomongo isnt working
[19:02:28] <claygorman_> reading
[19:02:32] <claygorman_> lmfao
[19:02:48] <wc-> ah thats my plan im setting schema.currentversion to 3 then adding users and hoping it will work?
[19:02:52] <wc-> havent tried it yet
[19:03:11] <claygorman_> didn't work for me... i didn't wanna upgrade the auth version in the MMS manager because i thought it might break haha
[19:03:25] <wc-> it also seemed like mms monitor / automation wouldnt connect with the auth enabled either
[19:03:32] <claygorman_> yeah exactly
[19:03:45] <GothAlice> To test 3.0 out I asked MMS to spin up some mongod on some of my nodes, configured them for 2.6 default authentication, added the users I needed, waited a minute, then bulk loaded my data back. Didn't have a single hiccup with authentication at the application level after "pip install -R pymongo" to bump that package version.
[19:03:47] <claygorman_> i tried the 2.6 style auth schema version with mongo 3 hoping that would work
[19:04:02] <claygorman_> ahh hmmm
[19:04:51] <wc-> unfortunately theres no way im gonna get management to allow this web automation stuff to manage our prod instances until its proven
[19:04:59] <wc-> so until then im stuck with .js files and ansible
[19:05:13] <GothAlice> Because that's so much… more reliable? O_o
[19:05:32] <phutchins> Anyone know much about BSON? I know this isn't really directly mongo related (although i'm pulling the bson id's from mongo). I'm trying to decode the Mongo ObjectId ( in ruby ) and convert the object id string to binary. Anyone have any ideas on how?
[19:05:58] <wc-> when the automation first arrived we hooked up an aws account to it, it got stuck in some spin cycle spinning up instances and shutting them down
[19:06:06] <claygorman_> ahh
[19:06:09] <wc-> granted it was the first day or two it was available, but it scared people
[19:06:21] <claygorman_> sometimes i have to kill stuff manually even using the mms automation on my own boxes
[19:06:34] <claygorman_> then the automation agent restarts the process i killed
[19:06:35] <claygorman_> and works ok
[19:06:42] <wc-> see the first time that happens all trust in the mms automation stuff will be lost
[19:06:42] <GothAlice> phutchins: The MongoDB client driver should come with BSON tools.
[19:08:01] <wc-> hey it worked!
[19:08:22] <phutchins> GothAlice: it does... but I'm workign toward using the general bson library to decode it... Hoping to find someone who knows it a bit better than i do to get in the right direction
[19:08:33] <GothAlice> phutchins: http://api.mongodb.org/ruby/1.12.0/BSON/ObjectId.html
[19:08:47] <phutchins> GothAlice: I.e. I can do things like decode the date from the object id, etc... But I've got a more in depth task i'm working on
[19:08:50] <wc-> claygorman_: i had to do the following commands in a script, then start adding users, then enable auth and restart mongo:
[19:09:21] <wc-> http://pastebin.com/cpEv2Wwx
[19:09:32] <phutchins> GothAlice: yeah I've gone through the docs...
[19:10:16] <phutchins> GothAlice: there's no to_binary methods so I'm a little stuck...
[19:11:23] <GothAlice> phutchins: There isn't to_binary, but there certainly is an array of bytes: see the "data" instance attribute.
[19:12:43] <phutchins> GothAlice: ah, It wasn't clear to me that that was what that was... that' helpful. thanks
[19:40:58] <phutchins> GothAlice: so I get that I now have an array of bytes but i'm still unclear on how to get this to binary or hex or somethign that I can decode. Have any idea?
[19:42:10] <GothAlice> … what is an array of bytes if not by definition "binary"?
[19:43:03] <GothAlice> phutchins: And define "decode". It sounds like you have everything you need and a general Ruby question about how to manipulate those things. Unfortunately, I don't Ruby, but #ruby may be able to help.
[19:43:42] <phutchins> GothAlice: true, I'm not forming my questions clearly :). This is definitely #ruby territory now... I appreciate the help!
[22:46:54] <daidoji> hello, I'm testing a Mongo backup from an EC2 instance using journaling
[22:47:02] <daidoji> I take the snapshot and everythign looks fine
[22:47:36] <daidoji> but when I set it back up to test a recovery from backup, it takes quite a while for the journal to recover
[22:47:39] <daidoji> is this typical?
[22:48:17] <daidoji> right now the log claims its "preallocating a journal file"
[23:01:53] <daidoji> nevermind, I guess it was okay
[23:02:23] <daidoji> is there a way to minimize that downtime/
[23:03:03] <Boomtime> daidoji: what OS?
[23:03:16] <Boomtime> preallocating journal file should be fast
[23:09:08] <daidoji> ec2
[23:09:21] <daidoji> I was just testing to make sure the backups worked
[23:09:37] <daidoji> but I did use magnetic storage for the test instance
[23:10:47] <joannac> what fs?
[23:11:13] <joannac> I think you actually only get that message if allocation is slow.
[23:11:30] <joannac> at which point we pre-allocate 3 journal files at the start and then keep reusing them
[23:12:24] <daidoji> ext4
[23:12:38] <daidoji> joannac: yeah I think thats what took a bit
[23:12:59] <joannac> nods. so that's a one-time only delay, if it's what I think it is
[23:13:20] <daidoji> joannac: okay, fair enough. I just wasn't expecting it
[23:13:38] <daidoji> joannac: does that preallocation time go down if I lock the DB before taking the snapshot?
[23:13:41] <daidoji> http://docs.mongodb.org/ecosystem/tutorial/backup-and-restore-mongodb-on-amazon-ec2/#verify-the-backup
[23:13:53] <daidoji> it wasn't really clear from the directions above if I should do that or not when journaling
[23:14:01] <joannac> daidoji: http://docs.mongodb.org/manual/tutorial/manage-journaling/#journaling-avoid-preallocation-lag
[23:14:43] <daidoji> joannac: ahhh word, thanks
[23:16:18] <daidoji> joannac: ahhh I see, out of curiosity, why aren't these files captured in a snapshot?
[23:17:00] <joannac> are you restoring to the same place you did the backup from?
[23:18:19] <joannac> did you take a ec2 snapshot of everything (including journal)?
[23:18:20] <daidoji> joannac: no, I spun up a new instance to make sure the backup process would work and attached my snapshotted volumes to that new instance
[23:18:33] <daidoji> yeah, all three volumes except the root volume
[23:18:40] <joannac> oh
[23:18:54] <joannac> did you lock the database?
[23:19:09] <daidoji> joannac: I did not as it was unclear from those directions whether I should or not
[23:19:12] <daidoji> should I?
[23:19:47] <joannac> "If the dbpath is mapped to multiple EBS volumes, then in order to guarantee the stability of the file-system you will need to Flush and Lock the Database."
[23:20:01] <joannac> Is that really not clear?
[23:21:33] <daidoji> joannac: hmm, not really. The data is all on one volume, the journal and log are on another
[23:21:42] <daidoji> joannac: since all the data was on one volume I didn't do it
[23:22:18] <joannac> daidoji: the previous paragraph is "The journal file allows for roll forward recovery. The journal files are located in the dbpath directory so will be snapshotted at the same time as the database files."
[23:22:18] <daidoji> joannac: thats why I'm asking for clarification :)
[23:22:54] <joannac> so yes. journal is inside dbpath. journal is on a different volume. therefore dbpath is on multiple volumes. therefor you need to lock the database
[23:23:07] <daidoji> joannac: ahhh okay, thanks for clearing that up.
[23:23:20] <joannac> It's not unclear to me.... is there another way it should be worded?
[23:23:25] <GothAlice> Like nuking from orbit, it's the only way to be sure.
[23:23:47] <joannac> (genuine question, not being snarky)
[23:24:01] <daidoji> joannac: oh I'm not sure. It might have just been my read of it. (no offense taken)
[23:24:39] <daidoji> joannac: I did read it really quickly so it might just be reader error
[23:24:43] <joannac> okay. feel free to PM me if you think of anything
[23:24:50] <daidoji> joannac: sure, I appreciate your help
[23:24:53] <joannac> daidoji: anyway back to the original question
[23:25:05] <joannac> on a fast filesystem, mongodb doesn't preallocate journal files
[23:25:25] <joannac> so for example, on my ssds, I only have 1 journal file and it's tiny
[23:25:35] <joannac> if I took a snapshot of that and put it onto slow disks
[23:25:56] <joannac> when mongodb starts up, it replays what's in the journal, then does some tests and goes "oh crap these disks suck. preallocate time!"
[23:26:00] <joannac> hence, preallocation
[23:26:32] <daidoji> joannac: ahhh I see. That makes sense
[23:27:40] <joannac> there's not really anything practical you can do at the snapshot time to prevent that. I guess if you knew that in advance, you should lock the database (which flushes changes from journal to data, and data to disk)
[23:28:03] <joannac> then you could just copy the data files and create your own journal files like in that docs page
[23:28:28] <joannac> but I'm not sure it's worth the effort?
[23:28:48] <daidoji> roger, yeah I think you're right
[23:28:59] <daidoji> it sounds like some work to save 10 min
[23:29:15] <daidoji> and it wasn't really a blocker
[23:29:23] <daidoji> I'm just a curious cat
[23:29:34] <joannac> sure, questions is how you learn :)
[23:29:44] <GothAlice> There's an even more fun way to arrange things.
[23:29:52] <GothAlice> Memory mapped ram disks are _really_ fast. :3
[23:31:00] <daidoji> GothAlice: ahhh, how much does that run on aws instances for a 400GB database?
[23:31:21] <GothAlice> Very sharded. ^_^
[23:31:46] <daidoji> indeed
[23:31:48] <GothAlice> When our DB was on AWS, the inexpensive instances were still given just under 18GB of RAM. So we decided to roll with no persistent storage at all on our DB nodes.
[23:33:03] <GothAlice> (Fully self-configuring on startup, ephemeral VMs, with occasional snapshots and streamed archiving of the oplog to S3 in the event of catastrophic failure.)
[23:33:29] <GothAlice> Side benefit: point-in-time restores.
[23:34:53] <daidoji> GothAlice: oh really? Where'd you move to? Your own colo?
[23:35:03] <GothAlice> Rackspace. ^_^
[23:35:13] <daidoji> ahhh, how do you like it?
[23:35:23] <daidoji> I've only used AWS myself so far
[23:36:04] <GothAlice> Well, until that dom0 reboot at the beginning of this week, I had three years continuous uptime.
[23:37:10] <daidoji> ahhh
[23:38:56] <GothAlice> But hey, the cluster coming back up was beautiful to watch on our monitoring dashboard. ^_^
[23:40:18] <daidoji> GothAlice: I bet :)