saltstack / saltstack/salt

netconfig.managed forces base enviroment as default

Open
#54,927 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-low ZD
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

netconfig.managed forces the use of base as the default for saltenv. this if you aren't looking for it can cause problems if you are planning to use netconfig.managed inside an environment and forget to specify - saltenv: {{saltenv}} in the stanza.

Setup

setup netconfig.managed in a different environment with the template file in that same environment. but don't include a saltenv line in the stanza.

Steps to Reproduce Issue

Use the above setup and run a highstate on the proxy minion with --saltenv=your_enviroment
Watch as the template is tried to be pulled from base and fails.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
This looks like saltenv was changed from None to base in 2019.2.0 in the code. It should most likely be returned to None.

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

Start at the netconfig.managed entry point and inspect the saltenv handling, especially the change introduced in 2019.2.0. Reproduce the highstate with --saltenv=your_environment and a template in that environment; done means the template lookup uses the selected environment when no saltenv is specified in the stanza.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.