Skip to content

Conversation

liulinC
Copy link
Collaborator

@liulinC liulinC commented Apr 11, 2024

No description provided.

ydirson and others added 30 commits March 6, 2024 16:56
This test did not exercised the SR type expected by user, and notably
failed when no default SR was defined.

Adds the option of installing a VM in a non-default SR using
VM.with_new.

Signed-off-by: Yann Dirson <[email protected]>
Previously sub-second durations were printed as "ago", now they are
pretty-printed using Mtime.Span's logic, for example "666ms ago".

If the point in time is unexpectedly in the future, print "0ns ago".

Durations lasting at least 1 seconds are printed as before.

Signed-off-by: Pau Ruiz Safont <[email protected]>
CA-390570: Py3 socket.sendto needs bytes instead of a string
When creating a backup VDI on an SR we want to derive the VDI's UUID
from the SR. This way we can't be later tricked into accepting a
different VDI as a backup.

Implement a hash that derives the VDI UUID and pass this UUID to SM to
be used.

Currently the creation of this VDI in Xapi is detected based on its
name-label: "Pool Metadata Backup". The SM stack usually creates a new
random UUID but will use a given UUID passed as "vdi_uuid" for its
"vdi_create" command. The difficulty in the implementation is that
"vdi_uuid" is used in other commands as well and we have to make sure to
set it only in the intended context. It is not straight forward to pass
the UUID from Xapi_vdi.create down to Sm.

Signed-off-by: Christian Lindig <[email protected]>
We introduce deterministic UUID for backup VDIs to avoid searching for
VDIs. Add this capability to the scripts that create and restore
backups. In case the VDI with the expected UUID does not exist, let the
user confirm probing for it.

Signed-off-by: Christian Lindig <[email protected]>
We have added an interactive prompt in case the backup VDI was created
by an earlier version and does not match the expected UUID. To
facilitate scripting, add a -y (yes) flag that assumes a confirmation.

Signed-off-by: Christian Lindig <[email protected]>
This is about the same order of magnitude as the number of VMs supported in a
host

Signed-off-by: Pau Ruiz Safont <[email protected]>
This helps when running it to observe behaviour of the library

Signed-off-by: Pau Ruiz Safont <[email protected]>
This reuses the re-key process to gather current contents of the cache and
depending on the amount of elements pending it
1. Bypasses the cache completely if it's empty
2. Uses the queue if all the elements fit in the queue
3. Starts as before if there are more elements

Signed-off-by: Pau Ruiz Safont <[email protected]>
Unknown directories detected in the cache will get logged, and at the
appropriate times deleted, along with all the files contained within.

Signed-off-by: Pau Ruiz Safont <[email protected]>
Previously a logline was created per push attempt, now up to two per failure
period are done: one on the first failure, and one on recovery.

Signed-off-by: Pau Ruiz Safont <[email protected]>
Now temporary files are an internal detail of the persistence function. The
rest of code needs not be aware of it: if some of temp files linger in the
filesystem means that the process did not acknowledge a requested write, so the
domain could not have possibly acted on the write. Delete these as this does
not incur in any data corruption in the domain side.

Signed-off-by: Pau Ruiz Safont <[email protected]>
With *hybrid source format in export, the following cases are supported:
1. nbdhybrid: QCOW2 -> NBD device in dom0 -> exported file
2. nbdhybrid: VHD -> NBD device in dom0 -> exported file
3. hybrid: VHD -> blktap device in dom0 -> exported file

The case 2 above can't support an optional parameter "base".
This parameter holds the ID of another VHD VDI. When it is passed, the
export will only write the differences between "source" and "base" to
the destination file.

As a short-term solution, in case 2 above, when the "base" is passed,
the source format is changed to "hybrid" in this commit.
This can work because:
1. the comparsion on blocks required by "base" is supported by "hybrid";
2. the raw data from NBD device and blktap (Frankentap) device are same;
3. the sparseness information of the source required in case 2 can be
   get by either NBD interface (nbdhybrid) or VHD parsing (hybrid).

Signed-off-by: Ming Lu <[email protected]>
waitpid_nohang closes the socket by calling waitpid and then calls
clear_nonblock on that socket, which fails.

waitpid_nohang's policy around closing the socket is not obvious enough.
Make it more explicit by not calling waitpid but inlining code and
looking at the different cases. The behaviour is still to close the
socket when the child process has terminated and not otherwise.

Logging can be re-enabled if we have to come back to this.

Signed-off-by: Christian Lindig <[email protected]>
CA-384483: Can't export VDI to VHD file with base VDI
Slightly different from missing file, add missing path.

Signed-off-by: Frediano Ziglio <[email protected]>
Clean even if user press Ctrl-C, not only sending TERM signal.
Remove possible stale unix socket to allow to run multiple times.

Signed-off-by: Frediano Ziglio <[email protected]>
Make sure we get the correct output from program launched.

Signed-off-by: Frediano Ziglio <[email protected]>
Make sure program receives the string we are sending.

Signed-off-by: Frediano Ziglio <[email protected]>
Requires libxml2-devel installed.

Signed-off-by: Edwin Török <[email protected]>
(cherry picked from commit 0008395)
The C SDK build was failing with a recent GCC on Fedora39 like this:
```
src/xen_common.c: In function ‘xen_session_logout’:
src/xen_common.c:298:5: error: ‘xen_call_’ accessing 16 bytes in a region of size 0 [-Werror=stringop-overflow=]
  298 |     xen_call_(session, "session.logout", params, 0, NULL, NULL);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Use `NULL` instead of a VLA of size 0.

Signed-off-by: Edwin Török <[email protected]>
(cherry picked from commit bfe78bd)
Port of "Fix C SDK build on Fedora39" to `master`
Domains using TPMs need to have SWTPM always available. Encode this information
in the service file so the services are shut down at the correct time while
powering off the hosts.

Signed-off-by: Pau Ruiz Safont <[email protected]>
I am not sure where this restriction came from. It was introduced in the
same commit that introduced the metadata-export feature itself, without
explanation. Full exports of snapshots are already allowed.

Signed-off-by: Rob Hoes <[email protected]>
robhoes and others added 13 commits April 8, 2024 15:36
This allows clients to know which snapshots they knowingly just created and act
on them instead of looking again into the db and try to divine which snapshots
the call created.

Signed-off-by: Pau Ruiz Safont <[email protected]>
This allows clients to detect that the newer device type exclusions for export
are available.

Signed-off-by: Rob Hoes <[email protected]>
This allows to orchestrators to copy devices like VBDs from the VM, export the
metadata without the disk, import the VM to any pool, and finally add the
saved VBDs to the new VM before booting it.

Signed-off-by: Pau Ruiz Safont <[email protected]>
This allows to easily test the http endpoint. Also advertises the metadata
parameter on these calls

Signed-off-by: Pau Ruiz Safont <[email protected]>
Use the helper functions to process parameters, use atomics instead of ad-hoc
references for counting in possibly-parallel case

Signed-off-by: Pau Ruiz Safont <[email protected]>
Signed-off-by: Pau Ruiz Safont <[email protected]>
Tooling complains about using 1970 as the date otherwise

Signed-off-by: Pau Ruiz Safont <[email protected]>
@liulinC liulinC changed the title routine feature branch sync Routine feature branch sync Apr 11, 2024
Copy link

github-actions bot commented Apr 11, 2024

pytype_reporter extracted 50 problem reports from pytype output

.

You can check the results of the job here

@psafont psafont merged commit 6eace03 into feature/xs9 Apr 11, 2024
@psafont psafont deleted the private/linl/sync branch April 11, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants