[Users] Update request to support "Classless IN-ADDR.ARPA delegation"

Yedidyah Bar David didi at redhat.com
Tue Jan 28 10:48:32 UTC 2014


Hi, 

----- Original Message -----

> From: "Michelle&Judie" <love.cairn at gmail.com>
> To: users at 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.

> See following URLs for RFC2317 explanation.
> http://support.simpledns.com/KB/a146/how-to-sub-delegate-a-reverse-zone.aspx
> http://www.rfc-editor.org/rfc/rfc2317.txt

> 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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140128/90a8194c/attachment-0001.html>


More information about the Users mailing list