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.13k stars 5.47k forks source link

[BUG] kernelparams grain shows nonsense #61021

Open heini opened 2 years ago

heini commented 2 years ago

Description The kernelparams grain on my systems shows:

    kernelparams:
        |_
          - root
          - None
        |_
          - rootflags
          - None
        |_
          - ro
          - None
        |_
          - initrd
          - EFIdebianinitrd.img

where /proc/cmdline shows:

% cat /proc/cmdline 
root=UUID=1782601d-4dea-4310-a3fa-d64d03ee51fd rootflags=subvol=@root ro initrd=EFI\debian\initrd.img

Please fix.

Setup

Steps to Reproduce the behavior

salt-call grains.items

Expected behavior Should show something that reflects the current kernel params.

Screenshots See output above.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ``` # salt-call --versions-report :( Salt Version: Salt: 3003.3 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.3 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.0 msgpack-pure: Not Installed mysql-python: 1.4.4 pycparser: Not Installed pycrypto: Not Installed pycryptodome: 3.9.7 pygit2: Not Installed Python: 3.9.2 (default, Feb 28 2021, 17:03:44) python-gnupg: Not Installed PyYAML: 5.3.1 PyZMQ: 20.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 5.10.0-8-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```
OrangeDog commented 2 years ago

I assume it's choking on the extra = in those parameters.

I don't think Bullseye is officially supported until 3004.0?

dhs-rec commented 2 years ago

Any news on this? I'm seeing this on Ubuntu 20.04 with Salt 3004.1. Note that it also omits the \ in the kernel and initrd paths. Hint: Grub is not the only bootloader out there. In this case the system is startet with an EFI bootloader (rEFInd).

# salt-call grains.item kernelparams
local:
    ----------
    kernelparams:
        |_
          - EFIubuntuvmlinuz
          - None
        |_
          - root
          - None
        |_
          - ro
          - None
        |_
          - initrd
          - EFIubuntuinitrd.img
# cat /proc/cmdline 
\EFI\ubuntu\vmlinuz root=ZFS=system/ROOT/ubuntu ro initrd=EFI\ubuntu\initrd.img