For the TX (Trusted Extensions) test suite, we need to restart the 
'system/name-service-cache' service when certain system files are 
changed.  This is done with the following command:

/usr/sbin/svcadm restart system/name-service-cache

Some times that service goes into 'maintenance', with the message:

[ Apr 26 22:05:51 Restarting too quickly, changing state to maintenance ]

The test cases may be just issuing the above command a second time 
before the first 'restart' is complete, or something else may be happening.

More of the log shows:

[ Apr 26 22:05:45 Stopping because service restarting. ]
[ Apr 26 22:05:45 Executing stop method (:kill) ]
[ Apr 26 22:05:45 Executing start method ("/lib/svc/method/svc-nscd") ]
[ Apr 26 22:05:45 Method "start" exited with status 0 ]
[ Apr 26 22:05:50 Stopping because service restarting. ]
[ Apr 26 22:05:50 Executing stop method (:kill) ]
[ Apr 26 22:05:50 Executing start method ("/lib/svc/method/svc-nscd") ]
[ Apr 26 22:05:50 Method "start" exited with status 0 ]
[ Apr 26 22:05:50 Stopping because service restarting. ]
[ Apr 26 22:05:50 Executing stop method (:kill) ]
[ Apr 26 22:05:50 Executing start method ("/lib/svc/method/svc-nscd") ]
[ Apr 26 22:05:50 Method "start" exited with status 0 ]
[ Apr 26 22:05:51 Stopping because service restarting. ]
[ Apr 26 22:05:51 Executing stop method (:kill) ]
[ Apr 26 22:05:51 Executing start method ("/lib/svc/method/svc-nscd") ]
[ Apr 26 22:05:51 Method "start" exited with status 0 ]
[ Apr 26 22:05:51 Stopping because service restarting. ]
[ Apr 26 22:05:51 Executing stop method (:kill) ]
[ Apr 26 22:05:51 Restarting too quickly, changing state to maintenance ]


What is the expected result if that command is executed 'back to back'?  
Is there 'protection' from a second call interfering with the first?  
Does the service have to 'protect' itself?

If this is considered a 'no-no', then what can the test cases do to 
avoid causing the 'maintenance' mode here?  Is there a 'state' or 
something that can be checked before issuing the 'restart'?

Thanks - Monte


Reply via email to