bacongobbler / confd

Manage local application configuration files using templates and data from etcd
MIT License
21 stars 11 forks source link

"context deadline exceeded" in setVars() #6

Closed Zhiz0id closed 7 years ago

Zhiz0id commented 7 years ago

There is some problem in resource/template/resource.go : setVars() etcd3 v3.0.14 confd v0.12.1 and v0.12.0

root@3aeecacf3a47:/etc# confd -backend etcdv3 -node https://etcd1.lan:2379 -client-ca-keys /etc/confd/certs/ca.pem -client-cert /etc/confd/certs/etcd-client.pem -client-key=/etc/confd/certs/etcd-client-key.pem -watch -log-level debug 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: INFO Backend set to etcdv3 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: INFO Starting confd 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: INFO Backend source(s) set to https://etcd1.lan:2379 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: DEBUG Loading template resources from confdir /etc/confd 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: DEBUG Found template: /etc/confd/conf.d/confd.toml 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: DEBUG Loading template resource from /etc/confd/conf.d/confd.toml 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: DEBUG Retrieving keys from store 2017-05-30T18:31:25+03:00 3aeecacf3a47 confd[640]: DEBUG Key prefix set to / 2017-05-30T18:31:28+03:00 3aeecacf3a47 confd[640]: ERROR context deadline exceeded

/etc/confd/conf.d/confd.toml

[template]
src = "super.cfg.tmpl"
dest = "super.cfg"
keys = [
"/super/"
]

/etc/confd/templates/super.cfg.tmpl

{{range $svc := ls "/super/"}}
  {{$svc}}
{{end}}

data in etcd3 v3

/super
one
two
three

/super/one
one
one                                                        

/super/two
two
two
bacongobbler commented 7 years ago

Can you check etcd for any relevant information? this is going to be something server side that confd won't know about.

See https://github.com/coreos/etcd/issues and do a search there.

bacongobbler commented 7 years ago

I'm no longer maintaining this fork. Please make the change upstream. There are new maintainers taking over development of confd so this fork is no longer needed.