OpenSolaris

Printable Version Enter a New Search
Bug ID 6729436
Synopsis dlmgmtd needlessly writes to datalink.conf
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:dladm
Keywords
Responsible Engineer Cathy Zhou
Reported Against snv_94
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_100
Fixed In snv_100
Release Fixed solaris_nevada(snv_100)
Related Bugs 6577618 , 6729153
Submit Date 24-July-2008
Last Update Date 8-October-2008
Description
When dlmgmtd receives a door upcall as a result of a device attaching, it always writes to /etc/dladm/datalink.conf, even when it replaces an existing link entry that does not need changing.  For example, if an existing device re-attaches and nothing has changed regarding its configuration, dlmgmtd blindly re-writes its datalink configuration line in /etc/dladm/datalink.conf.  This means that the modification time for /etc/dladm/datalink.conf doesn't reflect when the file was effectively modified or when a change to persistent datalink configuration was made, but rather when the last device happenes to have attached and dls made an upcall to dlmgmtd (at the very least, this was the last time the system booted).  This is misleading.

The code in question is in dlmgmt_upcall_create(), where we unconditionally always call dlmgmt_write_db_entry():

   158
   159  done:
   160          if ((err == 0) && ((err = dlmgmt_write_db_entry(linkp->ll_linkid
,
   161              linkp->ll_flags)) != 0) && created) {
   162			(void) dlmgmt_destroy_common(linkp, flags);
   163		}
   164	

This bug was found when we noticed that /etc/dladm/datalink.conf's modification time was being updated every few seconds on jurassic-x4600.sfbay.  This was because on a debug kernel, the system attempts to unload every module periodically, and this was causing net_dacf's postattach routine to be continuously called for every device on the system, triggering upcalls to dlmgmtd.  The postattach behavior on detach is likely a separate bug, and this is covered by 6729153.
Work Around
N/A
Comments
N/A