Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9240

Solaris SMF service has to support non global zone

    XMLWordPrintable

Details

    • Hide

      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. 

      Show
      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. 
    • Platform OS
    • Platform OS Kanban
    • Reviewed
    • 32270
    • 1
    • Bug Fix
    • Hide
      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.
      Show
      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.
    • Needs Assessment

    Description

      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 
      5.5.4 
      root@haltest:~# pkg list hal 
      NAME (PUBLISHER) VERSION IFO 
      system/hal (solaris) 0.5.11-0.175.3.9.0.2.0 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

       

      Attachments

        Activity

          People

            enis.inan Enis Inan
            karthikeyan.kanagaraj Karthikeyan Kanagaraj
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support