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

Fix 481 #509

Merged
merged 3 commits into from
Aug 11, 2021
Merged

Fix 481 #509

merged 3 commits into from
Aug 11, 2021

Conversation

Itxaka
Copy link
Contributor

@Itxaka Itxaka commented Aug 11, 2021

see commits for more info

closes #481

Itxaka added 2 commits August 11, 2021 13:03
Using user/pass its cool but you know whats even cooler? using the key
that we insert as a vagrant cos feature which persists across reboots
and resets

Signed-off-by: Itxaka <igarcia@suse.com>
Looks like becasue the dir we point unpack to doesnt exists **and** its
has a parent that also doesnt exist the non privileged path on luet[0]
just tries to create the parent but fails because its not recursive,
i.e. doesnt create the parents as neccesary. Meanwhile when using the
privileged path[1] the lib creates the destination and all the parents
needed, thus this is not a privs issue but a library issue. It only
appears when having that switch because it takes different paths to
different libs to deal with this.

Creating the expected dir before extracting works in both paths.

[0] https://github.com/mudler/luet/blob/master/vendor/github.com/containerd/containerd/archive/tar.go#L231
[1] https://github.com/mudler/luet/blob/master/vendor/github.com/docker/docker/pkg/archive/archive.go#L942

Signed-off-by: Itxaka <igarcia@suse.com>
@@ -184,6 +183,8 @@ upgrade() {
else
echo "Upgrading from container image: $UPGRADE_IMAGE"
set -x
# unpack doesnt like when you try to unpack to a non existing dir
mkdir -p $upgrade_state_dir/tmp/rootfs || true
Copy link
Contributor

@mudler mudler Aug 11, 2021

Choose a reason for hiding this comment

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

I'm cooking a 0.17.8 and this shouldn't be required anymore, but nevertheless is good to have! 👍

Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

Looks good (and good catch)! hopefully CI is going to be happy with it! 🤞

@Itxaka Itxaka changed the title Fix 461 Fix 481 Aug 11, 2021
Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

almost forgot - it misses a bump to cOS packages

@Itxaka
Copy link
Contributor Author

Itxaka commented Aug 11, 2021

image

Signed-off-by: Itxaka <igarcia@suse.com>
@Itxaka Itxaka requested a review from mudler August 11, 2021 15:10
@mudler mudler enabled auto-merge (squash) August 11, 2021 16:01
@mudler mudler merged commit 28c281d into rancher:master Aug 11, 2021
mudler added a commit that referenced this pull request Sep 6, 2021
A follow up of #509

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
@mudler mudler mentioned this pull request Sep 6, 2021
mudler added a commit that referenced this pull request Sep 6, 2021
* Disable privileged extract on cos-deploy

A follow up of #509

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Bump cOS

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
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.

set LUET_PRIVILEGED_EXTRACT to false make our test suite to fail
2 participants