All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] adding search to dhcp
@ 2011-05-10 17:40 Carl Karsten
  2011-05-11  9:02 ` Stefan Hajnoczi
  0 siblings, 1 reply; 8+ messages in thread
From: Carl Karsten @ 2011-05-10 17:40 UTC (permalink / raw)
  To: qemu-devel

man qemu...
hostname=name   Specifies the client hostname reported by the builtin
DHCP server.

I would like to add a technically similar option: search
It would be sent along the same path that the above hostname parameter takes.

This would allow the guest OS to reference other boxes on my LAN by
just hostname, not FQDN. I have many scripts that rely on this, and so
they break when I try to run them in a qemu vm.


man dhcp-options
       option domain-search domain-list;

         The domain-search option specifies a 'search list' of Domain Names to
         be used by the client to  locate  not-fully-qualified  domain  names.
         The  difference  between  this option and historic use of the domain-
         name option for the same ends is  that  this  option  is  encoded  in
         RFC1035 compressed labels on the wire.  For example:

           option domain-search "example.com", "sales.example.com",
                                "eng.example.com";

I would expect the syntax to look like this:

qemu -hda 1.qcow2 -net nick -net
user,hostname=qemu,search=example.com,sales.example.com


-- 
Carl K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-10 17:40 [Qemu-devel] adding search to dhcp Carl Karsten
@ 2011-05-11  9:02 ` Stefan Hajnoczi
  2011-05-11 11:01   ` Markus Armbruster
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2011-05-11  9:02 UTC (permalink / raw)
  To: Carl Karsten; +Cc: qemu-devel

On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
> I would expect the syntax to look like this:
>
> qemu -hda 1.qcow2 -net nick -net
> user,hostname=qemu,search=example.com,sales.example.com

Comma escaping is needed but it seems like a reasonable feature to me.

Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11  9:02 ` Stefan Hajnoczi
@ 2011-05-11 11:01   ` Markus Armbruster
  2011-05-11 15:22     ` Carl Karsten
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Armbruster @ 2011-05-11 11:01 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Carl Karsten

Stefan Hajnoczi <stefanha@gmail.com> writes:

> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>> I would expect the syntax to look like this:
>>
>> qemu -hda 1.qcow2 -net nick -net
>> user,hostname=qemu,search=example.com,sales.example.com
>
> Comma escaping is needed but it seems like a reasonable feature to me.

Comma escaping is ugly:
-net user,hostname=qemu,search=example.com,,sales.example.com

Could we have multiple search options instead?  Like this:
-net user,hostname=qemu,search=example.com,search=sales.example.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11 11:01   ` Markus Armbruster
@ 2011-05-11 15:22     ` Carl Karsten
  2011-05-11 16:08       ` Stefan Hajnoczi
  0 siblings, 1 reply; 8+ messages in thread
From: Carl Karsten @ 2011-05-11 15:22 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Stefan Hajnoczi, qemu-devel

On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Stefan Hajnoczi <stefanha@gmail.com> writes:
>
>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>>> I would expect the syntax to look like this:
>>>
>>> qemu -hda 1.qcow2 -net nick -net
>>> user,hostname=qemu,search=example.com,sales.example.com
>>
>> Comma escaping is needed but it seems like a reasonable feature to me.
>
> Comma escaping is ugly:
> -net user,hostname=qemu,search=example.com,,sales.example.com
>
> Could we have multiple search options instead?  Like this:
> -net user,hostname=qemu,search=example.com,search=sales.example.com
>

How about:

-net user,hostname=qemu,search="example.com,sales.example.com"

Given I personally only need one search domain, any objection to me
only writing the code to support 1?  I would think the simple case
search=example.com  should be the same regardless of how someone
implemented multiples.


-- 
Carl K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11 15:22     ` Carl Karsten
@ 2011-05-11 16:08       ` Stefan Hajnoczi
  2011-05-11 20:49         ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2011-05-11 16:08 UTC (permalink / raw)
  To: Carl Karsten; +Cc: Markus Armbruster, qemu-devel

On Wed, May 11, 2011 at 4:22 PM, Carl Karsten <carl@personnelware.com> wrote:
> On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <armbru@redhat.com> wrote:
>> Stefan Hajnoczi <stefanha@gmail.com> writes:
>>
>>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>>>> I would expect the syntax to look like this:
>>>>
>>>> qemu -hda 1.qcow2 -net nick -net
>>>> user,hostname=qemu,search=example.com,sales.example.com
>>>
>>> Comma escaping is needed but it seems like a reasonable feature to me.
>>
>> Comma escaping is ugly:
>> -net user,hostname=qemu,search=example.com,,sales.example.com
>>
>> Could we have multiple search options instead?  Like this:
>> -net user,hostname=qemu,search=example.com,search=sales.example.com
>>
>
> How about:
>
> -net user,hostname=qemu,search="example.com,sales.example.com"

That does not work the way you'd expect:
$ echo asdf=asdf,ok="this,is,a,test"
asdf=asdf,ok=this,is,a,test

Also, let's not get into the business of matching quotes and passing
them escaped on the shell.  That's just as ugly as escaping commas and
more work.

I think the two options are using QEMU's typical comma escaping ',,'
or specifying the option multiple times.  I'd go with comma escaping
for consistency.  I'm not aware of any other option in QEMU that is
specified multiple times.

Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11 16:08       ` Stefan Hajnoczi
@ 2011-05-11 20:49         ` Jan Kiszka
  2011-05-11 21:08           ` Michael Tokarev
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2011-05-11 20:49 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Markus Armbruster, Carl Karsten, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

On 2011-05-11 18:08, Stefan Hajnoczi wrote:
> On Wed, May 11, 2011 at 4:22 PM, Carl Karsten <carl@personnelware.com> wrote:
>> On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>> Stefan Hajnoczi <stefanha@gmail.com> writes:
>>>
>>>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>>>>> I would expect the syntax to look like this:
>>>>>
>>>>> qemu -hda 1.qcow2 -net nick -net
>>>>> user,hostname=qemu,search=example.com,sales.example.com
>>>>
>>>> Comma escaping is needed but it seems like a reasonable feature to me.
>>>
>>> Comma escaping is ugly:
>>> -net user,hostname=qemu,search=example.com,,sales.example.com
>>>
>>> Could we have multiple search options instead?  Like this:
>>> -net user,hostname=qemu,search=example.com,search=sales.example.com
>>>
>>
>> How about:
>>
>> -net user,hostname=qemu,search="example.com,sales.example.com"
> 
> That does not work the way you'd expect:
> $ echo asdf=asdf,ok="this,is,a,test"
> asdf=asdf,ok=this,is,a,test
> 
> Also, let's not get into the business of matching quotes and passing
> them escaped on the shell.  That's just as ugly as escaping commas and
> more work.
> 
> I think the two options are using QEMU's typical comma escaping ',,'
> or specifying the option multiple times.  I'd go with comma escaping
> for consistency.  I'm not aware of any other option in QEMU that is
> specified multiple times.

-net user,hostfwd=...,hostfwd=...

Let's got for multiple specification, ',,' is just ugly IMHO.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11 20:49         ` Jan Kiszka
@ 2011-05-11 21:08           ` Michael Tokarev
  2011-05-12  9:00             ` Markus Armbruster
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Tokarev @ 2011-05-11 21:08 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Stefan Hajnoczi, Markus Armbruster, Carl Karsten, qemu-devel

12.05.2011 00:49, Jan Kiszka пишет:
> On 2011-05-11 18:08, Stefan Hajnoczi wrote:
>> On Wed, May 11, 2011 at 4:22 PM, Carl Karsten <carl@personnelware.com> wrote:
>>> On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>>> Stefan Hajnoczi <stefanha@gmail.com> writes:
>>>>
>>>>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>>>>>> I would expect the syntax to look like this:
>>>>>>
>>>>>> qemu -hda 1.qcow2 -net nick -net
>>>>>> user,hostname=qemu,search=example.com,sales.example.com
>>>>>
>>>>> Comma escaping is needed but it seems like a reasonable feature to me.
>>>>
>>>> Comma escaping is ugly:
>>>> -net user,hostname=qemu,search=example.com,,sales.example.com
>>>>
>>>> Could we have multiple search options instead?  Like this:
>>>> -net user,hostname=qemu,search=example.com,search=sales.example.com
>>>>
>>>
>>> How about:
>>>
>>> -net user,hostname=qemu,search="example.com,sales.example.com"
>>
>> That does not work the way you'd expect:
>> $ echo asdf=asdf,ok="this,is,a,test"
>> asdf=asdf,ok=this,is,a,test
>>
>> Also, let's not get into the business of matching quotes and passing
>> them escaped on the shell.  That's just as ugly as escaping commas and
>> more work.
>>
>> I think the two options are using QEMU's typical comma escaping ',,'
>> or specifying the option multiple times.  I'd go with comma escaping
>> for consistency.  I'm not aware of any other option in QEMU that is
>> specified multiple times.
> 
> -net user,hostfwd=...,hostfwd=...
> 
> Let's got for multiple specification, ',,' is just ugly IMHO.

I second this, just repeat the specification, please no double ,,.
Or alternatively, search1=foo,search2=bar, but this is also sort
of ugly.

But I'm not sure why there's no way to use some other character,
like colon (:) for example - it's used for protocol:details
already, and for domain names it works well too...

/mjt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] adding search to dhcp
  2011-05-11 21:08           ` Michael Tokarev
@ 2011-05-12  9:00             ` Markus Armbruster
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2011-05-12  9:00 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Stefan Hajnoczi, Jan Kiszka, qemu-devel, Carl Karsten

Michael Tokarev <mjt@tls.msk.ru> writes:

> 12.05.2011 00:49, Jan Kiszka пишет:
>> On 2011-05-11 18:08, Stefan Hajnoczi wrote:
>>> On Wed, May 11, 2011 at 4:22 PM, Carl Karsten <carl@personnelware.com> wrote:
>>>> On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>>>> Stefan Hajnoczi <stefanha@gmail.com> writes:
>>>>>
>>>>>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <carl@personnelware.com> wrote:
>>>>>>> I would expect the syntax to look like this:
>>>>>>>
>>>>>>> qemu -hda 1.qcow2 -net nick -net
>>>>>>> user,hostname=qemu,search=example.com,sales.example.com
>>>>>>
>>>>>> Comma escaping is needed but it seems like a reasonable feature to me.
>>>>>
>>>>> Comma escaping is ugly:
>>>>> -net user,hostname=qemu,search=example.com,,sales.example.com
>>>>>
>>>>> Could we have multiple search options instead?  Like this:
>>>>> -net user,hostname=qemu,search=example.com,search=sales.example.com
>>>>>
>>>>
>>>> How about:
>>>>
>>>> -net user,hostname=qemu,search="example.com,sales.example.com"
>>>
>>> That does not work the way you'd expect:
>>> $ echo asdf=asdf,ok="this,is,a,test"
>>> asdf=asdf,ok=this,is,a,test
>>>
>>> Also, let's not get into the business of matching quotes and passing
>>> them escaped on the shell.  That's just as ugly as escaping commas and
>>> more work.
>>>
>>> I think the two options are using QEMU's typical comma escaping ',,'
>>> or specifying the option multiple times.  I'd go with comma escaping
>>> for consistency.  I'm not aware of any other option in QEMU that is
>>> specified multiple times.
>> 
>> -net user,hostfwd=...,hostfwd=...
>> 
>> Let's got for multiple specification, ',,' is just ugly IMHO.
>
> I second this, just repeat the specification, please no double ,,.
> Or alternatively, search1=foo,search2=bar, but this is also sort
> of ugly.
>
> But I'm not sure why there's no way to use some other character,
> like colon (:) for example - it's used for protocol:details
> already, and for domain names it works well too...

Too clever, in my opinion.  Breaks down when option values may contain
':'.  While that's not the case for domain names, it still means it's a
special-purpose syntactic hack.

Let's follow the hostfwd precedence and permit multiple search options.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-12  9:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 17:40 [Qemu-devel] adding search to dhcp Carl Karsten
2011-05-11  9:02 ` Stefan Hajnoczi
2011-05-11 11:01   ` Markus Armbruster
2011-05-11 15:22     ` Carl Karsten
2011-05-11 16:08       ` Stefan Hajnoczi
2011-05-11 20:49         ` Jan Kiszka
2011-05-11 21:08           ` Michael Tokarev
2011-05-12  9:00             ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.