Skip to content

Dynect fog#7

Open
ayashjorden wants to merge 8 commits intoploperations:mainfrom
seekingalpha:dynect_fog
Open

Dynect fog#7
ayashjorden wants to merge 8 commits intoploperations:mainfrom
seekingalpha:dynect_fog

Conversation

@ayashjorden
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

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

Thank you,
Yarden

@charlesdunbar
Copy link
Copy Markdown

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
Copy link
Copy Markdown

The main issue I'm seeing with this is the removal of self.prefetch. As discussed in #4 (comment), without it, for every record that's managed you'll be grabbing the zone file over and over again.

README.md Outdated
# content can also accept array

dns_record { "test-1a-record.puppetware.org":
ensure => present
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a trailing comma to be valid puppet code - which I'm now seeing is also the case with my examples elsewhere in the README.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIxed that

@ayashjorden
Copy link
Copy Markdown
Author

I understand, something like this ?

I need to read more about prefetch....

@charlesdunbar
Copy link
Copy Markdown

charlesdunbar commented Sep 13, 2016

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.

@ayashjorden
Copy link
Copy Markdown
Author

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

Yarden Bar added 4 commits October 18, 2016 22:00
Validate Puppet code
Make 'ensure' be first in resource attributes
No need to retrieve all of the DNS records and then filter what we need
Remove type comparison as we're alredy filtering when we query the zone for the
domain.
Call record.save only once as it publishes the DNS zone.

Per DNS RFC, all records under the same node must have the same TTL
@ayashjorden
Copy link
Copy Markdown
Author

Hi @charlesdunbar,
The fog-dynect gem Accepted my PR and released v0.2.0 👍

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

Rescue Excon::Error::NotFound when FQDN doesn't exist
@ayashjorden
Copy link
Copy Markdown
Author

Hi @charlesdunbar,
Any update regarding prefetch?

@ayashjorden
Copy link
Copy Markdown
Author

Hi again @charlesdunbar,
On IRC, Dominic explained:

[12:54:09] 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...

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 24, 2021

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.

❌ Yarden Bar
❌ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants