All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] migration: allow clearing migration string parameters
Date: Wed, 15 Mar 2017 11:30:17 +0100	[thread overview]
Message-ID: <87h92ultmu.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170315093226.GB2430@work-vm> (David Alan Gilbert's message of "Wed, 15 Mar 2017 09:32:26 +0000")

"Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:

> * Markus Armbruster (armbru@redhat.com) wrote:
>> "Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:
[...]
>> > I'm confused why we need a 'reset to default' - all we need is the ability
>> > to change each parameter, and for the new value of that parameter
>> > to be an empty string.
>> 
>> You argue syntax, I'm arguing semantics.
>> 
>> The command means "set parameter P to value V".  *Except* when V is "",
>> it means something else, namely "reset parameter P to its default,
>> whatever that may be".
>> 
>> This is (a) not general, because it won't do for cases where "" may
>> occur as value, and (b) ugly.
>> 
>> Ugliness is the eye of the beholder.  Lack of generality isn't.
>
> No, I'm questioning why it's defined as 'reset parameter P to its default';
> why do we need a way to do that?

Dan's commit message explains:

    Some of the migration parameters are strings, which default to NULL,
    eg tls_hostname and tls_creds.

    The mgmt app will set the tls_creds parameter on both source and target
    QEMU instances, in order to trigger use of TLS for migration.

    After performing a TLS encrypted migration though, migration might be
    used for other reasons - for example, to save the QEMU state to a file.
    We need TLS turned off when doing this, but the migrate-set-parameters
    QAPI command does not provide any facility to clear/reset parameters
    to their default state.

    If you simply ommit the tls_creds parameter in migrate-set-parameters,
    then 'has_tls_creds' will be false and so no action will be taken. The
    only option that works with migrate-set-parameters is to treat "" on
    the wire as equivalent to requesting NULL. Failing that we would have
    to create a new 'migrate-reset-parameters' method to explicitly put
    a parameter back to its default value.

  reply	other threads:[~2017-03-15 10:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 12:32 [Qemu-devel] [PATCH] migration: allow clearing migration string parameters Daniel P. Berrange
2017-03-01 12:39 ` no-reply
2017-03-01 12:40 ` no-reply
2017-03-01 14:36 ` Eric Blake
2017-03-01 14:48   ` Daniel P. Berrange
2017-03-01 15:36     ` Eric Blake
2017-03-02  7:55     ` Markus Armbruster
2017-03-02 12:33   ` Daniel P. Berrange
2017-03-03 14:44     ` Markus Armbruster
2017-03-03 16:18       ` Daniel P. Berrange
2017-03-03 17:05         ` Markus Armbruster
2017-03-03 17:08           ` Daniel P. Berrange
2017-03-14 18:49       ` Dr. David Alan Gilbert
2017-03-15  6:26         ` Markus Armbruster
2017-03-15  9:32           ` Dr. David Alan Gilbert
2017-03-15 10:30             ` Markus Armbruster [this message]
2017-03-15 10:36               ` Dr. David Alan Gilbert
2017-03-15 10:49                 ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h92ultmu.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.