From 44fd8aef54d6f9d4548c1aa50375ee87cc21e5e4 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 5 Sep 2018 15:33:42 +0300 Subject: [PATCH] fpga_crihook: use -s fpgaconf option Different versions of OPAE tool fpgaconf use different command line options to specify socket number. Latest version uses -S, which CRI-O hook used so far. However, fpgaconf in initcontainer comes from older OPAE version, which uses -s option for the same purpose. This caused fpgaconf and CRI-O hook to fail with "Invalid cmdline options". Used 'fpgaconf-wrapper -s' in the CRI-O hook to fix this. Signed-off-by: Ed Bartosh --- cmd/fpga_crihook/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fpga_crihook/main.go b/cmd/fpga_crihook/main.go index 1bc4b9ba..c1d85853 100644 --- a/cmd/fpga_crihook/main.go +++ b/cmd/fpga_crihook/main.go @@ -119,7 +119,7 @@ func (bitStream *opaeBitStream) validate() error { } func (bitStream *opaeBitStream) program() error { - output, err := bitStream.execer.Command(fpgaconf, "-S", bitStream.params.devNum, bitStream.path).CombinedOutput() + output, err := bitStream.execer.Command(fpgaconf, "-s", bitStream.params.devNum, bitStream.path).CombinedOutput() if err != nil { return errors.Wrapf(err, "failed to program AFU %s to socket %s, region %s: output: %s", bitStream.params.afu, bitStream.params.devNum, bitStream.params.region, string(output)) }