On 08/30/2017 05:22 PM, Philip Abernethy wrote:
I added a context menu for pools to allow for bulk start and stop of machines in a selected pool.
Could it be that you sent an old version of this series? It does not work at all here, I suspect that this is mainly due to the fact that in PoolBulkAction the submit method is overwritten with an empty function.
I'm pondering whether or not to add bulk migration as well. Our current bulk migration makes all machines migrate to the same target. In pools the machines can reside on many different nodes, so selecting a single target node may result in machines migrating to the node they currently live on.
Would be easy to filter out and would be a backend issue. The HA-manager is already capable of such behavior, if using a group with the `restricted' setting enforced you can control the current location of VMs through the node priorities, it only migrates those resources which need migration. But, as not all want to add VMs to HA just for that, it may be not a complete replacement, but it'S still good to know :)
We may want to think of a clean way to handle that situation or a different way of selecting the target(s). Of course the user can deselect the machines that already are on the target host, but that requires them to think of it.
As a more general note. Even with an "correct" submit method this won't work without backend changes. At least not for pools with members spanning multiple nodes. The BulkAction menu is node specific, it uses the /nodes/{node}/startall stopall migrateall entry points, so each element from the `vms' filter parameter must be on the node {node}. And we can already use the filter method of the bulkAction window to trigger such an Action on virtual guests of a specific Pool (and node) already: http://i.imgur.com/zXFdRu5.png (there is an empty pool entry in the filter list, seems like a bug...) _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel