>>The problem is that the same kind of actions can be fast or slow - depends on >>storage type. >>An asynchronous interface running a background task solves the problem, but >>is clumsy to use.
>>One idea was to always run a background task, but wait up to 5-10 seconds to >>see if the task finish >>within that time - if so return a special TASK ID. >>Not sure if that is a good idea? Do you mean like taking snapshot / snapshot rollback ? ----- Mail original ----- De: "Dietmar Maurer" <[email protected]> À: "Alexandre DERUMIER" <[email protected]> Cc: [email protected] Envoyé: Mercredi 5 Juin 2013 06:49:32 Objet: RE: [pve-devel] update disk config, always rescan all the storage, can we avoid that ? > >>What is the advantage compared to 'qm set virtio0 ...'? > > I thinked mainly to manage add/remove in a task worker, as some actions > can take some time. > > (like add/remove disk for some storage, or hot-unplug which need to wait > for vm response,...) > > As an example, for an rbd storage, if you delete a big file, when you > validate > the form, it wait some seconds, the form is diplayed again but the disk in > correctly created and config updated. > > Maybe adding a bigger timeout can work, but we can't known how much > time it'll take. The problem is that the same kind of actions can be fast or slow - depends on storage type. An asynchronous interface running a background task solves the problem, but is clumsy to use. One idea was to always run a background task, but wait up to 5-10 seconds to see if the task finish within that time - if so return a special TASK ID. Not sure if that is a good idea? _______________________________________________ pve-devel mailing list [email protected] http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
