https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Bug ID: 1269191 Summary: Skydns cannot bind to port 53 Product: Fedora Version: 22 Component: golang-github-skynetservices-skydns Assignee: fpokorny@redhat.com Reporter: costan@gmail.com QA Contact: extras-qa@fedoraproject.org CC: fpokorny@redhat.com, golang@lists.fedoraproject.org, jchaloup@redhat.com, lsm5@redhat.com
Description of problem: By default, skydns runs under its own user, so it cannot bind to port 53.
Version-Release number of selected component (if applicable): 0.7.git6c94cbe.fc22 This is the version in updates-testing for Fedora 22. It seems like it needs more karma to be promoted to stable.
How reproducible: always
Steps to Reproduce: 1. dnf install skydns 2. systemctl start skydns 3. systemctl status skydns 4. dig @127.0.0.1 skydns.local
Actual results: skydns errors out because it can't bind to port 53. I can't issue DNS queries.
Expected results: I should be able to issue DNS queries.
Additional info:
I worked around this problem by creating a systemd socket file, and using socket activation. skydns supports this. I'll be happy to provide additional details, if it helps. I think this is a good solution, as it avoids having to run skydns as root.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #1 from Jan Chaloupka jchaloup@redhat.com --- Hi Victor,
thank you for reporting the issue. The workaround is appreciated, can you share?
Jan
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #2 from Victor Costan costan@gmail.com --- My workaround is documented below. After following these steps, skydns works perfectly for me. Thank you very much for packaging it!
1) I wrote the following in /etc/systemd/system/skydns.socket (the package would presumably use /usr/lib/systemd/system/skydns.socket instead):
[Socket] ListenStream=0.0.0.0:53 ListenDatagram=0.0.0.0:53
[Install] WantedBy=sockets.target
2) I set systemd to true in skydns's etcd config:
etcdctl set /skydns/config \ '{"ttl": 3600, "systemd": true, "domain": "skydns.local."}'
I also submitted a PR to skydns to make it possible to set an environment variable instead, which could be done in skydns.conf.
https://github.com/skynetservices/skydns/pull/229
The skydns package could also interpolate an env var like OTHER_OPTIONS in the skydns command line, along the lines of what the docker package does. Specifically, in skydns.service
ExecStart=/usr/bin/skydns $OTHER_OPTIONS
This way, one could set OTHER_OPTIONS="--systemd" in skydns.conf
3) I manually enabled and started the socket. I'm not sure that's necessary.
systemctl enable skydns.socket systemctl start skydns.socket
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Jan Chaloupka jchaloup@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |costan@gmail.com Flags| |needinfo?(costan@gmail.com)
--- Comment #3 from Jan Chaloupka jchaloup@redhat.com --- At the current state of skydns's dependencies, I can rebuilt skydns. What version of skydns would you like to have in Fedora? The latest is 2.4.0c. Not sure how stable it is. Have you had a change to play with upstream build?
[1] https://github.com/skynetservices/skydns/releases/tag/2.4.0c
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Victor Costan costan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(costan@gmail.com) |
--- Comment #4 from Victor Costan costan@gmail.com --- I haven't had a chance to play with the upstream build. I'd be happy to do so, if it helps!
For my needs, the version in Fedora has been working out flawlessly, modulo this bug.
I'd wait until we have a resolution on my PR. If the author decides to merge it, I think it's worth updating straight to the relevant git revision in the repository.
Socket-activation aside, it seems to me that there aren't many improvements between 2.4.0a and 2.4.0c, so updating skydns might not be worth the testing effort if we can't get the extra socket activation option.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #5 from Jan Chaloupka jchaloup@redhat.com --- My typo, it meant the current skydns can not be rebuilt as its dependencies have been updated to the state they break backward compatibility with the skydns. The only way how to patch it is to built one of the latest releases. At least in rawhide. If it will work for you, it can be promoted to f23 and f22.
Once all deps are updated and packaged, it is fairly straightforward to update it to newer version. Though, not aware how much skydns changes its set of deps.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #6 from Victor Costan costan@gmail.com --- Sorry for misunderstanding! In that case, should I wait for an updated skydns package to test, or would you prefer that I build 2.4.0c from upstream on my own and try it out?
I'll be happy to help out with testing either way!
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Jan Chaloupka jchaloup@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Fixed In Version| |golang-github-skynetservice | |s-skydns-2.5.3-0.1.a.git868 | |8008.fc24 Flags| |needinfo?(costan@gmail.com)
--- Comment #7 from Jan Chaloupka jchaloup@redhat.com --- The build is ready for testing [1]. Good luck and thanks :).
[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=694593
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Victor Costan costan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(costan@gmail.com) |
--- Comment #8 from Victor Costan costan@gmail.com --- It worked for me!
I uninstalled the old skydns and installed this one, then replaced /etc/skydns/skydns.conf with my version. Skydns is answering queries just like before, and my cluster is stable. This is ready to ship, as far as I'm concerned.
Thank you very much for all the changes!
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #9 from Victor Costan costan@gmail.com --- I'm ready to +1 the update on bodhi, if it helps.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-aadc2e2de8
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-aadc2e2de8
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14c8299f15
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #12 from Victor Costan costan@gmail.com --- I tested both the fc22 and the fc23 versions and +1ed them in Bodhi.
Can you please release the update to testing or stable, so I can have my deployment scripts get it straight from dnf?
Sorry if I'm referencing the wrong procedure. I looked at this page [1], because Bodhi lists the updates as "pending".
Thank you very very much for the fix!
Context: I worked at Google around 2009, and I've been really missing the Borg DNS service. Skydns brings me the same convenience, and it's super-easy to set up now, thanks to your fix!
[1] https://fedoraproject.org/wiki/Bodhi#Pending
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #13 from Jan Chaloupka jchaloup@redhat.com --- Thanks Victor.
It takes some time before the update gets into updates-testing repository. Nothing I can do about it right now.
Do you have any tips how to test skydns? I would like to run some integration tests for each update of it to see if it is working or not.
Glad to hear the effort to package and maintain skydns is not in vain :).
Cheers Jan
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update golang-github-skynetservices-skydns' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14c8299f15
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update golang-github-skynetservices-skydns' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-aadc2e2de8
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #16 from Victor Costan costan@gmail.com --- I severely underestimated the lag between "pending" and "testing". Sorry for the spam!
I have a Vagrantfile that spawns a bunch of VMs and uses Ansible to deploy a bunch of things. I can get you a trimmed down list of Ansible roles that bring up etcd and skydns on a single machine. Alternatively, I can get you a shell script that does the same thing.
I can imagine using something like bats [1] the way docker-swarm uses it [2]. If both you and the skydns author are interested, I could look into writing a few tests and contributing them to the repository.
Last, my PR got merged into skydns [3]. If this doesn't translate into a large amount of work, would it be possible for you to package the git tree for that commit (or a more recent one) into fedora?
The commit I referenced would honor a "SKYDNS_SYSTEMD=true" line in /etc/skydns/skydns.conf, reducing the manual configuration overhead by a tiny bit. Most importantly, The etcd configuration for skydns would be relieved of a "systemd: true" key, which really looks like an implementation detail to me.
What do you think of all the things I mentioned here?
[1] https://github.com/sstephenson/bats [2] https://github.com/docker/swarm/tree/master/test/integration [3] https://github.com/skynetservices/skydns/commit/2ed66bcd0ec7d50cc89dfad1a68a...
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version|golang-github-skynetservice |golang-github-skynetservice |s-skydns-2.5.3-0.1.a.git868 |s-skydns-2.5.3-0.1.a.git868 |8008.fc24 |8008.fc24 | |golang-github-skynetservice | |s-skydns-2.5.3-0.1.a.git868 | |8008.fc23 Resolution|--- |ERRATA Last Closed| |2016-01-04 13:53:10
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
--- Comment #18 from Fedora Update System updates@fedoraproject.org --- golang-github-skynetservices-skydns-2.5.3-0.1.a.git8688008.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1269191
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|golang-github-skynetservice |golang-github-skynetservice |s-skydns-2.5.3-0.1.a.git868 |s-skydns-2.5.3-0.1.a.git868 |8008.fc24 |8008.fc24 |golang-github-skynetservice |golang-github-skynetservice |s-skydns-2.5.3-0.1.a.git868 |s-skydns-2.5.3-0.1.a.git868 |8008.fc23 |8008.fc23 | |golang-github-skynetservice | |s-skydns-2.5.3-0.1.a.git868 | |8008.fc22
golang@lists.fedoraproject.org