GithubHelp home page GithubHelp logo

flaktack / systemd-resolved-docker Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 4.0 41 KB

systemd-resolved and docker DNS integration

Home Page: https://copr.fedorainfracloud.org/coprs/flaktack/systemd-resolved-docker/

License: Other

Python 73.98% Shell 26.02%
dns docker systemd-resolved

systemd-resolved-docker's Issues

Handle differing systemd dbus interface versions

Currently the dbus code works around having different methods in different systemd versions by catching exceptions, replace it with an actual version check.

try:
ips = [
[
AF_INET if isinstance(ip_port.ip, ipaddress.IPv4Address) else AF_INET6,
ip_port.ip.packed,
ip_port.port,
"",
]
for ip_port in self.listen_addresses
]
manager = self.if_manager()
manager.SetLinkDNSEx(self.ifindex, ips)
manager.SetLinkDNSSEC(self.ifindex, "no")
manager.SetLinkDomains(self.ifindex, domains)
except Exception as ex:
ips = [
[
AF_INET if isinstance(ip_port.ip, ipaddress.IPv4Address) else AF_INET6,
ip_port.ip.packed
]
for ip_port in self.listen_addresses
]
manager = self.if_manager()
manager.SetLinkDNS(self.ifindex, ips)
manager.SetLinkDNSSEC(self.ifindex, "no")
manager.SetLinkDomains(self.ifindex, domains)

Unexpected git history rewrite

๐Ÿ‘‹๐Ÿป I considered this project interesting and decided to mirror is to my infrastructure. Today the mirroring process warned me that a push failed due to a history rewrite.

A few minutes later, I figure out, that all commits after 6be3a30 have been rewritten including various tags.

Not this is a problem, I just want to check with you, that this was intended behaviour and not an accident.

For comparison:
My mirror: https://git.shivering-isles.com/github-mirror/flaktack/systemd-resolved-docker/-/commits/master
This repository: https://github.com/flaktack/systemd-resolved-docker/commits/master

Deb build attempt for bionic/18.04 fails with "The 'dbus-python' distribution was not found"

Would very much like to use this with Ubuntu bionic/18.04 (because reasons), so attempting to manual-build following the steps in the github/workflows/workflow.yml. Figuring the build process for 20.04 would be closest - that whole process works fine and a python-systemd-resolved-docker_1.0.0_all.deb is built and can be installed.

The problem shows up with the service not starting. Running manually with sudo /usr/bin/systemd-resolved-docker results in

ubuntu@bionic:~/systemd-resolved-docker$ sudo /usr/bin/systemd-resolved-docker
Traceback (most recent call last):
  File "/usr/bin/systemd-resolved-docker", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'dbus-python' distribution was not found and is required by systemd-resolved-docker

Does not work with IPv6?

systemd[1]: Starting systemd-resolved-docker.service - systemd-resolved and docker DNS integration...
systemd-resolved-docker[4018773]: Found gateway 172.17.0.1 for docker0
systemd-resolved-docker[4018773]: Found gateway fd00:ffff::1 for docker0 
systemd-resolved-docker[4018773]: Default domain: docker, allowed domains: .docker 
systemd-resolved-docker[4018773]: Traceback (most recent call last): 
systemd-resolved-docker[4018773]:   File "/usr/bin/systemd-resolved-docker", line 33, in <module>
systemd-resolved-docker[4018773]:     sys.exit(load_entry_point('systemd-resolved-docker==1.0.0', 'console_scripts', 'systemd-resolved-docker')())
systemd-resolved-docker[4018773]:   File "/usr/lib/python3.10/site-packages/systemd_resolved_docker/cli.py", line 60, in main
systemd-resolved-docker[4018773]:     docker_listen_addresses = parse_listen_address(docker_listen_address,
systemd-resolved-docker[4018773]:   File "/usr/lib/python3.10/site-packages/systemd_resolved_docker/utils.py", line 28, in parse_listen_address
systemd-resolved-docker[4018773]:     return default_value()   
systemd-resolved-docker[4018773]:   File "/usr/lib/python3.10/site-packages/systemd_resolved_docker/cli.py", line 61, in <lambda>
systemd-resolved-docker[4018773]:     lambda: [parse_ip_port(entry['gateway']) for entry in
systemd-resolved-docker[4018773]:   File "/usr/lib/python3.10/site-packages/systemd_resolved_docker/cli.py", line 61, in <listcomp>
systemd-resolved-docker[4018773]:     lambda: [parse_ip_port(entry['gateway']) for entry in
systemd-resolved-docker[4018773]:   File "/usr/lib/python3.10/site-packages/systemd_resolved_docker/utils.py", line 21, in parse_ip_port
systemd-resolved-docker[4018773]:     return IpAndPort(ip=ipaddress.ip_address(result.hostname), port=result.port or default_port)
systemd-resolved-docker[4018773]:   File "/usr/lib64/python3.10/ipaddress.py", line 54, in ip_address
systemd-resolved-docker[4018773]:     raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
systemd-resolved-docker[4018773]: ValueError: 'fd00' does not appear to be an IPv4 or IPv6 address

I had a quick look to try to find where the rest of the IPv6-address is stripped after it "found gateway", but did not see anything obvious.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.