[00:30:16] Is there a table somewhere that shows which master database servers have which databases on them, i.e. db63 has enwiki for example. ? [00:30:36] Reedy, binasher: ^ [00:30:59] and by table I mean wikitable, not db table :) [00:30:59] https://noc.wikimedia.org/conf/highlight.php?file=db.php [00:31:10] sectionLoads [00:31:15] thanks! [00:31:20] the first db server in each sub array is the master [00:32:52] I'm adding all this to wikitech documentation :) [00:37:35] kaldari: did you just do something to the enwiki master? [00:38:45] yes, a very small query to clean up 2 lines of bogus data for ArticleFeedback [00:39:00] mysql> UPDATE article_feedback_revisions SET afr_total = 0 WHERE afr_page_id =21121178 AND afr_count =0 AND afr_total > 1000000000; [00:39:00] Query OK, 2 rows affected (0.01 sec) [00:39:00] Rows matched: 2 Changed: 2 Warnings: 0 [00:39:40] hope that's OK [00:40:03] enwiki master is upset... ;) [00:40:37] hope you're joking [00:41:02] I'm not joking [00:41:13] uh oh [00:41:30] But I suspect you're unlikely to be the cause doing that... [00:41:50] See what Asher finds [00:41:53] I hope not. My blood pressure always doubles when I connect to the master DB [00:42:26] which is hopefully very rare [00:43:32] Just added my documentation: http://wikitech.wikimedia.org/view/How_to_run_queries_on_live_data [00:43:39] feel free to edit [00:45:14] kaldari: did your query actually complete? [00:45:33] Reedy: Yes, although there was an earlier query that I stopped... [00:46:02] I tried to do a count, but after it ran for more than a few seconds I killed it [00:46:12] Did you check it actually died? [00:46:30] and then you ran the update? [00:46:59] no, I didn't check that it actually died :( [00:47:48] yeah, that update query didn't finish [00:48:16] oh, maybe it did [00:48:30] maybe the count query didn't finish [00:49:10] https://ishmael.wikimedia.org/?host=db63 [00:49:17] the #1 is my fault [00:49:38] that's the count query I did and killed ( I thought) [00:50:30] anyway, it was stupid to do the count on the master - feel free to slap me with a trout [00:50:55] the same query took 1 minute on the slave, BTW [00:51:38] hm, not your fault at all [00:52:03] looks like your update was around 20 minutes before trouble [00:54:29] i saw a big cluster of updates to article_feedback_revisions in the binlog right before trouble struck but your queries were long gone [00:56:41] wonder if it's related to https://bugzilla.wikimedia.org/show_bug.cgi?id=34895#c8 [00:57:10] I just posted comment a little while ago [00:57:37] there were a lot of enwiki: refreshLinks2 Template:Albums_category related queries at the time [00:57:37] I would be amazed if someone was already acting on it [00:58:01] i've been thinking about limiting the number of connections the wikiadmin user can make [00:58:29] probably a good idea [00:59:25] when all of the jobrunners hit enwiki, it's been causing roblems for at least the last month or so [01:00:00] Don't the job runners use wikiuser rather than wikiadmin? [01:02:05] looks at zhwiki processlist.. i don't think so [01:03:46] i'm taking off, have a good weekend all [01:04:10] on https://ishmael.wikimedia.org/?host=db63 how is the Ratio calculated? It seems like it should just multiply the % time by the % queries. [04:52:26] andre__: Can you PM me your email address? I just got an invite to the weekly free software event thing, thought I'd forward it [05:39:21] andre__: Never mind, I found it :) [18:05:20] Does anyone have a few minutes to help me with a gerrit / git review issue? [18:16:56] what's the problem, guillom? [18:20:02] Platonides: it's the first time I'm trying to commit changes. I'm working on tweaks for the WMF blog's plugin, located in wikimedia/communications/WMBlog. I've followed the guide at https://www.mediawiki.org/wiki/Git/Workflow but when I try to "git review", I get an error saying "We don't know where your gerrit is. Please manually create a remote named "gerrit" and try again." [18:20:31] The only remote I have is "origin". [18:21:29] seems that repo doesn't have a .gitreview file [18:22:03] I do see a .gitreview in the folder [18:22:05] that would have teached it [18:22:54] it works for me.. [18:23:00] hmm [18:23:25] perhaps there's a conflict between this .gitreview and my repo shortcut [18:23:54] I'm going to test without the SSH shortcut [18:26:22] Try also to do a 'git fetch --all'. [18:26:39] This command should download refs for the remote branchs. [18:26:54] (I don't know if git fetch gerrit would work) [18:28:00] Nope, still the same problem [18:28:15] And did you have an output with "Fetching origin" "Fetching gerrit"? [18:29:12] I had a "Fetching origin", but no "Fetching gerrit" [18:29:27] Okay, open your .git/config file. I guess you don't have at the bottom a remote "gerrit" section? [18:29:33] what's your base revision? [18:29:44] nope, it's what I said earlier: the only remote I have is origin [18:29:55] Platonides: I think he tried to install the git/gerrit on an existing repo [18:29:57] Platonides: how do I find out? [18:30:13] I mean git show origin/master [18:30:24] this is the .gtireview I have: http://pastebin.com/Yhy88gDd [18:30:27] Sorry, I'm new to this gerrit stuff. Git I can usually manage, but not gerrit yet [18:30:54] Platonides: yes, I have the same file [18:31:24] guillom: please add these lines in .git/config: [18:31:26] the base revision is commit 74d014379833f5b5d43f06170180aa8a3c630fcd (Chad's initial import from the github repo) [18:31:29] [remote "gerrit"] url = ssh://guillom@gerrit.wikimedia.org:29418/wikimedia/communications/WMBlog.git fetch = +refs/heads/*:refs/remotes/gerrit/* [18:31:44] I'm going to copy/paste them elsewhere, irssi ate my \n. [18:33:40] guillom: http://dpaste.org/qWK6y/ [18:33:44] just add a new line before url and fetch [18:35:48] done [18:36:05] wtf, now I get this: git review > "Problems encountered installing commit-msg hook" [18:36:43] what git-review version are you using? [18:37:17] checking [18:37:52] 1.18 [18:37:58] installed earlier today [18:39:23] guillom: may I suggest you create a new fresh folder with git clone ssh://review/wikimedia/communications/WMBlog.git and reapply the modification there? [18:39:54] Dereckson: well, what would that do? It's basically what I've done a few hours ago. [18:40:23] and I'd rather not lose the commits I've made, although that would be a minor annoyance [18:40:46] cd /path/to/new/repo ; git pull /path/to/all/repo [18:40:51] (/old/repo) [18:41:02] you can pull locally commits from one folder to another [18:41:21] ok, I can try; I just don't see what it's going to change. But I can try. [18:43:49] alright, I've re-cloned, and pulled from the old working dir [18:43:59] Platonides: according the source of git-review the message ""We don't know where your gerrit is. Please manually create ..." can occur (1) if .gitreview is missing (but there it writes that explicitely too) (2) if a try to add gerrit remote branch fails [18:44:29] I wonder if guillom has a non-writable .git folder or similar [18:45:08] (that and the problem installing commit-msg) [18:45:08] So, git review gives the exact same error 'We don't now where your gerrit is." [18:45:16] that remembers me someone had issues with a misconfigured umask, creating readonly files. [18:45:23] the .git folder is owned by my user [18:46:06] and I can edit it [18:46:37] You can manually install the pre commit hook. [18:46:50] humpf [18:47:41] http://gerrit-documentation.googlecode.com/svn/Documentation/2.4.1/user-changeid.html#_creation [18:49:03] /tmp/alhpa ] scp review:hooks/commit-msg . [18:49:03] commit-msg 100% 4261 4.2KB/s 00:00 [18:49:06] yes that works [18:49:22] ok, just FYI, I re-added the gerrit remote to the freshly cloned directory, and I got the exact same error ("Problems encountered installing commit-msg hook") [18:49:49] okay so go to the .git/hooks folder and use "scp review:hooks/commit-msg ." [18:49:59] alright, I'll try that [18:50:19] (or scp -P 29418 review.wikimedia.org:hooks/commit-msg . if you didn't create the review alias in ssh config file) [18:50:31] er gerrit.wikimedia.org [18:51:48] got it [18:51:50] by the way, if you wonder what this hook is about, it's to add in all your commit a Change-Id, allowing Gerrit to identify your change, so you can amend it. Without that, a correction of a change would be uploaded to a new changeset instead as a new patchset in a current change. [18:52:32] tbh I'm not wondering about what the hook is about, I'm wondering why this isn't working automatically :) [18:53:34] actually, without a Change-Id line, I think gerrit would refuse the patch [18:54:57] Platonides: in our configuration, indeed. [18:55:07] "You are about to submit more than one commit." [18:55:07] Progress!!!11 [18:55:24] yes you're in terra cognita and "usual" warnings/errors [18:56:04] remote: Resolving deltas: 100% (8/8) [18:56:04] remote: Processing changes: refs: 1, done [18:56:04] remote: ERROR: missing Change-Id in commit message [18:56:11] and then it didn't print the Change-Id? [18:56:28] you should have a suggested commit message with yours + the Change-Id [18:56:39] Dereckson: I do. What should I do with it? [18:56:47] git commit --amend [18:56:49] add the line [18:58:05] done [18:58:15] then git review again, I assume? [18:59:06] I know the newer versions of gitreview seem to be broken on first use of a repo [18:59:16] downgrade! [18:59:17] git commit, git review, git commit --amend and then gitreview usually works [18:59:33] Reedy: or you can manually do a git review -s before your first commit [18:59:46] guillom: indeed [18:59:56] I get the exact same error msg [19:00:02] even after amending [19:00:28] and the Change-Id is well present in the log (git log)? [19:00:31] Could it be ebcause I have 4 commits and not only one? [19:00:40] possibly [19:00:45] bad guillom [19:00:52] If so, that would mean as you've already guess it wants the Change-Id in all :/ [19:01:06] you should be able to interactively rebase them and get it to assign a change id... [19:01:21] Reedy: interactively rebase? Don't talk dirty to me :P [19:01:50] Reedy: wouldn't be easier to create a new branch and cherry-pick the 4 changes one by one? [19:02:05] * Reedy shrugs [19:02:10] There's numerous way it could be done... [19:02:20] * guillom liked the simplicity of "git push origin master" when using github. [19:02:37] guillom: it's as simple as "git review" when you only have one commit [19:02:49] (when all is correctly configured) [19:02:50] git review works fine with multiple commits [19:02:53] IF they have a change id [19:02:54] * Reedy grins [19:02:55] and when this hook thingy works properly [19:03:07] so in the future, you'll be in an "easy" situation [19:03:45] Where computers don't suck [19:03:45] Wait. [19:04:44] Does this mean I'll have to do all this "manually adding the gerrit remote and the commit hook" if I try to commit changes to another project? like, say, the blog's theme? [19:04:52] sort of [19:04:53] or [19:05:02] just run git review before you commit [19:05:04] that'll setup the hook etc [19:05:13] hmm [19:05:47] or -s as Dereckson said [19:05:51] considering that's for "setup" [19:07:00] alright, these changes are simple enough, I'm going to re-clone a clean copy, and make 1 single commit *after* doing git review [19:07:44] you could squash and review... [19:07:56] what's squash? [19:08:04] turns multiple commits into 1 commit [19:09:05] brb [19:14:41] Alright, this still doesn't explain why I have to add the "gerrit" remote manually to the git config [19:17:47] If I run 'git review' before doing any commit, I get the message "Problems encountered installing commit-msg hook" again [19:17:56] Ok, that's it for tonight, I'm done. [19:18:00] Thank you all for the help [19:18:11] I'll try again another day. [19:20:31] guillom: bookmark http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html for the other day. [19:21:16] Dereckson: My last attempt was to commit a single commit. Squashing wouldn't have helped. [19:25:45] guillom: hmmm I see git-review has a VERBOSE mode in the source. [19:26:09] well, that wouldn't be useful [19:26:45] that would only add a line Fetching commit hook from scp://gerrit.wikimedia.org:29418 [19:27:07] if it had something to say, it would have: print("Problems encountered installing commit-msg hook") is followed by print(scp_output) [19:27:37] you want I prepare you a git-review patch who copy the file locally instead to try to fetch it remotely? [19:28:39] I don't understand what you're saying :) I'm going to take a book, they're usually more cooperative :) [19:28:44] (than computers) [19:30:00] I could deliver you a custom git-review script modified to fix your issue. Bonne lecture. [19:31:29] merci [19:31:39] Dereckson: you might be better off just giving him the hook [19:32:06] all it's doing is trying to copy the commit-msg hook via scp; if you plop it into the proper location by hand it should be happy [19:33:33] ori-l: he already have it, manual scp worked [19:33:40] oh [19:34:12] the issue were not to have to manually do that for each repo [19:34:23] try injecting a print to `which git-review` showing the value of scp_cmd [19:34:25] yeah, that's probably what I'll do next time: re-get it manually, then re-commit new changesets [19:34:26] and then run it by hand [19:35:15] I just don't get why I have to do all those things manually. I want it to work automagically. Also, a pony. [19:35:16] guillom: could you try that? "which git-review" should give you the path to the git-review python script. edit it, and add print(scp_cmd) after line 150 ( scp_cmd += ":hooks/commit-msg %s" % target_file ) [19:35:31] guillom: that's a legitimate want :) i'm not sure why it's broken [19:36:11] that will cause the command that git-review is trying (and failing) to run to be echoed [19:37:08] actually, i could do that myself, the command should be the same.. sec [19:38:18] scp -P29418 guillom@gerrit.wikimedia.org:hooks/commit-msg .git/hooks/commit-msg [19:38:32] ^ could you try running that from your repo root? [19:39:00] sure [19:40:16] I did that earlier but there were issues with existing commits that didn't have a change-id; I guess it can't hurt to try in a clean copy [19:40:50] my workaround for that is to use git commit --amend and make no changes [19:42:07] if you made the commit prior to installing the hook, the run git commit --amend, it'll add the change id. that works for the most recent commit.. for multiple commits you'd probably have to use git rebase [19:42:13] What Sam and other suggested was to add the commit ID with amend, but it didn't work, perhaps because I amended only 1 commit and there were 4 [19:42:41] yes, and Iknow basic git, but interactive rebase isn't yet on my skills list [19:42:49] anyway, now adding the hook manually [19:43:02] well, you can do this: git rebase -i HEAD^^^^ [19:43:18] and then for each commit, change "pick" to "reword" [19:43:39] when you save and exit, your edit will open with each commit message, in succession. just save each without modification [19:44:57] guillom: my reason for asking you to run the scp command by hand was not simply to fix the problem with that repo but to try and figure out why git review isn't working in general. it's failing when trying to run that command, so the output should provide some hint as to what is going wrong [19:45:11] you can add "-v" to get more verbose output [19:45:38] gotta walk the dog, bbiab [19:46:09] ok [19:46:10] thanks [19:48:56] [21:48:31] New patchset: Guillom; "Allow authors to edit others' posts" [wikimedia/communications/WMBlog] (master) - https://gerrit.wikimedia.org/r/28835 [19:48:59] weee [19:51:34] So, it works [19:51:46] No clue as to why it didn't before though [19:51:53] the -v output isn't particularly helpful [19:52:10] Thank you all; at least now I can submit my commits. [19:55:50] I'm going to go afk and then to bed, but I'll be available tomorrow and next week if someone wants to investigate the cause. [22:11:32] preilly: http://ganglia.wmflabs.org/latest/?r=year&cs=&ce=&c=echo&h=echo-xmpp&tab=m&vn=&mc=2&z=medium&metric_group=ALLGROUPS