Send Netdot-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."


Today's Topics:

   1. Re: [Netdot - Feature #1870] (New) Improve zonefile       and DHCPD
      config file generation (Carlos Vicente)


----------------------------------------------------------------------

Message: 1
Date: Sat, 11 Jul 2015 16:08:43 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-devel] [Netdot - Feature #1870] (New) Improve
        zonefile        and DHCPD config file generation
To: Bob Harold <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Netdot can actually generate zone files pretty fast. This is the time it takes 
to generate 190 zones in a modest test VM:

real    0m8.014s
user    0m2.628s
sys     0m1.284s

and that includes generating the contents, writing to disk and updating the 
checksums on each zone.

The fact that a zone?s final contents is dependent on the state of at least 13 
tables makes the code to set that ?touched? flag pretty complex and hard to 
maintain. I think that the code simplicity justifies the additional CPU cycles.

As always, I?m open to specific suggestions and/or patches.

cv


On Jul 10, 2015, at 4:54 PM, Bob Harold <[email protected]> wrote:

> Can I suggest that generating checksums for every zone on every export 
> request could be slow?  Perhaps some of the existing code could simply set a 
> "touched" flag on the zone, and then only those need to have checksums 
> generated and checked.
> 
> 
> 
> -- 
> Bob Harold
> hostmaster, UMnet, ITcom
> Information and Technology Services (ITS)
> [email protected]
> 734-647-6524 desk
> 
> On Fri, Jul 10, 2015 at 2:21 PM, <[email protected]> wrote:
> 
> Issue #1870 has been reported by Carlos Vicente.
> 
> ----------------------------------------
> Feature #1870: Improve zonefile and DHCPD config file generation
> https://osl.uoregon.edu/redmine/issues/1870
> 
> Author: Carlos Vicente
> Status: New
> Priority: High
> Assignee: Carlos Vicente
> Category: Netdot
> Target version: 1.1.0
> Resolution:
> 
> 
> Currently, these exporter classes use a special table called 'hostaudit' to 
> determine whether the files need to be exported. This table is updated with a 
> new entry each time that a related record is updated in the DB. This process 
> has some important drawbacks:
> 
> * The code is complex and ugly
> * There are cases when a change is made, and a second operation cancels the 
> previous change, resulting in two entries in the 'hostaudit' table. Even 
> though the resulting files are the same, the export happens anyways because 
> there isn't enough information to determine that the resulting file will be 
> identical as the previous one (except for the zone serial)
> 
> The proposed solution is to:
> 
> * Remove the 'hostaudit' table and related code
> * Add a 'checksum' field to both the 'zone' table and the 'dhcpscope' table
> * Each time an export is requested, the file is generated in memory. A 
> checksum is calculated on the result and it is compared with the current 
> checksum in the DB. The file is only printed to disk if the checksums are 
> different.
> 
> 
> --
> You have received this notification because you have either subscribed to it, 
> or are involved in it.
> To change your notification preferences, please click here: 
> http://osl.uoregon.edu/redmine/my/account
> _______________________________________________
> Netdot-devel mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-devel
> 
> _______________________________________________
> Netdot-devel mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-devel




------------------------------

_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel


End of Netdot-devel Digest, Vol 100, Issue 4
********************************************

Reply via email to