On Mon, Apr 14, 2025 at 02:40:25PM -0300, Fabiano Rosas wrote: > > Can we make the two approaches mutually exclusive ? Taking your > > 'migrate' command example addition: > > > > { 'command': 'migrate', > > 'data': {'*uri': 'str', > > '*channels': [ 'MigrationChannel' ], > > + '*config': 'MigrationConfig', > > '*detach': 'bool', '*resume': 'bool' } } > > > > if 'migrate' is invoked with the '*config' data being non-nil, > > then we should ignore *all* global state previously set with > > migrate-set-XXXX, and exclusively use '*config'. > > > > That gives a clean semantic break between old and new approaches, > > without us having to worry about removing the existing commands > > quickly. > > > > Good idea. I will need to do something about the -global options because > they also set the defaults for the various options. But we should be > able to decouple setting defaults from -global. Or I could just apply > -global again on top of what came in '*config'.
Would it still be possible that we allow whatever options attached to the "migrate" command to only overwrite the globals (either set via -global or migrate-set-* QMP commands), rather than ignoring them completely? If so, we don't need to do anything with current -global and it'll keep working. It's the same to most existing way to set the migration options (e.g., otherwise do we plan to disable HMP "migrate" usage?). Making the above '*config' to only overwrite also do not stand against the mgmt using it to ignore the default options, after all the mgmt can decide to always set everything in the '*config' then it's the same as ignoring the globals? -- Peter Xu