[Dodger] CA-130038: Backport fix for NBD connection handling
The recent change to default http connections to v1.1 and keep-alive=true was probably the cause of failures in storage migration. This patch reverts the connection in question to the previous behaviour It's likely what happened was that xapi kept the connection open after the fd was handed off to tapdisk and consumed the requests coming in from the source. Signed-off-by: Jon Ludlam <firstname.lastname@example.org>
[Dodger] CA-128444: Unable to perform VM full copy from local SR to any SR on same host/cross host
Signed-off-by: John Else <email@example.com> Conflicts: ocaml/xapi/sm_fs_ops.ml
Previously sparse_dd (and the receiving import_raw_vdi operation) re-used the VDI.copy task, marking it complete once the import had finished. This caused problems with cross-host VM.copy, as the VM.copy operation would also watch the VDI.copy task for completion. The VM.copy would attempt to extract the new VDI reference from the task result straight away, but import_raw_vdi did not add this to the task result on completion, leading to the VM.copy failing with Xml.Error. Adding the new VDI ref to the VDI.copy task result did not fix the problem, as in this case the VM.copy operation would immediately destroy the VDI.copy task as soon as it was marked completed. The VDI.copy operation would then fail, as its task no longer existed, and it would clean up by destroying the new VDI. Meanwhile the VM.copy operation would complete without an exception being raised. The approach taken here is to create a new task for the import_raw_vdi operation. VDI.copy watches for this task to be completed, and VM.copy in turn watches for the VDI.copy operation to be completed. This way there is no race between VDI.copy and VM.copy, and the new VDI ref is automatically added to the VDI.copy task's result on completion. Signed-off-by: John Else <firstname.lastname@example.org> Conflicts: ocaml/xapi/sm_fs_ops.ml
If the receiver fails but the sender has already sent all its data then it would have deemed the copy a success. This is dangerous since we can end up with VDI corruption on the receiver and the impression that the copy was successful. Now we re-raise any errors encountered on the receiver back on the sender side in the case of cross-host VDI.copy. Signed-off-by: Si Beaumont <email@example.com>
The sender was completing the VDI.copy operation after it had sent the last of the data. This meant that any subsequent operations on the new VDI could fail with VDI_IN_USE because the datapath on the receiver had yet to be destroyed. Now we forward the task to the receiving host and wait for it to set it as complete. Signed-off-by: Si Beaumont <firstname.lastname@example.org>
If, during the VDI copy to the remote, the guest is shutdown then, when it comes to moving the domain, Xenops will complain that the domain doesn't exist. We had already desinged to handle this case but the exception catch needed to be broadened to match the new "extra" TypedTable used for the VM metadata. Signed-off-by: Si Beaumont <email@example.com>
[Dodger] CA-122467: Fix for setting the right value of memory_actual after vm is ...
…is started There is a race condition between vm_start and monitor thread. The monitor thread runs every 5s and updates the memory changes of the VMs if any. It does that only if the VM's resident_on value is set to localhost. Currently, the memory changes are being seen by monitor thread while VM is starting but since the start operation has'nt yet set the resident_on, the monitor thread doesn't do anything. However, the in-memory cache of monitor thread already has the vm_memory changes for that VM. This needs to be removed, so that monitor thread updates it next time when the resident_on value of the VM is set by start operation. Signed-off-by: Ravi Pandey <firstname.lastname@example.org>
[TAMPA] rrdd and squeezed: use new xenstore-watching, not polling.
[HFX-1070] SCTX-1515: Handling storage exception while unplugging vbd
[HFX-1097] SCTX-1532: Ensure that ethtool params get set on bond slaves
Signed-off-by: Rob Hoes <email@example.com>
[HFX-1031] CA-112880: Fix race condition writing memory-actual
[HFX-1037] CA-113392: Fix PBD password-secret lifecycle
Dodger/HFX-955 : Multiple commits
Dodger/HFX-999: Multiple commits
[HFX-1059] CA-121350: Handle invalid edition on xapi startup
xcp-rrdd is interested in domains' data/meminfo_free values. In one example, polling xenstore for these values took about 30 seconds for 700 VMs. Instead of polling, use watches. (cherry picked from commit dc787f7)
The only change to observational semantics is that the following actions are no longer performed atomically: - Mutex.execute m - (fun () -> - IntSet.iter (Hashtbl.remove cache) gone; - IntSet.iter (fun domid -> try ignore(get_per_domain (xc, xs) domid) with _ -> ()) arrived - ) in Now, we execute (Hashtbl.remove cache) on each disappeared domain, separately, and get_per_domain on each new domain, separately. (cherry picked from commit 0ab61fa)
[HFX-950] CA-97402: Add a means of disabling modules in the domainjoin-cli command...
[HFX-1022] CA-118027: Don't send RPC calls that are too large
[HFX-958] XOP-435: Allow clearing of DNS entries.
[HFX-1097] CA-119831 Apply GRO settings to bond and vlan interfaces
[HFX-1004] CA-118425/SCTX-1559: Remove interfaces from bridge before
creating VLAN on it Signed-off-by: Ravi Pandey <firstname.lastname@example.org>
Ethtool settings (Generic Receive Offload etc.) need to be set on the bond and VLAN devices where applicable. Signed-off-by: Thomas Sanders <email@example.com>
Signed-off-by: Si Beaumont <firstname.lastname@example.org>
Signed-off-by: Si Beaumont <email@example.com>
This can be useful in diagnosing errors. Signed-off-by: David Scott <firstname.lastname@example.org>
The vhd-tool helper is capable of O_DIRECT I/O and minimises data copies. Signed-off-by: David Scott <email@example.com>