Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2019 09:21:57 -0800
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r343543 - head/sbin/bectl/tests
Message-ID:  <1BE1B458-7AEA-412F-AD52-1E5554080422@gmail.com>
In-Reply-To: <CACNAnaG8oL1hODGNoZZ3fGpqQFsD1DVpqNDCcN7cBr%2Bm-rsf-A@mail.gmail.com>
References:  <201901290408.x0T48oJQ080243@repo.freebsd.org> <CACNAnaEmeQLwB%2Ba8KWyqB3GFWDn7on4gYtDrH7i5G6mj3zfSJw@mail.gmail.com> <674E01AB-49C7-4B40-B2FD-6EB4AFEAB1FD@gmail.com> <CACNAnaH5Qnfzenkwe1obM0DOfUZbvTjWg79o7FAobPrT6WYcaA@mail.gmail.com> <5687EE07-74FB-4233-B51D-C8948641E8CB@gmail.com> <CACNAnaG8oL1hODGNoZZ3fGpqQFsD1DVpqNDCcN7cBr%2Bm-rsf-A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Jan 29, 2019, at 09:10, Kyle Evans <kevans@freebsd.org> wrote:
>=20
>> On Tue, Jan 29, 2019 at 10:55 AM Enji Cooper <yaneurabeya@gmail.com> wrot=
e:
>>=20
>>=20
>>>> On Jan 29, 2019, at 08:39, Kyle Evans <kevans@freebsd.org> wrote:
>>>>=20
>>>> On Tue, Jan 29, 2019 at 10:32 AM Enji Cooper <yaneurabeya@gmail.com> wr=
ote:
>>>>=20
>>>>=20
>>>>>> On Jan 28, 2019, at 20:10, Kyle Evans <kevans@freebsd.org> wrote:
>>>>>>=20
>>>>>> On Mon, Jan 28, 2019 at 10:09 PM Kyle Evans <kevans@freebsd.org> wrot=
e:
>>>>>>=20
>>>>>> Author: kevans
>>>>>> Date: Tue Jan 29 04:08:49 2019
>>>>>> New Revision: 343543
>>>>>> URL: https://svnweb.freebsd.org/changeset/base/343543
>>>>>>=20
>>>>>> Log:
>>>>>> bectl(8) test: Force destroy the zpool in cleanup
>>>>>>=20
>>>>>> This is a wild guess as to why bectl tests failed once upon a time in=
 CI,
>>>>>> given no apparent way to see a transcript of cleanup routines with Ky=
ua. The
>>>>>> bectl tests construct a new, clean zpool for every test. The failure
>>>>>> indicated was because of a mount that was leftover from a previous te=
st, but
>>>>>> the previous test had succeeded so it's not clear how the mount remai=
ned
>>>>>> leftover unless the `zpool get health ${pool}` had somehow failed.
>>>>>>=20
>>>>>=20
>>>>> I left out: the tests are supposed to be constructed to clean up any
>>>>> mounts that were left over in the course of the test, hence the
>>>>> assumption that the failure lies in the cleanup.
>>>>=20
>>>> Hi Kyle,
>>>>=20
>>>> The tests use a deterministic zpool name defined locally (not globally)=
, and will only destroy the zpool if =E2=80=9Czpool get health=E2=80=9D succ=
eeds.
>>>>=20
>>>> The tests will work the first time (when the zpool doesn=E2=80=99t exis=
t), but I believe they=E2=80=99re actually introducing nondeterminism by acc=
ident. I will propose a fix for this.
>>>>=20
>>>> There=E2=80=99s a way to decipher why things failed from /var/log/messa=
ges and kyua output. It=E2=80=99s just nontrivial to those who don=E2=80=99t=
 know what to look for. Can you please provide a failing ci run?
>>>>=20
>>>=20
>>> Hi,
>>>=20
>>> Thanks! Any help is appreciated -- my inquiry to -testing@ in response
>>> to the weekly report where the failing test [1] was mentioned has been
>>> met with silence. The failure is consistent in the i386-test job, but
>>> amd64-test sees nothing of the sort (and neither does my local
>>> testing).
>>=20
>> Thanks for the reminder to rejoin that list.
>>=20
>>> [1] https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/426/testRepor=
t/sbin.bectl/bectl_test/bectl_mount/
>>=20
>> It=E2=80=99s pretty obvious from the above run what=E2=80=99s going on fr=
om the output. A similarly named zpool (same prefix; suffixed with a 2) is b=
eing matched by grep, even though the test sets up one with a suffix in the p=
receding steps.
>>=20
>=20
> Right- this is the part that makes sense to me. =3D) The 'default2' BE
> is clearly a leftover from a previous test, but it should've been
> unmounted in the process and the zpool cleaned up.
>=20
> What's not clear is how the cleanup routine is failing; the `zpool get
> health` shouldn't have any reason to fail (though I can't test it
> here, apparently =3D() and `zpool destroy -f` should've unmounted this
> BE even if that hadn't happened throughout the course of the test, but
> the failure remains (even if probably incorrectly fixed) following the
> above commit.
>=20
> Setting the zpool name globally with a suffix unique to this test
> would likely be a great idea -- I think there's something else going
> on as well, though.

My comment about the zpool name being defined locally to tests as opposed is=
 globally is probably what=E2=80=99s tripping you up. The cleanup function i=
s not run in the same shell context as the test.

> Thanks,
>=20
> Kyle Evans



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1BE1B458-7AEA-412F-AD52-1E5554080422>