pygmystack / pygmy-legacy

Use pygmystack/pygmy instead
https://github.com/pygmystack/pygmy
MIT License
25 stars 17 forks source link

Empty commented lines and apersand in /etc/resolv.conf makes pygmy fail #57

Closed luksak closed 1 year ago

luksak commented 3 years ago

On Fedora my /etc/resolv.conflooks like this:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad

I get this error:

pygmy up 
Successfully started dnsmasq
Successfully started haproxy
Successfully created amazeeio network
Successfully connected haproxy to amazeeio network
Successfully started mailhog
Successfully started ssh-agent
Requesting sudo to write to /etc/resolv.conf
status to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.1  # added by amazee.io pygmy
nameserver 127.0.0.53
options edns0 trust-ad' | sudo tee /etc/resolv.conf >/dev/null: -c: line 0: unexpected EOF while looking for matching `''
status to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.1  # added by amazee.io pygmy
nameserver 127.0.0.53
options edns0 trust-ad' | sudo tee /etc/resolv.conf >/dev/null: -c: line 7: syntax error: unexpected end of file
Error configuring local resolver

Removing the empty commented lines and the commented lines containing an ", it runs through:

# This file is managed by man:systemd-resolved(8). Do not edit.
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
# currently in use.
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
tobybellwood commented 1 year ago

https://github.com/pygmystack/pygmy fixes this