Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a filesystem diff script #181

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Add a filesystem diff script #181

merged 3 commits into from
Dec 8, 2023

Conversation

tescande
Copy link
Contributor

@tescande tescande commented Dec 5, 2023

This script checks for file system tree differences between 2 XCP-ng hosts. The comparison can be made against a reference installation (let say a fresh ISO install) and another XCP-ng of the same version but obtained by upgrading an existing installation, or to check differences between ISO and Net installations.

Supported options are:

--reference-host REF_HOST, -r REF_HOST
The XCP-ng host used as reference

--test-host TEST_HOST, -t TEST_HOST
The XCP-ng host to be tested after install or upgrade

--save-reference SAVE_REF, -s SAVE_REF
Save filesystem information of the reference host to a file

--load-reference LOAD_REF, -l LOAD_REF
Load reference filesystem information from a file

Option -r HOST is used to pass the hostname or ip address of the XCP-ng host used as reference.

With -s FILENAME, the reference host filesyistem information is saved to the file FILENAME passed as parameter.

Instead of -r HOST, one can use the reference file created with -s by using the option -f FILENAME.

The host to be tested is specified with the option -t HOST.

@tescande tescande self-assigned this Dec 5, 2023
@tescande tescande changed the title Add a filesystem check script Add a filesystem diff script Dec 5, 2023
This script checks for file system tree differences between 2 XCP-ng
hosts. The comparison can be made against a reference installation (let
say a fresh ISO install) and another XCP-ng of the same version but
obtained by upgrading an existing installation, or to check differences
between ISO and Net installations.

Supported options are:

  --reference-host REF_HOST, -r REF_HOST
         The XCP-ng host used as reference

  --test-host TEST_HOST, -t TEST_HOST
         The XCP-ng host to be tested after install or upgrade

  --save-reference SAVE_REF, -s SAVE_REF
         Save filesystem information of the reference host to a file

  --load-reference LOAD_REF, -l LOAD_REF
         Load reference filesystem information from a file

Option -r HOST is used to pass the hostname or ip address of the XCP-ng
host used as reference.

With -s FILENAME, the reference host filesyistem information is saved to
the file FILENAME passed as parameter.

Instead of -r HOST, one can use the reference file created with -s by
using the option -f FILENAME.

The host to be tested is specified with the option -t HOST.

Signed-off-by: Thierry Escande <[email protected]>
Passing -d will show a diff of text files that differ from the reference
host. A reference hostname must be provided with -r.

Signed-off-by: Thierry Escande <[email protected]>
Other folders than the default ones (/boot, /etc, /opt, and /usr) can be
specified with the -f option. This option can be passed multiple times.

Signed-off-by: Thierry Escande <[email protected]>
@stormi
Copy link
Member

stormi commented Dec 8, 2023

I don't have time to review this but I dont want to hold it, so let's merged with the existing two approvals.

@stormi stormi merged commit 50a253c into master Dec 8, 2023
4 checks passed
@stormi stormi deleted the xcpng-fs-check branch December 8, 2023 15:39
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.

4 participants