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

Fixes squashfs images creation #2230

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

davidcassany
Copy link
Contributor

If upgrading from a container including the root of the host mounted in /host the upgrade process does not exclude the /host path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls to also apply for mksquashfs.

@davidcassany davidcassany added the kind/bug Something isn't working label Nov 12, 2024
@davidcassany davidcassany self-assigned this Nov 12, 2024
@davidcassany davidcassany requested a review from a team as a code owner November 12, 2024 15:14
@davidcassany davidcassany force-pushed the fix_creating_squashfs_images branch 2 times, most recently from 856838f to bf0edb3 Compare November 12, 2024 15:20
If upgrading from a container including the root of the host
mounted in /host the upgrade process does not exclude the /host
path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls
to also apply for mksquashfs.

Signed-off-by: David Cassany <[email protected]>
This commit defines static methods for excluded paths in
sync operations. One method for relative paths and
another one with the same result rooted to a given path.
It also uses wildcards to only exclude certain directories
content while keeping the directory itself.

Signed-off-by: David Cassany <[email protected]>
@davidcassany davidcassany merged commit 527c12d into rancher:main Nov 13, 2024
28 checks passed
@davidcassany davidcassany deleted the fix_creating_squashfs_images branch November 13, 2024 10:03
davidcassany added a commit to davidcassany/elemental-toolkit that referenced this pull request Nov 13, 2024
* Fixes squashfs images creation (bsc#1233289)

If upgrading from a container including the root of the host
mounted in /host the upgrade process does not exclude the /host
path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls
to also apply for mksquashfs.

Signed-off-by: David Cassany <[email protected]>

* Define static method for default exclude relative paths

This commit defines static methods for excluded paths in
sync operations. One method for relative paths and
another one with the same result rooted to a given path.
It also uses wildcards to only exclude certain directories
content while keeping the directory itself.

Signed-off-by: David Cassany <[email protected]>

* Add some additional unit tests for rsync wrappers

Signed-off-by: David Cassany <[email protected]>

---------

Signed-off-by: David Cassany <[email protected]>
(cherry picked from commit 527c12d)
davidcassany added a commit to davidcassany/elemental-toolkit that referenced this pull request Nov 13, 2024
* Fixes squashfs images creation (bsc#1233289)

If upgrading from a container including the root of the host
mounted in /host the upgrade process does not exclude the /host
path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls
to also apply for mksquashfs.

Signed-off-by: David Cassany <[email protected]>

* Define static method for default exclude relative paths

This commit defines static methods for excluded paths in
sync operations. One method for relative paths and
another one with the same result rooted to a given path.
It also uses wildcards to only exclude certain directories
content while keeping the directory itself.

Signed-off-by: David Cassany <[email protected]>

* Add some additional unit tests for rsync wrappers

Signed-off-by: David Cassany <[email protected]>

---------

Signed-off-by: David Cassany <[email protected]>
(cherry picked from commit 527c12d)
davidcassany added a commit that referenced this pull request Nov 13, 2024
* Fixes squashfs images creation (bsc#1233289)

If upgrading from a container including the root of the host
mounted in /host the upgrade process does not exclude the /host
path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls
to also apply for mksquashfs.

Signed-off-by: David Cassany <[email protected]>

* Define static method for default exclude relative paths

This commit defines static methods for excluded paths in
sync operations. One method for relative paths and
another one with the same result rooted to a given path.
It also uses wildcards to only exclude certain directories
content while keeping the directory itself.

Signed-off-by: David Cassany <[email protected]>

* Add some additional unit tests for rsync wrappers

Signed-off-by: David Cassany <[email protected]>

---------

Signed-off-by: David Cassany <[email protected]>
(cherry picked from commit 527c12d)
davidcassany added a commit that referenced this pull request Nov 13, 2024
* Fixes squashfs images creation (bsc#1233289)

If upgrading from a container including the root of the host
mounted in /host the upgrade process does not exclude the /host
path and other stateful paths such as /run.

This commit sets the default excludes used in rsync calls
to also apply for mksquashfs.

Signed-off-by: David Cassany <[email protected]>

* Define static method for default exclude relative paths

This commit defines static methods for excluded paths in
sync operations. One method for relative paths and
another one with the same result rooted to a given path.
It also uses wildcards to only exclude certain directories
content while keeping the directory itself.

Signed-off-by: David Cassany <[email protected]>

* Add some additional unit tests for rsync wrappers

Signed-off-by: David Cassany <[email protected]>

---------

Signed-off-by: David Cassany <[email protected]>
(cherry picked from commit 527c12d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-backport
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants