Skip to content

Conversation

@stephenchengCloud
Copy link
Collaborator

No description provided.

Konstantina Chremmou and others added 27 commits February 26, 2024 14:32
…providing user friendlier messages on the client side).

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This reverts commit 6668d5f.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
…389206

Revert "CP-45572: Print update guidance in xe host-apply-updates"
…is empty"

This reverts commit 397d47a.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This reverts commit 533a000.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This reverts commit 8ca4b43.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This reverts commit a53e54d.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This reverts commit 54039f3.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This reverts commit db91ddf.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
This should only report errors on lines that are changed in a PR, and not block merges for pre-existing bugs.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
…389206

CA-389206: Revert more changes in CLI protocol
This will allow to handle serialization of key as well as states in
server_interface and the write cache

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This enables xapi-guard to decouple persistence of TPM contents from the xapi
service being online. That is, when xapi is down. The contents of the TPMs will
be written to disk, and when xapi is back online the contents will be uploaded.

This is needed to protect VMs while xapi is being restarted, usually as part of
an update.

Some properties of the cache:
- The cache is tried to be bypassed whenever possible, and is only used as
  fallback after a write fails.
- The cache is handled by a thread that writes to cache and one that reads from
  it. They communicate through a bounded queue.
- Whenever a TPM content is written to disk, previous versions of it are
  deleted. This helps the reading thread to catch up.
- When the queue has been filled the writer stops adding elements to the queue,
  and the reader will try to flush the queue, and after it will try to flush
  the cache. After this happens both threads will transition to cache bypass
  operation.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This allows to pass the UUID directly to the on-disk cache that will be
introduced

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This allows to use the persistence function from outside the callback, which
will be useful to thread into the on-disk cache

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Now the process creates a thread to read from disk and push vtpm events to xapi
at its own pace, and integrates the disk-writing part into the callback of the
deprivileged sockets.

Special consideration was taken for the resume, when the deprivileged sockets
and the write-to-cache function need to be integrated in a different way from
the codepath that creates the sockets from the message-switch server.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Because timestamps depend on a monotonic timestamp that depends on boot, files
need to be renamed to ensure future writes have higher timestamps to be
considered newer and be uploaded to xapi.

On top of this, allows to report about remnant temporary files, delete invalid
files and remove empty directories.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This is needed to a be able to disable the disk cache completely, maintaining
previous behaviour if needed.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This is done through the fist point.

Xapi_fist is not used directly because it needs to a new opam package, creating
a lot of churn which is currently unwanted.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Exposed GFS2_CAPACITY in the known message types (for the purpose of …
Now all domains' vtpm read requests go through the cache. The read function is
the same as before.

There is no change in behaviour

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
For domains requesting the TPM's contents, the xapi-guards returns the contents
in the cache, if they are available from in-flight requests. It falls back to
xapi if that couldn't be possible.

The cache doesn't try to provide any availability for reads, like it does for
writes. This means that if swtpm issues a read request while xapi is offline,
the request will fail, as it happened before this change.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Previously, they were sorted by string order, which in rare cases might lead to
erroneous ordering

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
…-gardon

CA-383867: Add local disk cache library for xapi guard
Copy link
Contributor

@gangj gangj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a merge with no code change from latest master:

$ git show 7043755
commit 70437556ec9532218a2fd7d2fba9dbe2637e16c7 (HEAD -> private/stephenche/sync_feature_py3_with_master, stephencheng/private/stephenche/sync_feature_py3_with_master)
Merge: 5ba31f56f 1ae1dd8a0
Author: Stephen Cheng <stephen.cheng@cloud.com>
Date:   Mon Mar 4 02:54:05 2024 +0000

    Merge branch 'master' into private/stephenche/sync_feature_py3_with_master

one of its parent is the latest commit in master now: 1ae1dd8

Copy link
Collaborator

@liulinC liulinC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just feature sync

@psafont psafont merged commit 9f4866b into xapi-project:feature/py3 Mar 4, 2024
@github-actions
Copy link

github-actions bot commented Mar 4, 2024

pytype_reporter extracted 40 problem reports from pytype output

.

You can check the results of the job here

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.

7 participants