hashicorp / faas-nomad

OpenFaaS plugin for Nomad
https://www.openfaas.com
MIT License
254 stars 46 forks source link

Latest faas.hcl doesn't work. #37

Closed seanlynch closed 6 years ago

seanlynch commented 6 years ago

What are the steps to reproduce this issue?

  1. check out v0.2.23
  2. nomad run nomad_job_files/faas.hcl

What happens?

Complains about the use of colons combined with "env = true" for nats addresses. Changing the colons to equal signs results in the jobs starting but the gateway just times out repeatedly trying to connect to nats. I see the connections appearing in /connz on the nats server, but then they disappear after a couple of seconds. It's also starting a nats server per node because its a system job but only using the last one. I can't imagine anyone bothered testing faas.hcl in v0.2.23 at all.

What were you expecting to happen?

Job starts and I can follow the tutorial.

Any logs, error output, etc?

2018/04/17 15:32:29 HTTP Read Timeout: 8s 2018/04/17 15:32:29 HTTP Write Timeout: 8s 2018/04/17 15:32:29 Binding to external function provider: http://x.x.x.x:18081/ 2018/04/17 15:32:29 Async enabled: Using NATS Streaming. 2018/04/17 15:32:29 Opening connection to nats://x.x.x.x:4222 2018/04/17 15:32:31 stan: connect request timeout

repeated over and over.

Any other comments?

What versions of software are you using?

Operating System: centos 7

OpenFaaS Version: whatever's referenced by the v0.2.23 faas.hcl file

Nomad Version: 0.7.1

alexellis commented 6 years ago

@nicholasjackson when you have time please could you take a look? @cpitkin has had success with this OpenFaaS provider.

nicholasjackson commented 6 years ago

There was a missing attribute from the setup for the Nats cluster OpenFaaS requires the cluster id to be set as faas-cluster. I have updated the config however I have not tested this, I personally don't use the async options of the gateway.