Bug 510348

Summary: ipa host-add results in Invalid syntax:fqdn: value #0 invalid per syntax
Product: [Retired] freeIPA Reporter: Jenny Severance <jgalipea>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: high Docs Contact:
Priority: medium    
Version: 2.0CC: benl, dpal, jgalipea, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freeipa-2.0.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-27 07:17:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 431020    
Attachments:
Description Flags
use proper syntax none

Description Jenny Severance 2009-07-08 18:46:28 UTC
Description of problem:
jennyv2 /]# ipa host-add jennyv3.bos.redhat.com
ipa: ERROR: Invalid syntax:fqdn: value #0 invalid per syntax


/var/log/http/error_log:

ipa: INFO: Created connection context.ldap2
ipa: DEBUG: raw: host_add(u'jennyv3.bos.redhat.com', nshardwareplatform=u'i686', nsosversion=u'redhat 5.3 Tikanga')
ipa: INFO: host_add(u'jennyv3.bos.redhat.com', nshardwareplatform=u'i686', nsosversion=u'redhat 5.3 Tikanga')
ipa: INFO: Destroyed connection context.ldap2
ipa: INFO: response: DatabaseError: Invalid syntax:fqdn: value #0 invalid per syntax


Version-Release number of selected component (if applicable):
2.0

How reproducible:
always

Steps to Reproduce:
1. add host with ipa host-add CLU
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jenny Severance 2009-07-14 17:19:02 UTC
This issues is due to the values used for attribute of the Boolean syntax.  Per RFC 4517, the only values allowed are "TRUE" and "FALSE" and not "True" and "False"

DS 9.0 is implementing various syntax validation checks and this is one of them.  

Adding host records to the directory server and defining idnsAllowDynUpdate and idnsZoneActive incorrectly as above stated is causing this error.

It also affects loading the dns.ldif during ipa-server-install --setup-bind

Comment 2 Martin Nagy 2009-07-14 20:46:55 UTC
Ah, sorry, I was too fast to assign the bug to myself. I thought it was only related to the installation and dns.ldif. Seems like the other part of the problem is in the LDAP back-end. I tried to hunt down the bug in the back-end, but with no luck. I'm re-assigning this back to Rob, he might know where to modify the back-end to fix it.

Comment 3 Martin Nagy 2009-07-15 05:37:24 UTC
I fixed at least dns.ldif so installation should hopefully work fine.

Commited to master: 017f236d6ac5ee434ce716a8187bc610f88943b8

Comment 4 Rob Crittenden 2009-10-28 01:55:14 UTC
Created attachment 366369 [details]
use proper syntax

Use Directory String syntax instead of DN syntax

Comment 5 Rob Crittenden 2010-02-03 20:26:36 UTC
syntax patch commited as master: e4c119ed4b05fe600377360e697483bd59000b37

Comment 6 Jenny Severance 2011-06-10 20:10:43 UTC
verified

# ipa host-add --force myhost.testrelm
----------------------------
Added host "myhost.testrelm"
----------------------------
  Host name: myhost.testrelm
  Principal name: host/myhost.testrelm@TESTRELM
  Managed by: myhost.testrelm


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-host-cli-001: Add lower case host
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

----------------------------------
Added host "nightcrawler.testrelm"
----------------------------------
  Host name: nightcrawler.testrelm
  Principal name: host/nightcrawler.testrelm@TESTRELM
  Managed by: nightcrawler.testrelm
:: [12:14:50] ::  Adding new host nightcrawler.testrelm successful with force option.
:: [   PASS   ] :: Adding new host with ipa host-add.
--------------
1 host matched
--------------
  Host name: nightcrawler.testrelm
  Principal name: host/nightcrawler.testrelm@TESTRELM
  Managed by: nightcrawler.testrelm
----------------------------
Number of entries returned 1
----------------------------
-------------- 1 host matched -------------- Host name: nightcrawler.testrelm Principal name: host/nightcrawler.testrelm@TESTRELM Managed by: nightcrawler.testrelm ---------------------------- Number of entries returned 1 ----------------------------
:: [12:14:53] ::  Host name is as expected.
-------------- 1 host matched -------------- Host name: nightcrawler.testrelm Principal name: host/nightcrawler.testrelm@TESTRELM Managed by: nightcrawler.testrelm ---------------------------- Number of entries returned 1 ----------------------------
:: [12:14:54] ::  Principal name is as expected.
:: [   PASS   ] :: Verifying host was added with ipa host-find lower case.
--------------
1 host matched
--------------
  Host name: nightcrawler.testrelm
  Principal name: host/nightcrawler.testrelm@TESTRELM
  Managed by: nightcrawler.testrelm
----------------------------
Number of entries returned 1
----------------------------
-------------- 1 host matched -------------- Host name: nightcrawler.testrelm Principal name: host/nightcrawler.testrelm@TESTRELM Managed by: nightcrawler.testrelm ---------------------------- Number of entries returned 1 ----------------------------
:: [12:14:57] ::  Host name is as expected.
-------------- 1 host matched -------------- Host name: nightcrawler.testrelm Principal name: host/nightcrawler.testrelm@TESTRELM Managed by: nightcrawler.testrelm ---------------------------- Number of entries returned 1 ----------------------------
:: [12:14:57] ::  Principal name is as expected.
:: [   PASS   ] :: Verifying host was added with ipa host-find upper case.
'c4e0298d-15da-4b42-8d4a-df862e7d65f4'
ipa-host-cli-001 result: PASS
   metric: 0
   Log: /tmp/beakerlib-1458923/journal.txt
    Info: Searching AVC errors produced since 1300810488.7 (Tue Mar 22 12:14:48 2011)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.sbxb5m
:
   AvcLog: /mnt/testarea/tmp.sbxb5m

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server