Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with fallthrough #42

Open
zamadatix opened this issue Mar 17, 2024 · 1 comment
Open

Trouble with fallthrough #42

zamadatix opened this issue Mar 17, 2024 · 1 comment

Comments

@zamadatix
Copy link

zamadatix commented Mar 17, 2024

Hey there, I'm having some trouble getting the fallthrough to actually fallthrough. With "test1.example.com" in the local zonefile and "test2.example.com" in netbox I'm getting the following behavior:

Giventhe Corefile:

#    netbox {
#        token MyTokenHere
#        url http://10.20.30.40/api/ipam/ip-addresses
#        fallthrough
#    }

    file /etc/coredns/example.com
}

Queries to test1.example.com resolve and test2.example.com fail. Given the Corefile:

    netbox {
        token MyTokenHere
        url http://10.20.30.40/api/ipam/ip-addresses
        fallthrough
    }

#    file /etc/coredns/example.com
}

Queries to test1.example.com fail and test2.example.com resolve. Given the Corefile:

    netbox {
        token MyTokenHere
        url http://10.20.30.40/api/ipam/ip-addresses
        fallthrough
    }

    file /etc/coredns/example.com
}

Queriest to test1.example.com still fail and test2.example.com resolve. I'm not quite sure why fallthrough isn't letting the file's answer resolve. One thing I thought is maybe I have the plugin position wrong but it's before "file:file":

metadata:metadata
geoip:geoip
cancel:cancel
tls:tls
timeouts:timeouts
reload:reload
nsid:nsid
bufsize:bufsize
bind:bind
debug:debug
trace:trace
ready:ready
health:health
pprof:pprof
prometheus:metrics
errors:errors
log:log
dnstap:dnstap
local:local
dns64:dns64
acl:acl
any:any
chaos:chaos
loadbalance:loadbalance
tsig:tsig
cache:cache
netbox:github.com/oz123/coredns-netbox-plugin
rewrite:rewrite
header:header
dnssec:dnssec
autopath:autopath
minimal:minimal
template:template
transfer:transfer
hosts:hosts
route53:route53
azure:azure
clouddns:clouddns
k8s_external:k8s_external
kubernetes:kubernetes
file:file
auto:auto
secondary:secondary
etcd:etcd
loop:loop
forward:forward
grpc:grpc
erratic:erratic
whoami:whoami
on:github.com/coredns/caddy/onevent
sign:sign
view:view

And even trying it at the very end of the list or very beginning of the list isn't changing the behavior.

@hkviseth
Copy link

It seems that the latest release v0.4.0 doesn't include the commit 192f77a which adds the fallthrough when no results are found in Netbox (fallthrough on unsupported query type should still work in v0.4.0).
Have you tried explicitly downloading the master branch instead of the release tag before compiling CoreDNS? I tried forking the repo and creating a release from the latest commit in master, and it has working fallthrough as expected.
Maybe @oz123 could do a new release that includes the changes since v0.4.0? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants