New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

productname grain missing on Solaris #47690

lomeroe opened this Issue May 16, 2018 · 1 comment


None yet
3 participants

lomeroe commented May 16, 2018

Description of Issue/Question

The 'productname' grain is missing on Solaris sparc minions. The data is instead put in 'product'.

Additionally, in some cases the product grain is not valid.

This is due to the regexes that are being used to scrape the data out of the prtdiag/prtconf/virtinfo output. The regexes use '\s' to capture whitespace, which includes newlines. This causes prtconf data to be parsed incorrectly.

For example, on a Solaris 11 zone on a S7 server:

#salt-call --local grains.get product
    Memory size: 16384 Megabytes

prtconf data is returning:

System Configuration:  Oracle Corporation  sun4v
Memory size: 16384 Megabytes

The regex in the grains file is then matching the "Memory size" line (it is expecting the model to be after the sunv4 as in prtdiag output -- which in a non-global zone does not return data).

#prtdiag -v
System Configuration:  Oracle Corporation  sun4v SPARC S7-2
Memory size: 16384 Megabytes


Solaris 11 running 2017.7

Steps to Reproduce Issue

Install minion and get 'product' grain

Versions Report

Salt Version:
           Salt: 2017.7.5

Dependency Versions:
           cffi: Not Installed
       cherrypy: 5.1.0
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: 0.4.1
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 3.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.9 (default, Apr 27 2017, 13:50:01) [C]
   python-gnupg: Not Installed
         PyYAML: 3.09
          PyZMQ: 17.0.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.3

System Versions:
         locale: 646
        machine: sun4v
        release: 5.11
         system: SunOS
        version: Not Installed

This comment has been minimized.


gtmanfred commented May 17, 2018

Thanks for the PR to help fix this!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment