On Tue, Mar 23, 2010 at 11:42:10AM -0700, Allan wrote:
> Hello,
> This time I decided to create a zone from scratch and see if the problem 
> still persists.
> # zonecfg -z myzone info
> zonename: myzone
> zonepath: /zones/myzone
> brand: ipkg
> autoboot: false
> bootargs: 
> pool: 
> limitpriv: 
> scheduling-class: 
> ip-type: exclusive
> hostid: 
> net:
>         address not specified
>         physical: zon0
>         defrouter not specified
> >From in the zone:
> # uname -a
> SunOS myzone 5.11 snv_134 i86pc i386 i86xpv
> # svcs ssh
> STATE          STIME    FMRI
> offline        15:15:51 svc:/network/ssh:default
> # svcadm enable ssh
> # svcs ssh
> STATE          STIME    FMRI
> offline        15:15:51 svc:/network/ssh:default
> # tail /var/svc/log/network-ssh\:default.log 
> [ Mar 23 15:15:34 Disabled. ]
> [ Mar 23 15:15:34 Rereading configuration. ]
> [ Mar 23 15:15:51 Enabled. ]
> [ Mar 23 15:15:51 Rereading configuration. ]
> I can replicate the exact same thing using nginx. The only way to get these 
> services to start from within a zone is to execute the script listed in the 
> SMF for that service. Any help tracing down the root of this problem is 
> greatly appreciated.

svcadm commands are executed asynchronously, so it's not surprising to
that a service is not enabled right after you run svcadm enable.  if you
want svcadm to wait till a service is enabled before it returns, use the
-s option.  ie, do:
        svcadm enable -s ssh

also, smf won't enable services until all their dependants are online.
so the likely reason you're not seeing the service enabled is because
some service it depends on is offilne.  whenever you have a problem with
any smf service, you should run svcs -x to see what the status of the
system is.  so run:
        svcs -x ssh
        svcs -x

so after installing your zone, did you run zlogin -C and configure the
zone?  if not, then smf is running sysidtool and it's waiting for your
input on the console, and smf won't start ssh (and a bunch of other
services) until the configuration service is finished.

also, you really should never run smf methods by hand.  if you do, smf
doesn't know anything about them.  so you wouldn't expect to see any
changes in smf state.  (ie, if you run the start method by hand, that
won't change the service state within smf.  and if you run the stop
method by hand, then smf will just restart the service since as far as
it's concerned the service should still be online.

zones-discuss mailing list

Reply via email to