Hello!
Please let me know if I should post this topic in a different category!
I am having problems creating a custom out-of-process adapter, specifically my current problem is building a container that can successfully starts. I am following this guide and modifying as I go: Route directive adapter development guide · istio/istio Wiki · GitHub
Contextual info:
My environment includes:
- archlinux 5.1.6-arch1-1-ARCH
- a checkout of istio 1.1.7
- go1.12.5
- docker 18.09.6-ce
- fish shell 3.0.2
And any code referenced should be available here:
rlfi adapter source repo
I am running into the following error when running the built container which also fails when deployed to kubernetes:
15:11 user@localhost ~/.g/i/s/i/istio ((1.1.7)) docker run -it disorderlylabs/rlfi-adapter:latest
standard_init_linux.go:211: exec user process caused “no such file or directory”
I am creating (and building) an adapter, named rlfi (this is the content of a fish script):
set CGO_ENABLED 0
set GOOS linux
set GOARCH amd64go build -a -o rlfi/rlfi ./rlfi/main/main.go
and building the container with the following Dockerfile:
FROM scratch
ADD rlfi /rlfi
EXPOSE 9070
ENTRYPOINT [“/rlfi”]
I can run the executable, rlfi/rlfi, which should be mounted as /rlfi in the container:
15:17 user@localhost ~/.g/i/s/i/istio ((1.1.7)) pwd
/home/user/.go-paths/istio-d41d8cd98f/src/istio.io/istio15:18 user@localhost ~/.g/i/s/i/istio ((1.1.7)) ls -1 rlfi/
build.fish
config/
Dockerfile
handler.yaml
input-instance.yaml
main/
rlfi*
rlfi.go
rlfi.pb.html
template_handler.gen.go
template_handler_service.descriptor_set
template_handler_service.pb.go
template_handler_service.proto
template.proto
template_proto.descriptor_set
template.yaml
test-handler-rule.yaml15:17 user@localhost ~/.g/i/s/i/istio ((1.1.7)) rlfi/rlfi &
which I send an empty GET to:
15:17 user@localhost ~/.g/i/s/i/istio ((1.1.7)) curl -vv -s localhost:9070
- Trying ::1:9070…
- TCP_NODELAY set
- Connected to localhost (::1) port 9070 (#0)
GET / HTTP/1.1
Host: localhost:9070
User-Agent: curl/7.65.0
Accept: /
- Failed writing body (0 != 9)
- Closing connection 0
And logs the following (I assume this error is due to me sending an empty request that fails validation in the handler):
2019-06-08T22:17:40.903473Z info grpc: Server.Serve failed to create ServerTransport: connection error: desc = “transport: http2Server.HandleStreams received bogus greeting from client: "GET / HTTP/1.1\r\nHost: lo"”