<p dir="ltr"></p>
<p dir="ltr">Sent from one plus one<br>
On Jun 17, 2015 10:28 PM, &quot;Raghavendra Talur&quot; &lt;<a href="mailto:rtalur@redhat.com">rtalur@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Jun 17, 2015 17:18, Atin Mukherjee &lt;<a href="mailto:amukherj@redhat.com">amukherj@redhat.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On 06/17/2015 04:26 PM, Raghavendra Talur wrote:<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; MSV Bhat and I had presented in Gluster Design Summit some ideas about<br>
&gt; &gt; &gt; improving our testing infrastructure.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Here is the link to the slides: <a href="http://redhat.slides.com/rtalur/distaf#">http://redhat.slides.com/rtalur/distaf#</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Here are the same suggestions,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 1. *A .t file for a bug*<br>
&gt; &gt; &gt; When a community user discovers a bug in Gluster, they contact us over<br>
&gt; &gt; &gt; irc or email and eventually end up filling a bug in bugzilla.<br>
&gt; &gt; &gt; Many times it so happens that we find a bug which we don&#39;t know the<br>
&gt; &gt; &gt; fix for OR not a bug in our module and also end up filling a bug in<br>
&gt; &gt; &gt; bugzilla.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; If we could rather write a .t test to reproduce the bug and add it to<br>
&gt; &gt; &gt; say /tests/bug/yet-to-be-fixed/ folder in gluster repo it would be<br>
&gt; &gt; &gt; more helpful. As part of bug-triage we could try doing the same for bugs<br>
&gt; &gt; &gt; filed by community users.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; *What do we get?*<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; a. very easy for a new developer to pick up that bug and fix it.<br>
&gt; &gt; &gt; If .t passes then the bug is fixed.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; b. The regression on daily patch sets would skip this folder; but on a<br>
&gt; &gt; &gt; nightly basis we could run a test on this folder to see if any of these<br>
&gt; &gt; &gt; tests got fixed while we were fixing some other tests. Yay!<br>
&gt; &gt; Attaching a reproducer in the form of .t might be difficult, specially<br>
&gt; &gt; for the race conditions. It might pass pre and post fix as well. So it<br>
&gt; &gt; *should not* be a must criteria to have .t file.<br>
&gt;<br>
&gt; Agreed,  it is only a good to have thing. For easy fix and/or easy reproducible bugs.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2. *New gerrit/review work flow*<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Our gerrit setup currently has a 2 hour average for regression run.<br>
&gt; &gt; &gt; Due to long queue of commits the round about time is around 4-6 hours.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Kaushal has proposed on how to reduce round about time more in this<br>
&gt; &gt; &gt; thread <a href="http://www.spinics.net/lists/gluster-devel/msg15798.html">http://www.spinics.net/lists/gluster-devel/msg15798.html</a>.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 3. *Make sure tests can be done in docker and run in parallel*<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; To reduce time for one test run from 2 hours we can look at running<br>
&gt; &gt; &gt; tests in parallel. I did a prototype and got test time down to 40 mins<br>
&gt; &gt; &gt; on a 16 GB RAM and 4 core VM.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Current blocked at :<br>
&gt; &gt; &gt; Some of the tests fail in docker while they pass in a VM.<br>
&gt; &gt; &gt; Note that it is .t failing, Gluster works fine in docker.<br>
&gt; &gt; &gt; Need some help on this. More on this in a mail I will be sending later<br>
&gt; &gt; &gt; today at gluster-devel.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; *what do we get?*<br>
&gt; &gt; &gt; Running 4 docker containers on our Laptops itself can reduce time<br>
&gt; &gt; &gt; taken by test runs down to 90 mins. Running them on powerful machines,<br>
&gt; &gt; &gt; it is down to 40 mins as seen in the prototype.<br>
&gt; &gt; How about NetBSD, yesterday Niels point out to me that there is no<br>
&gt; &gt; docker service for NetBSD.<br>
&gt;<br>
&gt; There are two take aways here,<br>
&gt; 1. Reducing regression time on Jenkins<br>
&gt; 2. Reducing regression time on our laptops.<br>
&gt;<br>
&gt; For 1 we will still have NETBSD bottleneck. Haven&#39;t thought of how to avoid that.<br>
&gt;<br>
&gt; At least getting 2 is still a win.<br>
I am bit ambitious for (1 &amp;&amp; 2) ;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 4. *Test definitions for every .t*<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; May be the time has come to upgrade our test infra to have tests with<br>
&gt; &gt; &gt; test definitions. Every .t file could have a corresponding .def file<br>
&gt; &gt; &gt; which is<br>
&gt; &gt; &gt;     A JSON/YAML/XML config<br>
&gt; &gt; &gt;     Defines the requirements of test<br>
&gt; &gt; &gt;         Type of volume<br>
&gt; &gt; &gt;         Special knowledge of brick size required?<br>
&gt; &gt; &gt;         Which repo source folders should trigger this test<br>
&gt; &gt; &gt;         Running time<br>
&gt; &gt; &gt;         Test RUN level<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; *what do we get?*<br>
&gt; &gt; &gt; a. Run a partial set of tests on a commit based on git log and test<br>
&gt; &gt; &gt; definitions and run complete regression as nightly.<br>
&gt; &gt; &gt; b. Order test run based on run times. This combined with fail on first<br>
&gt; &gt; &gt; test setting we have, we will fail as early as possible.<br>
&gt; &gt; &gt; c. Order tests based on functionality level, which means a mount.t basic<br>
&gt; &gt; &gt; test should run before a complex DHT test that makes use of FUSE mount.<br>
&gt; &gt; &gt; Again, this will help us to fail as early as possible in failure scenarios.<br>
&gt; &gt; &gt; d. With knowledge of type of volume required and number of bricks<br>
&gt; &gt; &gt; required, we can re-use volumes that are created for subsequent tests.<br>
&gt; &gt; &gt; Even the cleanup() function we have takes time.  DiSTAF already has a<br>
&gt; &gt; &gt; function equivalent to use_existing_else_create_new.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 5. *Testing GFAPI*<br>
&gt; &gt; &gt; We don&#39;t have a good test framework for gfapi as of today.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; However, with the recent design proposal at<br>
&gt; &gt; &gt; <a href="https://docs.google.com/document/d/1yuRLRbdccx_0V0UDAxqWbz4g983q5inuINHgM1YO040/edit?usp=sharing">https://docs.google.com/document/d/1yuRLRbdccx_0V0UDAxqWbz4g983q5inuINHgM1YO040/edit?usp=sharing</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Craig Cabrey from Facebook developing a set of coreutils using<br>
&gt; &gt; &gt; GFAPI as mentioned here<br>
&gt; &gt; &gt; <a href="http://www.spinics.net/lists/gluster-devel/msg15753.html">http://www.spinics.net/lists/gluster-devel/msg15753.html</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I guess we have it well covered :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Reviews and suggestions welcome!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks,<br>
&gt; &gt; &gt; Raghavendra Talur<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; ~Atin<br>
&gt; _______________________________________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</p>