[PUP-9240] Solaris SMF service has to support non global zone Created: 2018/10/16  Updated: 2019/12/12  Resolved: 2018/12/20

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 5.5.10, PUP 6.0.5, PUP 6.1.0

Type: New Feature Priority: Normal
Reporter: Karthikeyan Kanagaraj Assignee: Enis Inan
Resolution: Fixed Votes: 0
Labels: customer, resolved-issue-added, service, solaris, type_and_provider
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Acceptance Criteria:

Other than generic.xml, need to check either service or related-package installed on that machine to confirm that service can bring up or stop using puppet. 

Team: Platform OS
Sprint: Platform OS Kanban
CS Priority: Reviewed
Zendesk Ticket IDs: 32270
Zendesk Ticket Count: 1
Release Notes: Bug Fix
Release Notes Summary: The SMF provider can now distinguish between complete/incomplete services on Solaris 11.1+. An incomplete service will have the same semantics as a nonexistent service. Specifically, Puppet will report its state as ensure => stopped and enabled => false, and it will raise an error if one attempts to set ensure => running or enabled => true on the service.
QA Risk Assessment: Needs Assessment


Solaris SMF service has to support the non-global zone. Currently, SMF service-check refers the generic.xml file only. If that service entry is there in that file it will check the status. 

In Solaris 11, non-global zone servers have few services name which is listed in generic.xml but related packages/services are not installed on that zone. So when puppet code checks the status, OS is not giving any output and service is failing with an error.

Error: /Stage[main]/Main/Service[hal]: Could not evaluate: Unmanageable state '' on service hal 


Recreate Reproduce steps : 

-Install  zone on Solaris 11.3 machine 

  • Don't configure anything on the machine 
  • check out the hal service as an example. It ends up that the package appears as installed (pkg list hal, pkg verify hal) 
  • check that it's not an 'installed' service: svcs -a | grep -i hal 
  • Install puppet agent 
  • Then try to manage it with puppet: puppet apply -e 'service { "hal": ensure=>"stopped", enable =>false,}'

This will fail, looking like this: 
root@haltest:~# puppet --version 
root@haltest:~# pkg list hal 
system/hal (solaris) 0.5.11- i-- 
root@haltest:~# pkg verify hal 
root@haltest:~# svcs -a | grep hal 
root@haltest:~# puppet apply -e 'service { "hal": ensure=>"stopped", enable =>false,}' 
Notice: Compiled catalog for haltest.mel182frm.vic.au.anz in environment production in 0.03 seconds 
Error: /Stage[main]/Main/Service[hal]: Could not evaluate: Unmanageable state '' on service hal 
Notice: Applied catalog in 0.20 seconds


Comment by Kenn Hussey [ 2018/12/19 ]

Enis Inan can this be resolved now?

Generated at Sun Jul 12 22:36:21 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.