Re: RFC: Fault injection

Mark Harvey <[email protected]> Mon, 11 Jan 2021 09:46:51 +1100
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
The other option would be to use (hijack) the SCSI =E2=80=98SEND =
DIAGNOSTIC=E2=80=99 / =E2=80=98RECEIVE DIAGNOSTIC RESULTS=E2=80=99 op =
codes..

Code up a list of useful fault-injection conditions within DIAGNOSTIC OP =
code.. Pass any metadata as part of the payload - such as block =
number(s), after x reads/writes, only fault on a block size of x, only =
error on barcode xyz, fail first n attempts on reading block.

The RECEIVE DIAGNOSTIC could return any conditions already set..

Just a thought.

Cheers
Mark




> On 9 Jan 2021, at 01:12, Michael Ablassmeier <[email protected]> wrote:
>=20
> hi,
>=20
> im searching for a way to be able to easily simulate faulty tape =
drives
> for CI/Testing purposes. The VTL emulation in TGT seems to have all =
the
> functionality required for my purpose and so i went on and implemented =
a
> proof of concept.
>=20
> The POC uses the VTL Tapes MAM header to store information about which
> errnous behavior should be simulated in case the tape is written.
> Different tapes can as such simulate different fault behaviors.
>=20
> See following description for more details:
>=20
> =
https://github.com/abbbi/tgt/blob/fault_injection/doc/README.ssc-fault-inj=
ection
>=20
> Is there any interest in getting such a feature into TGT's VTL
> emulation? Full diff here:
>=20
> https://github.com/fujita/tgt/compare/master...abbbi:fault_injection
>=20
> As the MAM header is probably not the best way for storing the
> information, would it be a good solution to store a special file
> alongside to the VTL file, including more meta information related to
> this feature?
>=20
> bye,
>    - michael