[BUG] 'salt-call grains.item gpus:vendor' lists only a single GPU vendor
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
All GPU vendors and GPU model names are visible when running:
# salt-call grains.item gpus
local:
----------
gpus:
|_
----------
model:
G200eR2
vendor:
matrox
|_
----------
model:
GK110GL [Tesla K20m]
vendor:
nvidia
However, only a single one is shown when running:
# salt-call grains.item gpus:vendor
local:
----------
gpus:vendor:
matrox
On different machines, also with Matrox and Nvidia GPUs, the result will differ and the latter vendor is shown:
# salt-call grains.item gpus:vendor
local:
----------
gpus:vendor:
nvidia
The results are deterministic insofar as not to flip between vendors on the same machine but I can't seem to find the pattern why on some machines it is one and on other machines the other vendor is shown.
This makes it impossible to target machines using that particular grain, e.g.:
'gpus:vendor:nvidia':
- match: grain
- foo
will only run/apply foo to machines which return nvidia as the first, and only, vendor.
Setup
This can be observed without any specific Salt configuration in place.
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
Run salt-call grains.item gpus:vendor on any machine with GPUs from several vendors.
Expected behavior
Have all vendors returned like so:
# salt-call grains.item gpus:vendor
local:
----------
gpus:vendor:
- intel
- matrox
- nvidia
The same could be extended to gpus:model name:
# salt-call grains.item gpus:model
local:
----------
gpus:model:
- Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
- RV710/M92 [Mobility Radeon HD 4330/4350/4550]
- GK180GL [Tesla K40c]
Versions Report
salt --versions-report
# salt --versions-report
Salt Version:
Salt: 3005.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.8
Jinja2: 2.10
libgit2: 0.26.0
M2Crypto: Not Installed
Mako: 1.0.7
msgpack: 0.5.6
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.4.7
pygit2: 0.26.2
Python: 3.6.9 (default, Jun 29 2022, 11:45:57)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 17.1.2
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: ubuntu 18.04 Bionic Beaver
locale: UTF-8
machine: x86_64
release: 5.4.0-132-generic
system: Linux
version: Ubuntu 18.04 Bionic Beaver
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with salt-call grains.item gpus and salt-call grains.item gpus:vendor on a machine with GPUs from multiple vendors. Trace the gpus grain handling and compare the nested output with the gpus:vendor and gpus:model lookups. Done means all detected vendors and models are returned as lists, as shown in the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python, ubuntu
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100