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

DNS checks should have hostname as attribute, not key #518

Closed
sshipway opened this issue Dec 11, 2019 · 5 comments · Fixed by #814
Closed

DNS checks should have hostname as attribute, not key #518

sshipway opened this issue Dec 11, 2019 · 5 comments · Fixed by #814

Comments

@sshipway
Copy link
Contributor

sshipway commented Dec 11, 2019

Describe the feature:
Currently, DNS checks specify the hostname to resolve as a key. The server name to use for resolving is an attribute. However, if you want to test the same item resolving on multiple DNS servers you cannot do it as the resolving hostname is a unique key in the heira.

Describe the solution you'd like
As previously done with the exec resource, I would like to add a new attribute 'resolve' which optionally holds the hostname to resolve, overriding the key. This will allow structures such as:

dns:
  primaryserver:
    resolve: myhost.company.com
    server: ns0.company.com
    resolveable: yes
  secondaryserver:
    resolve: myhost.company.com
    server: ns1.company.com
    resolveable: yes

which will allow you to check correct name resolution from multiple DNS hosts, which is not currently possible.

I also believe that keeping the keys as symbolic only is a better way to work, with all the test definition held in the attributes, as this allows better control when merging.

Describe alternatives you've considered
It would be possible to use different resolution targets on different DNS servers, but this seems untidy, and may cause automation or scaling problems.

@sshipway
Copy link
Contributor Author

The same issue affects HTTP tests, as well, since the URL is held in the key and this prevents you from running the same URL test against different backends or with different header sets.

@aelsabbahy
Copy link
Member

aelsabbahy commented Dec 11, 2019

Please see the great work @sshipway has already done for command :)

In all seriousness, this feature request is approved. Also, add addr to the mix, since there's a PR (#344) that adds localaddress to define source address.

I'll mark this as approved, feel free to work on it if you have time.

@sshipway
Copy link
Contributor Author

I'll try doing something on this over xmas, I'm stuck in the office on call while everything's quiet.

@aelsabbahy
Copy link
Member

aelsabbahy commented Dec 14, 2019

Thinking this should be done for all resources at this point.

Another usecases: #339

Maybe this ticket should be a generic one for all resources?

@sshipway
Copy link
Contributor Author

Two years and I've still not been able to work on this. I blame covid for giving me more work, and lack of motivation...
I still think this is an important enhancement, hopefully I'll be able to find some time to work on it. I'd hate to see goss wither from lack of love.

aelsabbahy added a commit that referenced this issue Jun 24, 2023
@aelsabbahy aelsabbahy mentioned this issue Jun 25, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants