Correctly handle an empty dnsmasq --domain

Bug #1161506 reported by Pádraig Brady
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Pádraig Brady
Grizzly
Fix Released
Wishlist
Pádraig Brady

Bug Description

https://review.openstack.org/#/c/25543/ made a change to pass single quotes in the option to dnsmasq.
Through quick code inspection this seems incorrect as the quotes will then become part of the domain name.
dnsmasq does handle _double_ quotes, but only in dnsmasq conf files and there they have special meaning for \t etc.

Note I've not actually tested the new code and would be very happy to be proved wrong here.

Revision history for this message
Sean Dague (sdague) wrote :

Just verified, for sure, that using the quotes on domain work fine. I expect that dnsmasq is actually filtering out the '' because they aren't valid dns domain values, so it's working fine, though probably not on purpose from a dnsmasq perspective.

I think the idea of fixing this more cleanly for havana to just drop that param to dnsmasq makes sense. would be a good clean up.

Changed in nova:
importance: Undecided → Wishlist
milestone: grizzly-rc2 → havana-1
status: New → Confirmed
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/25733

Changed in nova:
assignee: nobody → Pádraig Brady (p-draigbrady)
status: Confirmed → In Progress
tags: added: grizzly-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25733
Committed: http://github.com/openstack/nova/commit/24b9731af34fbc2fb17c849cb8cdb5c7a10db77d
Submitter: Jenkins
Branch: master

commit 24b9731af34fbc2fb17c849cb8cdb5c7a10db77d
Author: Pádraig Brady <email address hidden>
Date: Fri Mar 29 16:50:24 2013 +0000

    improve handling of an empty dnsmasq --domain

    Currently all domains passed through the dnsmasq --domain option,
    are single quoted. It's not fully understood how dnsmasq handles
    single quotes in this situation, so it's safer to just avoid the
    --domain option in this case.

    Fixes bug: 1161506
    Change-Id: I8ecd996676189f53908abd48fee81132091ee820

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
tags: added: grizzly-backport-potential
removed: grizzly-rc-potential
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

Seems this is a required fix.

Newer dnsmasq accept the single quotes, but there is no specific handling code for them.
I suspect they're being allowed to support IDN or something. Still expected behavior.

More problematically with some versions of dnsmasq (like 2.48-13 on RHEL (derivatives) for example),
dnsmasq will reject the single quotes and fail to start

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/26756

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/26756
Committed: http://github.com/openstack/nova/commit/3861f8c60cc46e9a00b06ca2bb8de91da8a22c6b
Submitter: Jenkins
Branch: stable/grizzly

commit 3861f8c60cc46e9a00b06ca2bb8de91da8a22c6b
Author: Pádraig Brady <email address hidden>
Date: Fri Mar 29 16:50:24 2013 +0000

    improve handling of an empty dnsmasq --domain

    Currently all domains passed through the dnsmasq --domain option,
    are single quoted. It's not fully understood how dnsmasq handles
    single quotes in this situation, so it's safer to just avoid the
    --domain option in this case.

    Fixes bug: 1161506
    Fixes bug: 1167447
    Change-Id: I8ecd996676189f53908abd48fee81132091ee820
    Cherry-picked: 24b9731af34fbc2fb17c849cb8cdb5c7a10db77d

tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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