saltstack / saltstack/salt

[BUG] 'modules.ethtool.set_ring' call a non-existant function 'get_ringparam'

Open
#62,853 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage State-Module
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
'states.ethtool.ring' and 'modules.ethtool.set_ring' are currently unusable due to calling a non-existant function.

Setup
ethtool.sls state:

ethtool_apply:
  ethtool.ring:
    - name: eth0
    - rx: 4096
    - tx: 4096

Salt-minion has ethtool installed:

# apt list --installed 2>/dev/null | grep ethtool
ethtool/stable,stable,now 1:5.9-1 amd64 [installed]
python3-ethtool/stable,stable,now 0.14-3+b3 amd64 [installed]
# pip3 list | grep ethtool
ethtool          0.14
  • 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 'states.ethtool.ring' or 'modules.ethtool.set_ring' with any parameters. The result is:

----------
          ID: ethtool_apply
    Function: ethtool.ring
        Name: eth0
      Result: False
     Comment: module 'ethtool' has no attribute 'get_ringparam'
     Started: 21:01:03.596252
    Duration: 1.339 ms
     Changes:

Expected behavior
State/module executes without errors and sets ring parameters

Versions Report

salt --versions-report
# salt --versions-report
Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: Not Installed
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.9
     gitpython: 3.1.27
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.0
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     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: 5.0.0
       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-9-amd64
        system: Linux
       version: Debian GNU/Linux 11 bullseye
salt-minion --versions-report
# salt-minion --versions-report
Salt Version:
          Salt: 3005

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.9.13 (main, Aug 23 2022, 18:31:09)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: debian 11 bullseye
        locale: utf-8
       machine: x86_64
       release: 5.10.0-9-amd64
        system: Linux
       version: Debian GNU/Linux 11 bullseye

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the modules.ethtool module and states.ethtool state named in the report, then compare their get_ringparam call with the installed Python ethtool API. Reproduce the failure using the provided ethtool.ring configuration. Done means the module and state execute without the missing-attribute error and set the requested ring parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
infrastructure, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.