ploperations-dns icon indicating copy to clipboard operation
ploperations-dns copied to clipboard

Dynect fog

Open ayashjorden opened this issue 8 years ago • 10 comments

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.

ayashjorden avatar Sep 01 '16 09:09 ayashjorden

Hi @charlesdunbar, Can I ask you to take a look at this?

Thank you, Yarden

ayashjorden avatar Sep 06 '16 10:09 ayashjorden

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.

charlesdunbar avatar Sep 07 '16 17:09 charlesdunbar

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.

charlesdunbar avatar Sep 13 '16 16:09 charlesdunbar

I understand, something like this ?

I need to read more about prefetch....

ayashjorden avatar Sep 13 '16 18:09 ayashjorden

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.

charlesdunbar avatar Sep 13 '16 19:09 charlesdunbar

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 publishs the DNS zone applyin TTL changes to all records under a node (node.name.domain.com.)

ayashjorden avatar Oct 18 '16 14:10 ayashjorden

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

ayashjorden avatar Oct 29 '16 18:10 ayashjorden

Hi @charlesdunbar, Any update regarding prefetch?

ayashjorden avatar Nov 13 '16 17:11 ayashjorden

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...

ayashjorden avatar Nov 17 '16 11:11 ayashjorden

CLA assistant check
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.

CLAassistant avatar Feb 24 '21 17:02 CLAassistant