Sebastien Roy wrote: > Folks, > > I'm in the process of adding the ability to create an IP tunnel from a > non-global zone, and the first order of business is getting dlmgmtd to > run in a non-global zone. One issue I'm running into is the lack of > debugging facilities in the daemon. I see two problems: > > 1. the daemon uses syslog exclusively for output. Since syslogd doesn't > start until after network-physical, debugging based on output to syslog > doesn't work. Maybe I'm missing something wrt SMF, but my immediate > observation was that when network/datalink-management fails, syslog > doesn't start, which implies some chain of broken dependencies. > Currently, the network/physical and device/local services depend on the datalink-management service. Maybe the service which starts syslog has dependency on those two services?
But I tried to log some messages at the very early stage of dlmgmtd (before dlmgmt_init() is called), and the logging seems to work fine. It seems that there is some kind of buffering mechanism to prevent the messages logged before syslogd starts from being lost. > 2. there is no option to prevent dlmgmtd from daemonizing, which makes > debugging difficult if one wants to debug with dtrace or mdb. The daemon > fails and exists before those tools can attach to the process, so it > would be convenient to be able to launch the daemon from those tools and > have it not detach from the controlling terminal. > > It might be worthwhile to implement a private and undocumented -d option > that addresses these two issues by not daemonizing and printing > everything to stderr instead of syslog. Thoughts? > As discussed offline, you've done this and I will incorporate this in the UV gate soon. Thanks - Cathy
