Bug 188056

Summary: Migration Script migrate_all_nis_offline Fails
Product: [Fedora] Fedora Reporter: Chris Jones <rollercow>
Component: openldapAssignee: Jan Safranek <jsafrane>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-24 09:19:11 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:

Description Chris Jones 2006-04-05 16:45:42 UTC
Description of problem:
On a machine currently useing nis running the script /usr/share/openldap/migration/
migrate_all_nis_offline fails

Version-Release number of selected component (if applicable):
openldap-servers-2.3.19-4

How reproducible:
Always

Steps to Reproduce:
1. Have machine currently useing nis, and with openldap-server package installed
2. Set $DEFAULT_MAIL_DOMAIN and $DEFAULT_BASE in migrate_common.ph
3. Run migrate_all_nis_offline
  
Actual results:
Fails.. 
Migrating groups...
Migrating hosts...
Migrating networks...
Migrating users...
Migrating protocols...
Migrating rpcs...
Migrating services...
Migrating netgroups...
Importing into LDAP...
Migrating netgroups (by user)...
Migrating netgroups (by host)...
Preparing LDAP database...
bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap/sucs: (2)
Expect poor performance for suffix dc=sucs,dc=org.
=> bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30996)
=> bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd: could not add entry 
dn="cn=gunewsilver.sucs.swan.ac.uk,ou=Hosts,dc=sucs,dc=org" (line=278): txn_aborted! 
DB_KEYEXIST: Key/data pair already exists (-30996)
Migration failed: saving failed LDIF to /tmp/nis.ldif.oo4913
Done.


Expected results:
Not failing

Additional info:

Comment 1 Ignacio Vazquez-Abrams 2006-04-05 16:58:24 UTC
Looks like a duplicate entry in /etc/hosts to me.

Comment 2 Chris Jones 2006-04-05 17:21:49 UTC
Contents of /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               gunewsilver.sucs.swan.ac.uk gunewsilver localhost.localdomain localhost

However 
# ypcat hosts
127.0.0.1               gunewsilver.sucs.swan.ac.uk gunewsilver localhost.localdomain localhost
127.0.0.1               gunewsilver.sucs.swan.ac.uk gunewsilver localhost.localdomain localhost
127.0.0.1               gunewsilver.sucs.swan.ac.uk gunewsilver localhost.localdomain localhost
127.0.0.1               gunewsilver.sucs.swan.ac.uk gunewsilver localhost.localdomain localhost

So it looks like your right.. now where do those extra entries come from?

Comment 3 Chris Jones 2006-04-05 20:25:18 UTC
In fact all nis deliverd things other than passwd and groups seem to be doubled, any ideas?

Comment 4 Jan Safranek 2007-05-24 09:19:11 UTC

*** This bug has been marked as a duplicate of 201540 ***