Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Adding ability to use zone root records#4107

Open
smalenfant wants to merge 13 commits into
apache:masterfrom
smalenfant:sm-tr-root-record
Open

Adding ability to use zone root records#4107
smalenfant wants to merge 13 commits into
apache:masterfrom
smalenfant:sm-tr-root-record

Conversation

@smalenfant
Copy link
Copy Markdown
Contributor

@smalenfant smalenfant commented Nov 12, 2019

What does this PR (Pull Request) do?

Allowing empty name zone name records.

For example, if your Delivery Service FQDN is test.cdn.isp.net, allow to set an A/AAAA/TXT/CNAME records for that hostname.

At the time of writing this PR, there is no change to the API or Traffic Portal which do not allow empty names. Changes need to be done directly in the database (which does allow empty name).

  • is not related to any Issue

Which Traffic Control components are affected by this PR?

  • Traffic Router

What is the best way to verify this PR?

This requires to be able to add a static entry in the database using an empty name.

traffic_ops=> select * from staticdnsentry WHERE host = '';
 id  | host |   address   | type | ttl | deliveryservice | cachegroup |         last_updated
-----+------+-------------+------+-----+-----------------+------------+-------------------------------
 146 |      | 10.10.10.10 |   53 | 300 |             437 |            | 2019-11-08 17:59:27.906927+00

Result:

[root@cdn1cdcrs0001 ~]# cat /opt/traffic_router/var/auto-zones/minio.cdn1.coxlab.net.
minio.cdn1.coxlab.net.  300     IN      A       10.10.10.10
minio.cdn1.coxlab.net.  3600    IN      NS      cdn1cdcrs0001.cdn1.coxlab.net.
minio.cdn1.coxlab.net.  3600    IN      NS      cdn1cdcrs0002.cdn1.coxlab.net.
minio.cdn1.coxlab.net.  86400   IN      SOA     cdn1cdcrs0001.cdn1.coxlab.net. traffic_ops.minio.cdn1.coxlab.net. 2019111213 28800 7200 604800 30

Dig verification :

# dig +short @cdn1cdcrs0001.coxlab.net  minio.cdn1.coxlab.net A
10.10.10.10

If this is a bug fix, what versions of Traffic Control are affected?

This is an enhancement

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

More changes required in Traffic Ops API and Traffic Portal.

@smalenfant smalenfant added the Traffic Router related to Traffic Router label Nov 12, 2019
@smalenfant smalenfant self-assigned this Nov 12, 2019
@asf-ci
Copy link
Copy Markdown
Contributor

asf-ci commented Nov 12, 2019

Can one of the admins verify this patch?

@rawlinp rawlinp added the new feature A new feature, capability or behavior label Nov 12, 2019
@smalenfant smalenfant requested a review from rawlinp November 12, 2019 20:17
@smalenfant smalenfant marked this pull request as ready for review November 12, 2019 20:17
Comment thread traffic_ops/traffic_ops_golang/staticdnsentry/staticdnsentry.go Outdated
@smalenfant smalenfant force-pushed the sm-tr-root-record branch from 85ddc4f to ef81d1e Compare May 28, 2020 14:44
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding an entry to CHANGELOG.md for this enhancement?

@rawlinp rawlinp added Traffic Ops related to Traffic Ops documentation related to documentation labels May 28, 2020
@smalenfant smalenfant requested a review from rawlinp May 28, 2020 17:52
Comment thread traffic_ops/traffic_ops_golang/staticdnsentry/staticdnsentry.go Outdated
@smalenfant smalenfant requested a review from rawlinp February 22, 2021 20:41
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

staticDNSEntry.Host validation regex looks good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation related to documentation new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops Traffic Router related to Traffic Router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants