saltstack / saltstack/salt

`file.managed` fails in `/proc`

Open
#55,015 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of Issue

Attempts to set ip_forward flag in /proc fail using file.managed.

Setup
/proc/sys/net/ipv4/ip_forward:
  file.managed:
    - contents: |
        1
Steps to Reproduce Issue

Run the state. See the issue:

  ID: /proc/sys/net/ipv4/ip_forward
                  Function: file.managed
                    Result: False
                   Comment: Failed to commit change: [Errno 2] No such file or directory: '/proc/sys/net/ipv4/ip_forwardau_x0ze7'
                   Started: 20:47:26.891354
                  Duration: 23.426 ms
                   Changes:   
                            ----------
                            diff:
                                --- 
                                +++ 
                                @@ -1 +1 @@
                                -0
                                +1
Versions Report
Salt Version:
           Salt: 2019.2.2-3-g71e0088
 
Dependency Versions:
           cffi: 1.13.0
       cherrypy: Not Installed
       dateutil: 2.8.0
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10.3
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Oct  7 2019, 12:59:55)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 18.1.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2
 
System Versions:
           dist: Ubuntu 18.04 bionic
         locale: UTF-8
        machine: x86_64
        release: 4.15.0-65-generic
         system: Linux
        version: Ubuntu 18.04 bionic
 

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 from the file.managed entry point and reproduce the state against /proc/sys/net/ipv4/ip_forward on Ubuntu/Linux. Investigate why the change uses a temporary path that procfs cannot create; done means file.managed can set ip_forward successfully without the reported temporary-file error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.