Bug 822797 - HOSTNAME is not known for systemd startup script
HOSTNAME is not known for systemd startup script
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dnsmasq (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomáš Hozza
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-18 04:07 EDT by Zdenek Kabelac
Modified: 2012-11-26 23:40 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-26 23:40:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zdenek Kabelac 2012-05-18 04:07:30 EDT
Description of problem:

My /var/log/messages file has this:

dnsmasq[630]: dnsmasq: bad command line options: try --help

My assumption from looking at:

# systemctl status dnsmasq.service
dnsmasq.service - DNS caching server.
	  Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled)
	  Active: failed (Result: exit-code) since Thu, 17 May 2012 13:34:35 +0200; 20h ago
	 Process: 630 ExecStart=/usr/sbin/dnsmasq -s $HOSTNAME (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/dnsmasq.service

is that $HOSTNAME is not set.

# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
IPV6FORWARDING=no
IPV6_AUTOCONF=no
HOSTNAME=

# cat /etc/hostname 
linux


Also it looks like there are some conflicts with libvirt package,
which starts its own dnsmasq.


# LANG=C ps aux | grep dnsmasq
nobody     724  0.0  0.0  13096   832 ?        S    May17   0:00 /sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override

The problem seems to be, that during some 'yum upgrade' this fails to work,
and qemu guests are not getting their DHCP IP addresses.


Version-Release number of selected component (if applicable):
dnsmasq-2.59-5.fc18.x86_64

How reproducible:


Steps to Reproduce:
1. boot rawhide with  dnsmasq.service enabled.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Sandro Mathys 2012-09-05 05:19:00 EDT
I'm having the same issue in F17. There any intent to fix this anytime soon?
Comment 2 Fedora Admin XMLRPC Client 2012-10-22 09:20:43 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Marcos Mello 2012-11-12 11:43:42 EST
Recent systemd removed HOSTNAME variable from /etc/sysconfig/network

http://pkgs.fedoraproject.org/cgit/systemd.git/commit/?id=0969ad24898347919865e9298fa01e19cec98649

https://fedorahosted.org/fesco/ticket/963
Comment 4 Tomáš Hozza 2012-11-19 05:43:37 EST
HOSTNAME will be removed from service file. It seems to be the best solution also for Bug 753656.
Comment 5 Tomáš Hozza 2012-11-19 05:59:52 EST
(In reply to comment #1)
> I'm having the same issue in F17. There any intent to fix this anytime soon?

If you are using libvirt and virt-manager, it starts its own instances of dnsmasq. Then systemctl start dnsmasq.service will most probably fail.

The best thing to do is check journalctl to see the exact reason. When I tired it on F17 dnsmasq didn't start, because it failed to create listening socket for port 53 (address was already in use).
Comment 6 Fedora Update System 2012-11-19 07:29:40 EST
dnsmasq-2.63-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-17789/dnsmasq-2.63-3.fc18
Comment 7 Fedora Update System 2012-11-19 14:34:40 EST
Package dnsmasq-2.63-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnsmasq-2.63-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17789/dnsmasq-2.63-3.fc18
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-11-20 15:23:00 EST
Package dnsmasq-2.63-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnsmasq-2.63-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17789/dnsmasq-2.63-4.fc18
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2012-11-26 23:40:09 EST
dnsmasq-2.63-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.