doc-correctiondocumentationgood first issuehelp-wantedseverity-mediumtime-estimate-single-day
Description
Description
I tried to use the state aptpkg.held as shown in the documentation, only for that state to apparently not exist.
I tried looping through state modules such as apt, pkg, and aptpkg with hold and held states, to find apt.held as the actually correct usage.
$ for major in apt pkg aptpkg ; do for minor in hold held ; do salt 'minion' state.single $major.$minor name=salt-minion ; done ; done
minion:
Data failed to compile:
----------
Specified state 'apt.hold' was not found
ERROR: Minions returned with non-zero exit code
minion:
----------
ID: salt-minion
Function: apt.held
Result: True
Comment: Package salt-minion is already held
Started: 17:21:33.289213
Duration: 21.015 ms
Changes:
Summary for minion
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 21.015 ms
minion:
Data failed to compile:
----------
Specified state 'pkg.hold' was not found
ERROR: Minions returned with non-zero exit code
minion:
Data failed to compile:
----------
Specified state 'pkg.held' was not found
ERROR: Minions returned with non-zero exit code
minion:
Data failed to compile:
----------
Specified state 'aptpkg.hold' was not found
ERROR: Minions returned with non-zero exit code
minion:
Data failed to compile:
----------
Specified state 'aptpkg.held' was not found
ERROR: Minions returned with non-zero exit code
Suggested Fix
The documentation should be changed to be salt.states.apt instead of salt.states.aptpkg since salt.states.aptpkg.held is not a valid state.
Type of documentation State module documentation.
Location or format of documentation Insert page URL if applicable.
Additional context Appears to impact at least 3004.0 and 3004.1, not sure if 3003 and earlier. Using Ubuntu 20.04 for testing.