ploperations-dns
ploperations-dns copied to clipboard
Dynect fog
Rewrite DynECT provider to support multiple contnet items for certain record name, e.g. different IPs pointing the same address, thus utilizing DNS round-robin ability.
Hi @charlesdunbar, Can I ask you to take a look at this?
Thank you, Yarden
Thanks for this PR! Switching to fog has been on my back burner for a while - will take a look at this sometime this week.
The main issue I'm seeing with this is the removal of self.prefetch. As discussed in https://github.com/puppetlabs/puppetlabs-dns/pull/4#discussion_r28732262, without it, for every record that's managed you'll be grabbing the zone file over and over again.
Slightly - We can't really use "instances" since for this case, instances would be what Dyn sees, which we can't check because by the time you run "instances" - you don't have the credentials available to pass to Dyn.
http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/ has some good information about reading up on prefetch.
I'll probably have to go through this again since I haven't looked at this code in about a year, but I highly recommend adding require 'ruby-debug'; debugger
in-line to see the prefetch method in action on the master branch. You're able to go line-by-line when you hit the debugger line, and print any variables at the time.
I should have some time tonight to refresh myself on the code and see if I can help flesh out a new prefetch.
Hi @charlesdunbar , I've read the link you provided about prefetch and also additional articles I've found on the web and things aren't clear yet.
Another somewhat related issue is that fog-dynect gem is missing zone and records TTL attribute when pulling data from DynECT. I've submitted a PR, hope to get it released soon.
Regarding the flush
method implementation, I should call r.save
only once as it publish
s the DNS zone applyin TTL changes to all records under a node (node.name.domain.com.)
Hi @charlesdunbar, The fog-dynect gem Accepted my PR and released v0.2.0 :+1:
I've also fixed the issue with calling save
only once.
We're left with the prefetch
implementation issue.
I've read the code from master and it fetches each record's state from DynECT. the instances method does nothing.
On dynect_fog branch, instances
method just creates the resources' instances. Sync-ing the resources' state is done in the flush method.
Can you elaborate on the desired role of the prefetch
method in the dynect_fog context?
Thank you, Yarden
Hi @charlesdunbar,
Any update regarding prefetch
?
Hi again @charlesdunbar, On IRC, Dominic explained:
[12:54:09] <Dominic> yardenbar: data about every instance of the resource already on the node (e.g. every package currently installed, every service configured)
I'll work on it :) Appreciate your comment...
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.
:x: Yarden Bar
:x: ayashjorden
Yarden Bar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.