nova: dhcp_release command not found on RHEL6

Bug #970893 reported by Sumit Sengupta
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Joe Gordon

Bug Description

nova-network log has error on RHEL6.x where it tries to execute dhcp_release command and fails. Do we have any setting which has to be disabled which should have been done during installation? I think this works on Ubuntu so is there any replacement for this command on RHEL6?

2012-03-30 08:56:16 ERROR nova.rpc.amqp [req-5a94ee87-fc3b-4d1b-a27c-e66991003f3a 6fc59f8248214624aec0d82556abe66f df42460ef5f74eb9bf5f12dedd6d08c1] Exception during message handling
(nova.rpc.amqp): TRACE: Traceback (most recent call last):
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/rpc/amqp.py", line 252, in _process_data
(nova.rpc.amqp): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 258, in wrapped
(nova.rpc.amqp): TRACE: return func(self, context, *args, **kwargs)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 372, in deallocate_for_instance
(nova.rpc.amqp): TRACE: super(FloatingIP, self).deallocate_for_instance(context, **kwargs)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 258, in wrapped
(nova.rpc.amqp): TRACE: return func(self, context, *args, **kwargs)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 927, in deallocate_for_instance
(nova.rpc.amqp): TRACE: **kwargs)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 248, in deallocate_fixed_ip
(nova.rpc.amqp): TRACE: address)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/manager.py", line 1218, in deallocate_fixed_ip
(nova.rpc.amqp): TRACE: self.driver.release_dhcp(dev, address, vif['address'])
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/network/linux_net.py", line 634, in release_dhcp
(nova.rpc.amqp): TRACE: utils.execute('dhcp_release', dev, address, mac_address, run_as_root=True)
(nova.rpc.amqp): TRACE: File "/home/mymachine/openstack/nova/app/nova/utils.py", line 242, in execute
(nova.rpc.amqp): TRACE: cmd=' '.join(cmd))
(nova.rpc.amqp): TRACE: ProcessExecutionError: Unexpected error while running command.
(nova.rpc.amqp): TRACE: Command: sudo dhcp_release br100 10.0.0.2 fa:16:3e:76:b8:89
(nova.rpc.amqp): TRACE: Exit code: 1
(nova.rpc.amqp): TRACE: Stdout: ''
(nova.rpc.amqp): TRACE: Stderr: 'sudo: dhcp_release: command not found\n'
(nova.rpc.amqp): TRACE:

Revision history for this message
yong sheng gong (gongysh) wrote :
Revision history for this message
Sumit Sengupta (sumit-sngpt) wrote :

Thanks for the link.

This looks like incorporated in Fedora latest release but not yet in RHEL6.x(https://bugzilla.redhat.com/show_bug.cgi?id=788485). At this point of time since its missing on RHEL, is it possible to disable "force_dhcp_release" option from Nova? I mean what would be the side affect, if any? Just curious.

Thanks!

Revision history for this message
yong sheng gong (gongysh) wrote : Re: [Bug 970893] Re: nova: dhcp_release command not found on RHEL6
Download full text (4.1 KiB)

force_dhcp_release=false

----------------------------------------------------------------------------------------------------------------------------------------
Yong Sheng Gong(龚永生)
Advisory Software Engineer
Cloud Development and Cloud Solution Integration
China Systems & Technology Lab
Mobile: 15810992504
Skype: gong_ys2004
Email:<email address hidden>
Address: Ring Building, No. 28, ZhongGuanCun Software Park, No.8 Dong Bei
Wang West Road, Haidian District Beijing P.R.China 100193
地址: 北京市海淀区东北旺西路8号中关村软件园28号楼环宇大厦 邮政编码:100193

From: Sumit Sengupta <email address hidden>
To: Yong Sheng Gong/China/IBM@IBMCN
Date: 04/02/2012 03:16 PM
Subject: [Bug 970893] Re: nova: dhcp_release command not found on RHEL6
Sent by: <email address hidden>

Thanks for the link.

This looks like incorporated in Fedora latest release but not yet in
RHEL6.x(https://bugzilla.redhat.com/show_bug.cgi?id=788485). At this
point of time since its missing on RHEL, is it possible to disable
"force_dhcp_release" option from Nova? I mean what would be the side
affect, if any? Just curious.

Thanks!

** Bug watch added: Red Hat Bugzilla #788485
   https://bugzilla.redhat.com/show_bug.cgi?id=788485

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/970893

Title:
  nova: dhcp_release command not found on RHEL6

Status in OpenStack Compute (Nova):
  New

Bug description:
  nova-network log has error on RHEL6.x where it tries to execute
  dhcp_release command and fails. Do we have any setting which has to be
  disabled which should have been done during installation? I think this
  works on Ubuntu so is there any replacement for this command on RHEL6?

  2012-03-30 08:56:16 ERROR nova.rpc.amqp
[req-5a94ee87-fc3b-4d1b-a27c-e66991003f3a 6fc59f8248214624aec0d82556abe66f
df42460ef5f74eb9bf5f12dedd6d08c1] Exception during message handling
  (nova.rpc.amqp): TRACE: Traceback (most recent call last):
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/rpc/amqp.py", line 252, in
_process_data
  (nova.rpc.amqp): TRACE: rval = node_func(context=ctxt, **node_args)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/network/manager.py", line 258, in
wrapped
  (nova.rpc.amqp): TRACE: return func(self, context, *args, **kwargs)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/network/manager.py", line 372, in
deallocate_for_instance
  (nova.rpc.amqp): TRACE: super(FloatingIP, self).deallocate_for_instance
(context, **kwargs)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/network/manager.py", line 258, in
wrapped
  (nova.rpc.amqp): TRACE: return func(self, context, *args, **kwargs)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/network/manager.py", line 927, in
deallocate_for_instance
  (nova.rpc.amqp): TRACE: **kwargs)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/openstack/nova/app/nova/network/manager.py", line 248, in
deallocate_fixed_ip
  (nova.rpc.amqp): TRACE: address)
  (nova.rpc.amqp): TRACE: File
"/home/mymachine/opens...

Read more...

Revision history for this message
Sumit Sengupta (sumit-sngpt) wrote :

Since the command dhcp_release not yet available for RHEL so currently running nova with flag "force_dhcp_release=false" but not sure how it affect when I use multi-hosts system.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

If force_dhcp_release is False, your ips will return to thepool after timeout after fixed_ip_disassocate_timeout seconds:

# fixed_ip_disassociate_timeout=600

currently set to 10 minutes. As long as you have a largish pool of fixed ips and you aren't launching and terminating too rapidly you should be fine.

Revision history for this message
Russell Bryant (russellb) wrote :

I marked this as "Invalid", but just because it's not a problem in nova. If you'd like to follow up on this becoming available in RHEL or EPEL, the Fedora Cloud SIG mailing list would be a good place to ask https://lists.fedoraproject.org/mailman/listinfo/cloud

Changed in nova:
status: New → Invalid
Revision history for this message
Xuecheng Li (lixuecheng8903) wrote :

My BoolOpt to the force_dhcp_release is True,
On the RHEL6.3, I just install a tool named dnsmasq-utils
[root@controler nova]# rpm -ql dnsmasq-utils
/usr/bin/dhcp_lease_time
/usr/bin/dhcp_release
/usr/share/man/man1/dhcp_lease_time.1.gz
/usr/share/man/man1/dhcp_release.1.gz

Now the Command "dhcp_release" present . May be this can help you!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/36660

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/36660
Committed: http://github.com/openstack/nova/commit/8c5d132f2f1e8bebd8f167b46d5155134bd6a78c
Submitter: Jenkins
Branch: master

commit 8c5d132f2f1e8bebd8f167b46d5155134bd6a78c
Author: Joe Gordon <email address hidden>
Date: Thu Jul 11 10:31:51 2013 +0100

    Change force_dhcp_release default to True

    Historically it was was false because it requires the dnsmasq binary
    'dhcp_release' which was not present in all distros.

    Related to bug 970893

    DocImpact

    Change-Id: I4975d85a66fb930d6a56900dd569cec2a1874439

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.