<div dir="ltr">Tyler,<div><br></div><div>Daniel reported that this morning the problem came back for few users<div>They had such error : <a href="http://pastebin.com/vzf8uSrZ">http://pastebin.com/vzf8uSrZ</a></div><div>I didn't find how you configured the R/O vs R/W</div></div><div>I found only one configuration file for mirror brain which seems to go to the R/W DB</div><div>I don't know if it can be related but in mirrorbrains logs we again had various "Name or service not known" errors today when it tried to verify the mirrors (like last Tuesday)</div><div><a href="https://gist.github.com/aheritier/d3961ac39a5e042a5c853670ce1f73a7">https://gist.github.com/aheritier/d3961ac39a5e042a5c853670ce1f73a7</a><br></div><div>Since few hours we also have the same error about the DB access in /var/log/apache2/error.log</div><div><div>[Thu Apr 28 06:01:00.879680 2016] [dbd:error] [pid 26193:tid 140561210119936] (20014)Internal error: AH00629: Can't connect to pgsql: could not translate host name "jenkinsinfra01-rr1......." to address: Name or service not known\n</div><div>....</div></div><div><br></div><div>Cheers</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 26, 2016 at 11:44 PM, R. Tyler Croy <span dir="ltr"><<a href="mailto:tyler@monkeypox.org" target="_blank">tyler@monkeypox.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
First off, let me tell you, there is nothing I love more than 2am calls from<br>
Daniel and Arnaud :)<br>
<br>
Anyways, with the potential infra compromise which is blogged about here[0],<br>
we migrated a *lot* of infrastructure in very short order to AWS. We're still<br>
not entirely finished with that process, but as part of it LDAP, Rating, CI and<br>
Mirrorbrain/Updates were moved into AWS.<br>
<br>
Mirrorbrain as you might know powers {mirrors,updates,pkg}.<a href="http://jenkins.io" rel="noreferrer" target="_blank">jenkins.io</a> and uses<br>
a PostgreSQL database to keep track of which files are located on which<br>
mirrors.<br>
<br>
During the migration to AWS, we adopted AWS RDS for our postgresql server.<br>
<br>
Last night, an uptick in traffic hitting the jenkins-mirrorbrain host (home to<br>
{mirrors,updates,pkg}.<a href="http://jenkins.io" rel="noreferrer" target="_blank">jenkins.io</a>), AWS RDS experienced a total network<br>
connection loss between the EC2 instance and the RDS instance[1]. The behavior<br>
was, as you can see in [1], that all DB Connections flat-lined from the EC2<br>
instance to the RDS instance. The host was unable to reconnect to PostgreSQL<br>
until it was stopped and started (not even a reboot worked). This caused<br>
requests to stack up in Apache on jenkins-mirrorbrain which also slowed<br>
Confluence down, since the plugin-info macro requests<br>
<a href="http://updates.jenkins-ci.org/latest/update-center.json" rel="noreferrer" target="_blank">updates.jenkins-ci.org/latest/update-center.json</a> periodically, and was unable<br>
to retrieve it successfully.<br>
<br>
Unfortunately this "super fucked up behavior" (my words) may be a "known<br>
issue"[2] that others have experienced with AWS RDS (pgsql). The work-around,<br>
which was manually deployed, was to spin up a read replica and point<br>
Apache/MirrorBrain to that instead of the write-master instance. This means<br>
Apache is hitting a read-replica, and the mirrorbrain scripts for scanning<br>
mirrors are hitting the write-master (filed to puppetize here[3])<br>
<br>
This seems to prevent the issue from manifesting itself, but I'm definitely not<br>
feeling too confident about that hack.<br>
<br>
<br>
Another issue that was noticed while dealing with all of this, is that I<br>
neglected to provide Elastic IPs for many of the hosts I provisioned in AWS<br>
last week.  WHich means we're going to have to go back through later and assign<br>
Elastic IPs and migrate many of our DNS records, which is not going to be<br>
pleasant.<br>
<br>
<br>
I have also created a private runbooks[4] repository on GitHub where we can<br>
migrate runbooks and infra documentation from the protected space on<br>
Confluence, which will allow us to follow our runbooks for Confluence being<br>
down when Confluence is down :)<br>
<br>
<br>
Moving forward we're going to need to figure out a more highly available<br>
distribution process. The unfortunate nature of jenkins-mirrorbrain is that it<br>
must have a very large file tree under /srv/releases to properly serve and sync<br>
with other mirrors, and potentially distributing that across N webservers to<br>
get some redundancy would dramatically complicate our current release process.<br>
<br>
<br>
So there are the details, today's kind of sucked, but we recovered in a couple<br>
hours from a fairly absurd bug in AWS. Yay us.<br>
<br>
<br>
[0] <a href="https://jenkins.io/blog/2016/04/22/possible-infra-compromise/" rel="noreferrer" target="_blank">https://jenkins.io/blog/2016/04/22/possible-infra-compromise/</a><br>
[1] <a href="http://i.imgur.com/lGGmRGe.png" rel="noreferrer" target="_blank">http://i.imgur.com/lGGmRGe.png</a><br>
[2] <a href="https://twitter.com/rhoml/status/724952449199403008" rel="noreferrer" target="_blank">https://twitter.com/rhoml/status/724952449199403008</a><br>
[3] <a href="https://issues.jenkins-ci.org/browse/INFRA-669" rel="noreferrer" target="_blank">https://issues.jenkins-ci.org/browse/INFRA-669</a><br>
[4] <a href="https://github.com/jenkins-infra/runbooks" rel="noreferrer" target="_blank">https://github.com/jenkins-infra/runbooks</a><br>
<br>
<br>
- R. Tyler Croy<br>
<br>
------------------------------------------------------<br>
     Code: <<a href="https://github.com/rtyler" rel="noreferrer" target="_blank">https://github.com/rtyler</a>><br>
  Chatter: <<a href="https://twitter.com/agentdero" rel="noreferrer" target="_blank">https://twitter.com/agentdero</a>><br>
<br>
  % gpg --keyserver <a href="http://keys.gnupg.net" rel="noreferrer" target="_blank">keys.gnupg.net</a> --recv-key 3F51E16F<br>
------------------------------------------------------<br>
<br>_______________________________________________<br>
Jenkins-infra mailing list<br>
<a href="mailto:Jenkins-infra@lists.jenkins-ci.org">Jenkins-infra@lists.jenkins-ci.org</a><br>
<a href="http://lists.jenkins-ci.org/mailman/listinfo/jenkins-infra" rel="noreferrer" target="_blank">http://lists.jenkins-ci.org/mailman/listinfo/jenkins-infra</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>-----</div><div>Arnaud Héritier</div><div><a href="http://aheritier.net" target="_blank">http://aheritier.net</a></div><div>Mail/GTalk: aheritier AT gmail DOT com</div><div>Twitter/Skype : aheritier</div></div>
</div>