hashicorp / faas-nomad

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

Function resolving doesn't use consul dc filtering #84

Closed ypatent closed 5 years ago

ypatent commented 5 years ago

What are the steps to reproduce this issue?

  1. … Deploy a function using consul with few different DC's
  2. … Try invoking it

What happens?

The function is not found because its not being searched for in the right DC

Maybe it can be solved by another flag? Ill try building an image with that and see if it helps

acornies commented 5 years ago

@ypatent can you provide a little more information? Maybe trace logs from faas-nomad? Can you tell me a little more about your setup?

ypatent commented 5 years ago

Sure. The setup here is consul and nomad with 2 dcs (lets say dc1 and dc2). My deploy runs entirely on dc2. When i deploy the function, successfully and try to invoke it via the open faas ui, i get 404, with the following error in the logs:

2019/09/04 06:45:13 [TRACE] catalog.service(hello-openfaas): GET /v1/catalog/service/hello-openfaas

when i try running the same consul api query the code runs, im getting an empty response as well. if i explicitly add "dc=dc2" to the query, i get the result.

Actually, thinking more about it, it looks like something weird with consul rather than with the nomad faas integration.

ypatent commented 5 years ago

So, i played some more with it, and it looks like its something related to our setup here. Manage to make it work at the end, thanks!