[07:03] damn, just got bit by a combination of `unattended-upgrades`, a prod server missing a pin, and http://www.ubuntu.com/usn/usn-2881-1/ [07:03] unattended-upgrades just restarted a prod mysql instance ;_; === n0p_ is now known as n0p [07:05] (takes 20 min to restart a mysql server with our load) [11:59] n0p: ouch [13:37] n0p: Ugh [13:50] good news is it's back up? :) [13:52] wow, 20min sql server restarts?!? wtf? what would cause that? Locks? [14:35] jrwren: even on a clean shutdown, it still needs to look at every db/table for some strange reason [14:36] mind you we have thousands of DBs each with >hundred tables [14:37] with many TPS? [14:37] zomg, I just asked for TPS report. [14:39] NR reports ~5k/queries per second, not sure how many are writes [14:42] still, that is enough to make slowness understandable. [14:42] sounds like a fun problem to solve! :) [14:42] it's pretty smooth right now as long as we move traffic *before* a db restart [14:43] honestly, the system fails gracefully, it's just annoying to shuffle in the middle of the night [16:47] blergh [16:48] that good eh? [16:51] It's fun to play with production systems that are akin to magic boxes that nobody wants to offend. [16:52] Lest they incur wrath and stop performing. [16:52] hah [16:52] yea, the whole 'production is not like anything else' is the 'someone please kill me' of the world [16:52] which jrwren knows even we deal with :P [16:53] Well, we're using a platform which folks don't quite understand [16:53] always helpful [16:53] which apparently has a hang-up when you create two IDs that match [16:53] and we're not sure how to clear out data in there [16:54] for an eventual "go-live" [16:54] which from my perspective is rather broken if the answer isn't "truncate that mo-fo" [16:55] So I have no less than three different ways to denote that this record is indeed "test" [16:55] because adding a new field is easier than bending a system to our will. [16:55] hah [16:56] and previous system used integers, so appending "test" does bad things. [16:56] prepending rather [16:56] we are dealing with it right now exactly... even though staging is almost exactly like production... it still doesn't have teh load that production has. We almost need something to put load on staging similar to the load production has. [16:56] And they wonder why I listen to angry music and drink coffee [16:56] because I can't drink on the job. [16:56] so really... its almost always true, production is not like anything else. [16:57] jrwren: yea, interesting there though. We could 'simulate' load by just mirroring apache logs over to production with a diff charm watching that [16:57] jrwren: that'd be interesting to try out sometime [16:57] near real-time duplication with a url rewrite rule and curl [17:00] rick_h_: something to watch the logs and create the same requests? yeah, that would be awesome. [17:00] rick_h_: gets a little more tricky with http bodies for POST/PUT requests [17:00] jrwren: true enough [17:01] jrwren: just an interesting replay idea, you're right that it's not that simple [17:01] rick_h_: would make a SWEET cross model charm [17:01] jrwren: :) [17:02] https://plus.google.com/+CarlosSanchezMusic4Life/posts/J26drRFDfob [17:07] what time is chc tonight? [17:07] mrgoodcat: 7pm [17:08] thanks [17:08] np [17:08] think i might make it tonight [17:08] i hope [17:08] haven't been in months [17:08] party [17:10] Sweet [17:12] /join #snappy [17:12] doh [17:12] heh [17:13] at least its just a leading space. i frequently type bash commands into my irc client [18:06] I hate when I do sql in the terminal [18:06] after having done db stuff for a while [18:06] instead of ls I start typing "select" and just stop and feel bad [18:07] select * from files; [18:09] where the_one_i_need = 1; [18:10] i don't pipe ls to grep very often [18:40] i do [18:41] anybody know how you would disable usb except for keyboards? [19:07] s/keyboards/keyboard/ + superglue :-P [19:08] mrgoodcat: https://github.com/dkopecek/usbguard ? no recommondation, just googled [19:10] found via query: https://www.google.com/search?q=whitelist%20usb%20devices%20with%20dbus [19:34] mrgoodcat: I'm curious what you're attempting? :) [19:35] One theory: Make it so the USB key can't be removed once inserted [19:36] eg: some physical clamp. :) [19:38] cmaloney: http://grizzhacks.com [19:38] mrgoodcat: modern windows kernels have group policy which can do it. are you asking on linux? [19:39] one project idea was to make a door lock that uses yubikey as the key [19:39] but the problem is that USB isn't really somethign we want to expose to the outside world [19:39] jrwren: yea would likely run on a raspberry pi zero [19:39] mrgoodcat: remove all usb kernel modules except hsb_hid [19:39] *usb_hid [19:39] that should get you to KB/Mouse only [19:39] i guess that's reasonable [19:40] i was thinking there was probably a way to do it with modprobe but removing the drivers sounds simpler [19:42] Not sure that would prevent an attack though [19:42] just reduce the overall footprint [19:43] right because you still have to prevent problems that can be caused with the keyboard [19:43] catching signals is the obvious thing [19:43] but you have to make sure there's no way to shell out [19:44] you could write some dbus module to bind first inserted kb and ignore all other usb ids [19:44] run the program under a user with no shell is also obvious [19:46] the other idea was to make the brain an arduino and just implement only the functionality we need [19:46] greatly reduced attack surface [19:48] also greatly improved lifespan on the battery backup in case of power failure [19:49] Yeah, that's a better approach [19:49] have the Arduino communicate with the RPi [19:49] That way the Arduino presents a flattened surface and communicates in a secure way with the RPi [19:51] well it would elminate the rpi [19:51] once you have an arduino the rpi doesn't have a need [20:03] Au contraire [20:03] the RPi serves the internet connectivity need. ;) [20:04] because having your door lock as a hacking target is the goal. ;) [20:04] i never grocked the whole paring arduino and rpi [20:05] i'd always use one [20:05] if I need inet, i'd use an rpi and no arduino [20:06] cmaloney: ha that does appear to be the goal [20:15] Today is when I wish I wasn't afraid of clowns so I could have joined the circus. [20:15] jrwren: Arduino is great for analog data entry [20:15] and certain shields work better on ARduino [20:15] isn't rpi GPIO good for analog? [20:16] so it can do the data collection and send the input to the RPi proper [20:16] ah, so part availability, that makes sense [20:25] and the rpi is easier to actually process the data on [20:26] for this particular application though i think the arduino will be sufficient [20:35] But it makes it less interesting. :) [20:35] i'd argue that it makes it more interesting [20:46] i can imagine processing data on an arduino being very limited [20:52] eh well obviously you're memory limited [20:52] but a yubikey isn't exactly a ton of data [20:52] and you have to write everything in c afaik [20:53] and you want to watch out for external dependencies in libraries and whatnot [20:53] the real problem is data storage though. arduino doesn't have persistent storage for programs afaik [20:59] slow clock is what I was thinking. [21:00] oh like it would process too slowly [21:02] I don't see that being a problem with aes (the encryption used by the yubikey) [21:19] AES is supposed to be gentle on the CPU [21:19] at least it shows up a lot in hardware-based crypto [21:20] for some definition of gentle, but aren't a lot of arduinos like 1Mhz? [21:21] 1Mhz 8bit at that, so to do AES with it its gonna take many clocks to do 256bit math [21:21] 128 bit key [21:21] for yubikey [21:22] 32 bytes of encrypted data [21:22] the crypto++ library requires 16 cycles per byte plus 1041 to set up the key [21:23] so 512 cycles for the decryption [21:23] 1553 total including key setup [21:23] obviously that's on a 64 bit system though so it's easier to do the math [21:24] as long as the decryption time is under a quarter of a second though i doubt it would be bothersome [21:40] https://github.com/DavyLandman/AESLib [21:41] Not sure if yubikey is 128bit [21:42] There's another library that will handle 128 - 256bit [21:42] http://forum.arduino.cc/index.php?topic=88890.0 [22:00] cool [23:05] yubikey is 128 [23:05] already got that cloned down to play with heh [23:06] fun fact of the day: sending a string to an arduino to be decrypted and reading the result back is in fact _not_ the fastest way to decrypt aes encrypted data [23:07] it's actually not as slow as you might think though [23:48] cmaloney, guess who just got a pebble time round? :-D [23:49] and crap he's not here. oh well. [23:51] rick_h_ do you rock a pebble?