Closed (fixed)
Project:
Hosting DNS
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2011 at 17:54 UTC
Updated:
22 Jan 2017 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
thomas bosviel commentedThis patch add/delete CNAME records to DNS zone.
Comment #2
anarcat commentedCommitted.
However, I believe we should also add records for aliases on different zones - if they are allowed by the frontend, they should just be allowed in. Can you rework the patch for that?
Comment #3
thomas bosviel commentedI'll see what I can do. We should add records for alias only if zones already exist and are managed by Aegir or we should create new zones ?
Comment #4
anarcat commentedI think we can create new zones.
Comment #5
thomas bosviel commentedI tried to add records for aliases on different zones with this code :
$this->config('zone', $zone_alias)->record_set($sub_alias, array('A' => $ips));Even if the variable
$zone_aliasreflect a different zone name, records are always added in the zone of website. I tried to disable the cache for zone config with no result. I could generate a different zone by changing the context withd(@server_master)but this command causes many problems.My knowledge of the inner workings of Provision is too limited to be carried out this work. I publish my work here if someone wants to continue.
Comment #6
anarcat commentedtbosviel - can you review your own patch and commit it? :P we're heading towards 1.0 here... worst case, it will end up in 1.1.
For me, the patch looks good - but I haven't tested it. And there seems to be some debugging code in there, or at least that drush_log() message should be translatable (dt())...
Comment #7
thomas bosviel commentedPatch reviewed and committed in development branch dev-dns_alias_records-1074966.
I have tested the patch with the install of example.com with 3 aliases : www.example.com, example.fr and www.example.fr. We should have two zone files but there is only one, example.com. You can see the files generated:
"config/dns.d/example.com.zone.inc"
"config/server_master/bind/zone.d/example.com.zone"
You can see that all aliases are stored in the same file, even if provision shows
creating example.com zoneandcreating example.fr zone.Comment #8
thomas bosviel commentedI changed the behavior of the function
config()ofprovisionServiceclass to store multiple instances ofprovisionConfig_dns_zoneand manage multiple zone files.--
http://drupalcode.org/project/provision.git/commit/8834a5543f007f12f60ef...
Comment #9
anarcat commentedI am not sure I like the idea of hashing the serialized data, but I'm not familiar with the code here.
By the way, if this is merged, I believe it should be merged only in 2.x, because it looks like an API change to me (is that right?)...
http://community.aegirproject.org/discuss/2x-branch-created
Comment #10
thomas bosviel commentedYes it's an API change. Even if I was careful to not break other services officially maintained, services developed by third parties may have problems in two cases.
Configuration classes are registered like this:
Before the last instance was returned, now this is the first.
Service uses the data parameter of the function
config()several times in the same script: before the function returns the same instance, the function now returns two different instances.Comment #11
izmeez commentedsubscribing
Comment #12
anarcat commentedI wonder if this bug isn't related to #1184172: failing on "serial number overflow"?
Comment #13
ergonlogicThis will definitely need some testing at a minimum. Also, bumping version.
Comment #14
ergonlogicThis will definitely need some testing at a minimum. Also, bumping version.
Comment #15
ergonlogicThis will definitely need some testing at a minimum. Also, bumping version.
Comment #16
anarcat commentedyes
yes
yes ;)
Comment #17
ergonlogicoops, that's weird. sorry about the triple post.
Comment #24
neograph734Moving this to the Hosting DNS module as discussed in #2466989: Spin off DNS extension.
Is this still an issue, or has this been fixed with above commits?
Comment #25
neograph734The new system makes sure aliases are properly added.