saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.15k stars 5.48k forks source link

num_cpus grain missing with Salt 2016.3.1 on FreeBSD 10.x #34554

Closed stjack99 closed 8 years ago

stjack99 commented 8 years ago

Salt 2016.3.1 on FreeBSD 10.x is missing the num_cpus grain. It still shows num_gpus and other grains. ... master: salt mem_total: 999 nodename: pc-1.somewhere.com num_gpus: 0 os: FreeBSD os_family: FreeBSD osarch: amd64 osfinger: FreeBSD-10.2 osmajorrelease: 10 osrelease: 10.2 ...

Steps to Reproduce Issue

--- Salt 2016.3.0_1 --- salt-call grains.item num_cpus local:

num_cpus:
    1

--- Salt 2016.3.1 --- salt-call grains.item num_cpus local:

num_cpus:

Versions Report

Salt Version: Salt: 2016.3.1

Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.5.0 gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.8 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.7 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pygit2: Not Installed Python: 2.7.11 (default, Jun 18 2016, 09:03:49) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.2.0 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.3 ZMQ: 4.1.4

System Versions: dist:
machine: amd64 release: 10.2-RELEASE system: FreeBSD version: Not Installed

Ch3LL commented 8 years ago

@stjack99 I believe this is related to #34382 There is a patch posted there and I'll work on getting a PR together sometime today. If you try that does it work for you? Although I need to actually move the patch below the try/else block which will be the case in the PR.

andygrunwald commented 8 years ago

I can confirm this. Would be lovely to get it back, because we need this numcpu setting to configure the correct Setting for a PHP L1 cache (xcache).

rallytime commented 8 years ago

@stjack99 and @andygrunwald I just merged the fix from @Ch3LL - can you guys give that a try and confirm the fix?

junovitch commented 8 years ago

We've been carrying the patch from https://github.com/saltstack/salt/issues/34382 as part of the FreeBSD port since https://github.com/freebsd/freebsd-ports/commit/02145140146049128f322fe093835cffec47334c

rallytime commented 8 years ago

Ok, the fix from @Ch3LL will be included in the 2016.3.2 release. Since this is confirmed to have fixed this issue by @junovitch, and this appears to be both a duplicate of #34382 and #33608 essentially, I am going to close this. Thanks everyone!