The provision_dns module doesn't seem to hook into the site creation process at all. The action log says the module is loaded:

Loading provision_dns on request

... but no record is added to the zonefile (example.com in my case).

Comments

anarcat’s picture

Note: the code has been commented out prior to commit. I'll try uncommenting everything.

anarcat’s picture

Update: the dns entry gets added to the database, but not to the file, which is weird because when I add it through the UI, it works.

anarcat’s picture

Title: no dns entry created on new sites » no dns entry created on new sites if zone already exists

I have been able to create a zone with the proper record *if* the zone doesn't already exist.

anarcat’s picture

Priority: Normal » Minor

That's a bit weird, because this works on some zones.

This zone was created through the provision UI, and if I create a site in it, it doesn't work (ie. no A record is added).

$TTL 0
@        IN      SOA     example.com. anarcat.koumbit.org. (
                         2009012908 ; Serial
                         0 ; Refresh
                         0 ; Retry
                         0 ; Expire
                         0)             ; Negative Cache TTL

@        IN      NS              hostmaster.koumbit.net.
@        IN      NS              ns2.koumbit.net.
         IN      A              209.44.112.82
         IN      MX     0       mail.koumbit.org.
www      IN      A              209.44.112.82

This zone was created when adding the site test.example.com, and when I created test2.example.com, it worked:

$TTL 86400
@        IN      SOA     example2.com. dns.koumbit.net. (
                         2009012904 ; Serial
                         7200 ; Refresh
                         300 ; Retry
                         604800 ; Expire
                         86400)         ; Negative Cache TTL

.        IN      NS              hostmaster.koumbit.net
@        IN      NS              ns2.koumbit.net.
@        IN      A              209.44.112.82
test     IN      A              209.44.112.82
test2    IN      A              209.44.112.82

There are subtle differences in the zones that may explain the problem, but I'm not sure this is the cause...

At the very least, there should be a warning or error when writing to the file doesn't work.

anarcat’s picture

Status: Active » Closed (duplicate)
anarcat’s picture

Issue tags: +dns

tagging