------=_Part_9523931_1710046420.1390906112430
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Hi,
----- Original Message -----
From: "Michelle&Judie" <love.cairn(a)gmail.com
To: users(a)ovirt.org
Sent: Tuesday, January 28, 2014 12:32:03 PM
Subject: [Users] Update request to support "Classless IN-ADDR.ARPA
delegation"
Hi guys,
I found a problem on installing server, which has address from small
ip zone,
less than a class C.
"engine-setup" checks FQDN resolvability in
"./plugins/ovirt-engine-setup/config/hostname.py".
This program requests forward & reverse query to DNS, and see if it comes
back to host domain name.
Indeed. Note that you can just add a suitable entry to /etc/hosts in most cases.
But it does not support RFC2317("Classless IN-ADDR.ARPA
delegation") type
domain, and fails on FQDN check.
I made patch to "hostname.py" to clear this problem.
Please check following patch, and consider upgrading on the next release.
---
hostname.py.org 2013-12-13 17:22:11.000000000 +0900
+++ hostname.py 2014-01-28 18:01:09.514791351 +0900
@@ -96,15 +96,16 @@
flags=re.VERBOSE,
pattern=r"""
^
- (?P<query>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).in-addr.arpa.
+ (?P<query>[\w/.-]+)
+ \.
\s+
\d+
\s+
IN
\s+
- PTR
+ (?P<type>(PTR|CNAME))
\s+
- (?P<answer>[\w.-]+)
+ (?P<answer>[\w/.-]+)
\.
$
"""
@@ -171,11 +172,32 @@
args=args,
raiseOnError=False
)
+ ad=addr.split('.')
+ query="{3}.{2}.{1}.{0}.in-addr.arpa".format(*ad)
if rc == 0:
for line in stdout:
found = self._DIG_REVLOOKUP_RE.search(line)
- if found:
- names.add(found.group('answer'))
+ if not found:
+ continue
+ if query != found.group('query'):
+ continue
+ answer=found.group('answer')
+ if found.group('type') == 'CNAME':
+ self.logger.debug(
+ '{query} CNAME to: {answer}'.format(
+ query=query,
+ answer=answer,
+ )
+ )
+ query=answer
+ continue
+ self.logger.debug(
+ '{query} resolves to: {answer}'.format(
+ query=query,
+ answer=answer,
+ )
+ )
+ names.add(answer)
return names
def _validateFQDNresolvability(self, fqdn):
Nice Job! Would you like to push it to gerrit yourself for review? See [1] and [2]
for details.
[1]
http://www.ovirt.org/Develop
[2]
http://www.ovirt.org/Working_with_oVirt_Gerrit
Thanks, and best regards,
--
Didi
------=_Part_9523931_1710046420.1390906112430
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: times new roman, new york,
times, se=
rif; font-size: 12pt; color:
#000000"><div>Hi,<br></div><div><br></div><hr
=
id=3D"zwchr"><blockquote style=3D"border-left:2px solid
#1010FF;margin-left=
:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-=
decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>=
From: </b>"Michelle&Judie"
&lt;love.cairn(a)gmail.com&gt;<br><b>To: </b>u=
sers(a)ovirt.org<br><b>Sent: </b>Tuesday, January 28, 2014 12:32:03
PM<br><b>=
Subject: </b>[Users] Update request to support "Classless
IN-ADDR.ARPA =
; delegation"<br><div><br></div><d=
iv dir=3D"ltr"><div><div><div>Hi
guys,<br><div><br></div></div>I found a pr=
oblem on installing server, which has address from small ip zone, less than=
a class C.<br></div><br>"engine-setup" checks FQDN
resolvability in "./plu=
gins/ovirt-engine-setup/config/hostname.py".<br></div><div>This
program req=
uests forward & reverse query to DNS, and see if it comes back to host =
domain
name.</div></div></blockquote><div><br></div><div>Indeed.
Note that =
you can just add a suitable entry to /etc/hosts in most
cases.</div><div><b=
r></div><blockquote style=3D"border-left:2px solid
#1010FF;margin-left:5px;=
padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decor=
ation:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir=
=3D"ltr"><div><br></div><div>But it does not support
RFC2317("Classless IN-=
ADDR.ARPA delegation") type domain, and fails on FQDN check.<br><br>See
fol=
lowing URLs for RFC2317 explanation.<br><a
href=3D"http://support.simpledns=
.com/KB/a146/how-to-sub-delegate-a-reverse-zone.aspx"
target=3D"_blank">htt=
p://support.simpledns.com/KB/a146/how-to-sub-delegate-a-reverse-zone.aspx...
a><br><a
href=3D"http://www.rfc-editor.org/rfc/rfc2317.txt"
target=3D"_blan=
k">http://www.rfc-editor.org/rfc/rfc2317.txt</a><br>&...
iv>I made patch to "hostname.py" to clear this
problem.<br></div><div>Pleas=
e check following patch, and consider upgrading on the next release.<br><br=
--- <a href=3D"http://hostname.py.org"
target=3D"_blank">hostname.py.org</=
a> 2013-12-13 17:22:11.000000000
+0900<br>+++ hostn=
ame.py 2014-01-28 18:01:09.514791351 +0900<br>@@ -96,15 +96,16
@@<br> =
flags=3Dre.VERBOSE,<br> &nb=
sp;
pattern=3Dr"""<br
^<=
br>-
(?P&=
lt;query>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).in-addr.arpa.<br>+ &nb=
sp;
(?P<query>[=
\w/.-]+)<br>+ &n=
bsp;
\.<br> &nbs=
p;
\s+<br>  =
;
\d+<br> =
\s+<br
IN=
<br>  =
;
\s+<br>-  =
;
PTR<br>+  =
;
(?P<type>(PTR|CNAME))<br> =
\s+<br>- =
(?P<answer>[\w.-]+)<br>+ &n=
bsp;
(?P<answer>[\w/.=
-]+)<br> &=
nbsp; \.<br
$<=
br>
"""<br>@@ -171,11 +172,=
32
@@<br> =
args=3Dargs,<br> &nbs=
p;
raiseOnError=3DFalse<br> =
)<br>+
ad=3Dad=
dr.split('.')<br>+
query=3D"{3}.{=
2}.{1}.{0}.in-addr.arpa".format(*ad)<br
if
rc =3D=3D 0:<br> &=
nbsp;
for line =
in
stdout:<br> &=
nbsp; found =3D
self._DIG_REVLOOKUP_RE.search=
(line)<br>- &nbs=
p; if
found:<br>- &nbs=
p; &=
nbsp;
names.add(found.group('answer'))<br>+ &n=
bsp;
if not found:<br=
+ &n=
bsp;
continue<br>+ &nb=
sp;
if qu=
ery !=3D
found.group('query'):<br>+ &nbs=
p;
=
continue<br>+ &n=
bsp;
answer=3Dfound.group('answer')<br>+  =
; &n=
bsp; if found.group('type') =3D=3D 'CNAME':<br
+ &n=
bsp;
self.logger.debug(<br>+  =
; &n=
bsp;
'{query} CNAME to: {an=
swer}'.format(<br>+ &n=
bsp;  =
;
query=3Dquery,<br>+ =
&nb=
sp;
answer=3Dan=
swer,<br>+  =
;
)=
<br
+ &n=
bsp;
)<br>+ &nbs=
p; &=
nbsp;
query=3Danswer<br>+ &n=
bsp;
cont=
inue<br>+ =
self.logger.debug(<br>+ &nb=
sp; =
'{query} resolves to:
{answer}'.format(<br>+ =
&nb=
sp;
query=3Dquery,<br
+ &n=
bsp;
answer=3Da=
nswer,<br>+ &nbs=
p;
)<br>+ =
)<=
br>+  =
;
names.add(answer)<br> &nbs=
p; return
names<br><div><br></div>
def =
_validateFQDNresolvability(self,
fqdn):</div></div></blockquote><div><br></=
div><div>Nice Job! Would you like to push it to gerrit yourself for review?=
See [1] and [2]</div><div>for
details.</div><div><br></div><div>[1] <=
a
href=3D"http://www.ovirt.org/Develop"
data-mce-href=3D"http://www.ovirt.o=
rg/Develop">http://www.ovirt.org/Develop</a></div><...
href=3D"=
http://www.ovirt.org/Working_with_oVirt_Gerrit" data-mce-href=3D"http://www=
.ovirt.org/Working_with_oVirt_Gerrit">http://www.ovirt.org/Working_with_oVi=
rt_Gerrit</a></div><div><br></div><div>Thanks, and
best regards,</div><div>=
-- <br></div><div><span
name=3D"x"></span>Didi<span
name=3D"x"></span><br><=
/div><div><br></div></div></body></html
------=_Part_9523931_1710046420.1390906112430--