Discussion:
DNS - Getting a record from a route53 zone with thousands of records
Vidyanand
2013-03-26 11:30:30 UTC
Permalink
Hi

I am trying to use fog to work with Amazon Route-53. I have run into a
situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.

$record = $zone.records.find{|r| r.name == @record_name } returns when the
@record_name starts with 'a' but when I use a record_name starts with 'b'
this wont return even though a record with the name exists. I bet it has
got to do with number of records and not necessarily the alphabets.

How do I go about getting an handle to that record I am looking for even
when the zones have thousands of records?

Thanks
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-03-26 14:39:38 UTC
Permalink
I think instead of find, you'll want get, so
`zone.records.get(@record_name)`. That should return the single record
matching that name (without needing to fetch all of them or deal with
pagination). It should also be a good deal faster. Do let me know if you
have other question or that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into a
situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
'b' this wont return even though a record with the name exists. I bet it
has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for even
when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Vidyanand
2013-03-26 19:22:31 UTC
Permalink
Geemus

I actually tried that and it wouldn't work. If you do it that way it seems
to take it as resourceId and so it comes back with the exception that
essentially boils down to

1 validation error detected: Value 'xxx.xxx.mydomain.com.' at 'resourceId'
failed to satisfy constraint: Member must have length less than or equal to
32.

I should also note that the fog version I use is 0.9.0 or so.

Thanks
Post by geemus (Wesley Beary)
I think instead of find, you'll want get, so
matching that name (without needing to fetch all of them or deal with
pagination). It should also be a good deal faster. Do let me know if you
have other question or that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into a
situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
'b' this wont return even though a record with the name exists. I bet it
has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for even
when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google Groups
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-03-26 20:14:41 UTC
Permalink
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it seems
to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
That should return the single record matching that name (without needing to
fetch all of them or deal with pagination). It should also be a good deal
faster. Do let me know if you have other question or that doesn't take care
of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into a
situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
'b' this wont return even though a record with the name exists. I bet it
has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for even
when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Vidyanand
2013-03-27 05:41:02 UTC
Permalink
This is what I am doing

$dns = Fog::DNS.new({
:provider => 'AWS',
:aws_access_key_id => $aws_access_key_id,
:aws_secret_access_key => $aws_secret_access_key
})

$zone = $dns.zones.get( 'ABCDEFGHIJ')

And I try to get the zone from here.

I have tried the following as well

$record = $zone.records.get( {:name => 'xxx.xxx.mydomain.com.'} )

But this results in the following error
`get_change': private method `sub' called for {:name=>"xxx.xxx.mydomain.com."}:Hash
(NoMethodError)


Thanks
Post by geemus (Wesley Beary)
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it
seems to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
*name)`. That should return the single record matching that name
(without needing to fetch all of them or deal with pagination). It should
also be a good deal faster. Do let me know if you have other question or
that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into a
situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
with 'b' this wont return even though a record with the name exists. I bet
it has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for
even when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-03-27 16:26:01 UTC
Permalink
It looks like maybe $dns.zones.get would take an id instead of a domain, is
that doing what you expect?

Could you open an issue around this at:
https://github.com/fog/fog/issues/new

Seems like there must be a bug and I can probably get some specific (other
peoples) attention there to help us out.

Thanks!
wes
Post by Vidyanand
This is what I am doing
$dns = Fog::DNS.new({
:provider => 'AWS',
:aws_access_key_id => $aws_access_key_id,
:aws_secret_access_key => $aws_secret_access_key
})
$zone = $dns.zones.get( 'ABCDEFGHIJ')
And I try to get the zone from here.
I have tried the following as well
$record = $zone.records.get( {:name => 'xxx.xxx.mydomain.com.'} )
But this results in the following error
`get_change': private method `sub' called for {:name=>"
xxx.xxx.mydomain.com."}:Hash (NoMethodError)
Thanks
Post by geemus (Wesley Beary)
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it
seems to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
**name**)`. That should return the single record matching that name
(without needing to fetch all of them or deal with pagination). It should
also be a good deal faster. Do let me know if you have other question or
that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into
a situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
with 'b' this wont return even though a record with the name exists. I bet
it has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for
even when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Vidyanand
2013-03-27 18:16:19 UTC
Permalink
It does look like get expects id. I was hoping to do the following

$dns.list_resource_record_sets('ABCDEFGHIJ', { :name => ''
xxx.xxx.mydomain.com.'})

It does return a non null object

But I am not sure how to iterate through the return type . Would that be
something that you can help with .

( If its not clear till now , I am a noob to ruby :) )
Post by geemus (Wesley Beary)
It looks like maybe $dns.zones.get would take an id instead of a domain,
is that doing what you expect?
https://github.com/fog/fog/issues/new
Seems like there must be a bug and I can probably get some specific (other
peoples) attention there to help us out.
Thanks!
wes
Post by Vidyanand
This is what I am doing
$dns = Fog::DNS.new({
:provider => 'AWS',
:aws_access_key_id => $aws_access_key_id,
:aws_secret_access_key => $aws_secret_access_key
})
$zone = $dns.zones.get( 'ABCDEFGHIJ')
And I try to get the zone from here.
I have tried the following as well
$record = $zone.records.get( {:name => 'xxx.xxx.mydomain.com.'} )
But this results in the following error
`get_change': private method `sub' called for {:name=>"
xxx.xxx.mydomain.com."}:Hash (NoMethodError)
Thanks
Post by geemus (Wesley Beary)
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it
seems to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
**name**)`. That should return the single record matching that name
(without needing to fetch all of them or deal with pagination). It should
also be a good deal faster. Do let me know if you have other question or
that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run into
a situation where my zone has 1000's of records and I am trying to get hold
of a record from that zone.
with 'b' this wont return even though a record with the name exists. I bet
it has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for
even when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-03-27 20:13:02 UTC
Permalink
No worries, just continuing the discussion over on the issue for now.
Hopefully we can sort you out soon. Thanks!
Post by Vidyanand
It does look like get expects id. I was hoping to do the following
$dns.list_resource_record_sets('ABCDEFGHIJ', { :name => ''
xxx.xxx.mydomain.com.'})
It does return a non null object
But I am not sure how to iterate through the return type . Would that be
something that you can help with .
( If its not clear till now , I am a noob to ruby :) )
Post by geemus (Wesley Beary)
It looks like maybe $dns.zones.get would take an id instead of a domain,
is that doing what you expect?
Could you open an issue around this at: https://github.com/fog/**
fog/issues/new <https://github.com/fog/fog/issues/new>
Seems like there must be a bug and I can probably get some specific
(other peoples) attention there to help us out.
Thanks!
wes
Post by Vidyanand
This is what I am doing
$dns = Fog::DNS.new({
:provider => 'AWS',
:aws_access_key_id => $aws_access_key_id,
:aws_secret_access_key => $aws_secret_access_key
})
$zone = $dns.zones.get( 'ABCDEFGHIJ')
And I try to get the zone from here.
I have tried the following as well
$record = $zone.records.get( {:name => 'xxx.xxx.mydomain.com.'} )
But this results in the following error
`get_change': private method `sub' called for {:name=>"
xxx.xxx.mydomain.com.**"}:Hash (NoMethodError)
Thanks
Post by geemus (Wesley Beary)
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it
seems to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
Post by geemus (Wesley Beary)
I think instead of find, you'll want get, so
single record matching that name (without needing to fetch all of them or
deal with pagination). It should also be a good deal faster. Do let me know
if you have other question or that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run
into a situation where my zone has 1000's of records and I am trying to get
hold of a record from that zone.
with 'b' this wont return even though a record with the name exists. I bet
it has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for
even when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/**grou****
ps/opt_out <https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Vidyanand
2013-04-02 21:24:47 UTC
Permalink
For the sake of others who might be running into the same issue:

Please refer to https://github.com/fog/fog/issues/1709 on how this got
resolved.

Thanks
Post by geemus (Wesley Beary)
No worries, just continuing the discussion over on the issue for now.
Hopefully we can sort you out soon. Thanks!
Post by Vidyanand
It does look like get expects id. I was hoping to do the following
$dns.list_resource_record_sets('ABCDEFGHIJ', { :name => ''
xxx.xxx.mydomain.com.'})
It does return a non null object
But I am not sure how to iterate through the return type . Would that be
something that you can help with .
( If its not clear till now , I am a noob to ruby :) )
Post by geemus (Wesley Beary)
It looks like maybe $dns.zones.get would take an id instead of a domain,
is that doing what you expect?
Could you open an issue around this at: https://github.com/fog/**
fog/issues/new <https://github.com/fog/fog/issues/new>
Seems like there must be a bug and I can probably get some specific
(other peoples) attention there to help us out.
Thanks!
wes
Post by Vidyanand
This is what I am doing
$dns = Fog::DNS.new({
:provider => 'AWS',
:aws_access_key_id => $aws_access_key_id,
:aws_secret_access_key => $aws_secret_access_key
})
$zone = $dns.zones.get( 'ABCDEFGHIJ')
And I try to get the zone from here.
I have tried the following as well
$record = $zone.records.get( {:name => 'xxx.xxx.mydomain.com.'} )
But this results in the following error
`get_change': private method `sub' called for {:name=>"
xxx.xxx.mydomain.com.**"}:Hash (NoMethodError)
Thanks
Post by geemus (Wesley Beary)
Hmm. How are you setting up the zone?
Post by Vidyanand
Geemus
I actually tried that and it wouldn't work. If you do it that way it
seems to take it as resourceId and so it comes back with the exception that
essentially boils down to
1 validation error detected: Value 'xxx.xxx.mydomain.com.' at
'resourceId' failed to satisfy constraint: Member must have length less
than or equal to 32.
I should also note that the fog version I use is 0.9.0 or so.
Thanks
Post by geemus (Wesley Beary)
I think instead of find, you'll want get, so
single record matching that name (without needing to fetch all of them or
deal with pagination). It should also be a good deal faster. Do let me know
if you have other question or that doesn't take care of it for you though.
Thanks!
wes
Post by Vidyanand
Hi
I am trying to use fog to work with Amazon Route-53. I have run
into a situation where my zone has 1000's of records and I am trying to get
hold of a record from that zone.
with 'b' this wont return even though a record with the name exists. I bet
it has got to do with number of records and not necessarily the alphabets.
How do I go about getting an handle to that record I am looking for
even when the zones have thousands of records?
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/**grou****
ps/opt_out <https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
.
--
You received this message because you are subscribed to the Google Groups
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...