Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Debian11][resolvconf] Please update symlink path for debian11/resolvconf #36

Open
Yoda-BZH opened this issue May 18, 2021 · 3 comments
Labels

Comments

@Yoda-BZH
Copy link

Your setup

Formula commit hash / release tag

Using formula at 57fca1d

Versions reports (master & minion)

$ salt-minion --versions-report
Salt Version:
          Salt: 3002.6
 
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: 0.37.1
          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: 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-6-amd64
        system: Linux
       version: Debian GNU/Linux 11 bullseye

Salt syndic:

# salt --versions-report
Salt Version:
          Salt: 3002.6
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.7.3
     docker-py: Not Installed
         gitdb: 2.0.5
     gitpython: 2.1.11
        Jinja2: 2.10
       libgit2: Not Installed
      M2Crypto: 0.31.0
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: 2.6.1
  pycryptodome: 3.6.1
        pygit2: Not Installed
        Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.1.2
         smmap: 2.0.5
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.1
 
System Versions:
          dist: debian 10 buster
        locale: UTF-8
       machine: x86_64
       release: 4.19.0-16-amd64
        system: Linux
       version: Debian GNU/Linux 10 buster

Pillar / config used

{% set use_resolvconf = false %}
{% if __grains__.get('os') == 'Debian' %}
{%   if __grains__.get('osmajorrelease', 0) >= 11 %}
{%     set use_resolvconf = true %}
{%   endif %}
{% endif %}


{% if use_resolvconf %}
states:
  list:
    - resolver.ng
{% endif %}

resolver:

  domain: example.com
  nameservers: {{ dnsservers | json }}

Bug details

Describe the bug

When applying:

local:
----------
          ID: resolv-file
    Function: file.managed
        Name: /etc/resolvconf/resolv.conf.d/base
      Result: True
     Comment: File /etc/resolvconf/resolv.conf.d/base updated
     Started: 13:06:06.671173
    Duration: 25.268 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -1,5 +1,6 @@
                  -# THIS FILE IS MANAGED BY SALTSTACK
                  -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
                  +# Dynamic resolv.conf(5) file for glibc resolver(3) generated by salt-minion(1)
                  +#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
                   domain example.com
                  +search example.com 
                   nameserver 192.0.2.1
                   nameserver 192.0.2.2
----------
          ID: resolv-update
    Function: cmd.run
        Name: resolvconf -u
      Result: True
     Comment: Command "resolvconf -u" run
     Started: 13:06:06.699972
    Duration: 21.766 ms
     Changes:   
              ----------
              pid:
                  36785
              retcode:
                  0
              stderr:
                  /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
              stdout:

$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 31 May 18 11:56 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf

Steps to reproduce the bug

Expected behaviour

in debian 11 with resolvconf, managed symlink should point to /run/resolvconf/resolv.conf

Attempts to fix the bug

forcing with:

resolver:
  ng:
    resolvconf:
      file: /run/resolvconf/resolv.conf

should work, but it should be automatic.

Additional context

None

@Yoda-BZH Yoda-BZH added the bug label May 18, 2021
@defanator
Copy link

Just faced the same issue. It turned out that resolvconf package in bullseye does not make /etc/resolvconf/run symlink anymore.

@sylvainfaivre
Copy link
Contributor

This is documented in the changelog for the resolvconf Debian package :


resolvconf (1.80) unstable; urgency=medium

[...]

  [ Steve Langasek ]
  * Eliminate all references to /etc/resolvconf/run.  This should all be done
    directly in /run, there is no reason to support making any of this
    configurable with a symlink since we already have a versioned dependency
    on the version of initscripts that introduces the /run transition.

This version landed in Debian 11 (Bullseye), so starting with this release, the map.jinja should set conf_path to /run/resolvconf/resolv.conf instead of /etc/resolvconf/run/resolv.conf

(sorry, I don't have time to do a PR for this right now, maybe later)

@jnijdam jnijdam mentioned this issue Jan 12, 2022
11 tasks
@daks
Copy link
Member

daks commented Feb 10, 2022

I think this can be closed after merge of #39 and #40, @Yoda-BZH can you test and confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants