All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevic@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com, quintela@redhat.com,
	germano@redhat.com, lvivier@redhat.com, mst@redhat.com,
	jasowang@redhat.com, armbru@redhat.com, kashyap@redhat.com,
	jdenemar@redhat.com
Subject: Re: [Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command
Date: Tue, 30 May 2017 11:01:08 -0400	[thread overview]
Message-ID: <d820a362-8d5d-66d6-2f5b-77f614e03370@redhat.com> (raw)
In-Reply-To: <20170530141400.GP21566@redhat.com>

On 05/30/2017 10:14 AM, Daniel P. Berrange wrote:
> On Wed, May 24, 2017 at 02:05:22PM -0400, Vladislav Yasevich wrote:
>> Add a qmp command that can trigger guest announcements.
>>
>> Based on work of Germano Veit Michel <germano@redhat.com>
>>
>> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>> ---
>>  migration/savevm.c | 14 ++++++++++++++
>>  qapi-schema.json   | 19 +++++++++++++++++++
>>  2 files changed, 33 insertions(+)
>>
>> diff --git a/migration/savevm.c b/migration/savevm.c
>> index a4097c9..b55ce6a 100644
>> --- a/migration/savevm.c
>> +++ b/migration/savevm.c
>> @@ -265,6 +265,20 @@ void qemu_announce_self(AnnounceParameters *params)
>>      qemu_announce_self_once(timer);
>>  }
>>  
>> +void qmp_announce_self(bool has_params, AnnounceParameters *params,
>> +                       Error **errp)
>> +{
>> +    AnnounceParameters announce_params;
>> +
>> +    memcpy(&announce_params, qemu_get_announce_params(),
>> +           sizeof(announce_params));
>> +
>> +    if (has_params)
>> +        qemu_set_announce_parameters(&announce_params, params);
>> +
>> +    qemu_announce_self(&announce_params);
>> +}
> 
> I'm not a huge fan of the idea of setting announce parameters in a
> global namespace, via a previously issued separate command.
> 
> I realize this is already done for the 'migrate' command, but there
> it has been the cause of a number of bugs in libvirt mgmt of QEMU.
> At least with migrate it makes sense for some parameters which need
> to be tuned 'on the fly' after migrate already started. That doesn't
> apply to this command though.
> 
> So I tend to think it'd be nicer to just make the parameters mandatory
> for this command, so it is self-contanied does and not rely on previously
> set (or potentially unknown/indeterminate) global state.
> 

The reason I didn't do this is that I didn't want to require the user
to know or even think about the timeout values. I did want to provide
an option though for those who may want to tweak things.  In most circumstances,
the timeout values would never really be touched and we'll just use the
qemu defaults.  in rare circumstances, values might need to be changed
during migration.  Here, I can definitely see the need to give migration
it's own values.


> I'd also suggest that instad of adding an 'announce_set_parameters',
> the parameters for the automatic announce at end of migration should
> be set via the 'migrate_set_parameters' command.

I can do that.

> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 2030087..126b09d 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -654,6 +654,25 @@
>>    'returns': 'AnnounceParameters' }
>>  
>>  ##
>> +# @announce-self:
>> +#
>> +# Trigger generation of broadcast RARP frames to update network switches.
>> +# This can be useful when network bonds fail-over the active slave.
>> +#
>> +# Arguments: None.
> 
> "None", but it has some arguments listed right below....

will fix


Thanks
-vlad

> 
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "announce-self"
>> +#      "arguments": { "announce-rounds": 5 } }
>> +# <- { "return": {} }
>> +#
>> +# Since: 2.10
>> +##
>> +{ 'command': 'announce-self',
>> +  'data' : {'*params': 'AnnounceParameters'} }
>> +
>> +##
>>  # @MigrationStats:
>>  #
>>  # Detailed migration status.
>> -- 
>> 2.7.4
>>
>>
> 
> Regards,
> Daniel
> 

  reply	other threads:[~2017-05-30 15:01 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 18:05 [Qemu-devel] [PATCH 00/12] self-announce updates Vladislav Yasevich
2017-05-24 18:05 ` [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters Vladislav Yasevich
2017-05-26  4:03   ` Jason Wang
2017-05-26 13:06     ` Vlad Yasevich
2017-05-30 18:57       ` Dr. David Alan Gilbert
2017-06-01  7:02         ` Jason Wang
2017-06-01 13:45           ` Vlad Yasevich
2017-06-01 14:02             ` Dr. David Alan Gilbert
2017-05-26 13:08   ` Eric Blake
2017-05-26 13:17     ` Vlad Yasevich
2017-05-30  9:58   ` Juan Quintela
2017-05-30 13:45     ` Vlad Yasevich
2017-05-30 19:08   ` Dr. David Alan Gilbert
2017-05-24 18:05 ` [Qemu-devel] [PATCH 02/12] migration: Introduce announcement timer Vladislav Yasevich
2017-05-26  4:13   ` Jason Wang
2017-05-30 10:00   ` Juan Quintela
2017-05-24 18:05 ` [Qemu-devel] [PATCH 03/12] migration: Switch to using " Vladislav Yasevich
2017-05-26  4:16   ` Jason Wang
2017-05-26 13:01     ` Vlad Yasevich
2017-05-30 10:10   ` Juan Quintela
2017-05-30 13:46     ` Vlad Yasevich
2017-05-30 19:19   ` Dr. David Alan Gilbert
2017-05-30 19:34     ` Vlad Yasevich
2017-05-24 18:05 ` [Qemu-devel] [PATCH 04/12] net: Add a network device specific self-announcement ability Vladislav Yasevich
2017-05-26  4:17   ` Jason Wang
2017-05-24 18:05 ` [Qemu-devel] [PATCH 05/12] virtio-net: Allow qemu_announce_self to trigger virtio announcements Vladislav Yasevich
2017-05-26  4:21   ` Jason Wang
2017-05-24 18:05 ` [Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command Vladislav Yasevich
2017-05-26 13:16   ` Eric Blake
2017-05-26 13:19     ` Vlad Yasevich
2017-05-30 10:11   ` Juan Quintela
2017-05-30 13:49     ` Vlad Yasevich
2017-05-30 14:24       ` Juan Quintela
2017-05-30 14:43         ` Vlad Yasevich
2017-05-30 14:14   ` Daniel P. Berrange
2017-05-30 15:01     ` Vlad Yasevich [this message]
2017-05-24 18:05 ` [Qemu-devel] [PATCH 07/12] migration: Allow for a limited number of announce timers Vladislav Yasevich
2017-05-30 10:13   ` Juan Quintela
2017-05-30 19:31   ` Dr. David Alan Gilbert
2017-05-24 18:05 ` [Qemu-devel] [PATCH 08/12] announce_timer: Add ability to reset an existing Vladislav Yasevich
2017-05-30 10:15   ` Juan Quintela
2017-05-30 19:35   ` Dr. David Alan Gilbert
2017-05-30 20:01     ` Vlad Yasevich
2017-05-24 18:05 ` [Qemu-devel] [PATCH 09/12] hmp: add announce paraters info/set Vladislav Yasevich
2017-05-30 10:18   ` Juan Quintela
2017-05-30 13:57     ` Vlad Yasevich
2017-05-24 18:05 ` [Qemu-devel] [PATCH 10/12] hmp: Add hmp_announce_self Vladislav Yasevich
2017-05-31  9:47   ` Dr. David Alan Gilbert
2017-05-24 18:05 ` [Qemu-devel] [PATCH 11/12] tests/test-hmp: Add announce parameter tests Vladislav Yasevich
2017-05-31  9:53   ` Dr. David Alan Gilbert
2017-05-24 18:05 ` [Qemu-devel] [PATCH 12/12] tests: Add a test for qemu self announcments Vladislav Yasevich
2017-05-24 18:19 ` [Qemu-devel] [PATCH 00/12] self-announce updates no-reply
2017-05-24 18:38 ` no-reply
2017-05-24 18:40 ` no-reply
2017-05-31 10:29 ` Dr. David Alan Gilbert

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=d820a362-8d5d-66d6-2f5b-77f614e03370@redhat.com \
    --to=vyasevic@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=germano@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=kashyap@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@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.