Skip to content

Conversation

@kolyshkin
Copy link
Contributor

What type of PR is this?

/kind deprecation

What this PR does / why we need it:

Remove device mapper support.

It seems that no one is using devicemapper storage driver nowadays, since overlayfs is so much better.

How to verify it

Which issue(s) this PR fixes:

Related to containers/storage#1619

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Device mapper storage driver is removed.

@TomSweeneyRedHat
Copy link
Member

Maybe I need more tea this morning, but this looks like the test should have passed. @edsantiago can you tell me where I'm mis-reading?

[+1012s] not ok 140 build using intermediate images should not inherit label
[+1012s] # (from function `assert' in file ./helpers.bash, line 430,
[+1012s] #  from function `expect_output' in file ./helpers.bash, line 457,
[+1012s] #  in test file ./bud.bats, line 1964)
[+1012s] #   `expect_output --substring --from="${lines[$i]}" "Using cache"' failed
[+1012s] # /var/tmp/go/src/github.com/containers/buildah/tests /var/tmp/go/src/github.com/containers/buildah/tests
[+1012s] # # [checking for: docker.io/library/alpine]
[+1012s] # # [restoring from cache: /var/tmp/buildah-image-cache.9270 / docker.io/library/alpine]
[+1012s] # Getting image source signatures
[+1012s] # Copying blob sha256:9d16cba9fb961d1aafec9542f2bf7cb64acfc55245f9e4eb5abecd4cdc38d749
[+1012s] # Copying config sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
[+1012s] # Writing manifest to image destination
[+1012s] # Storing signatures
[+1012s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah build --no-cache --layers --label somefancylabel=true --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json -t imageone -f Dockerfile.name /var/tmp/go/src/github.com/containers/buildah/tests/./bud/multi-stage-builds
[+1012s] # [1/2] STEP 1/2: FROM alpine AS myname
[+1012s] # [1/2] STEP 2/2: COPY Dockerfile.name /
[+1012s] # --> f892218adecd
[+1012s] # [2/2] STEP 1/3: FROM scratch
[+1012s] # [2/2] STEP 2/3: COPY --from=myname /Dockerfile.name /Dockerfile.name
[+1012s] # --> 4fb82e4e6451
[+1012s] # [2/2] STEP 3/3: LABEL "somefancylabel"="true"
[+1012s] # [2/2] COMMIT imageone
[+1012s] # --> b2010c270d55
[+1012s] # Successfully tagged localhost/imageone:latest
[+1012s] # b2010c270d55b5b5c5db710c5cb78cb5444cdcd812a280f41bc0e79f7466249a
[+1012s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah inspect --format {{ index .Docker.Config.Labels "somefancylabel"}} imageone
[+1012s] # true
[+1012s] # $ /var/tmp/go/src/github.com/containers/buildah/tests/./../bin/buildah build --layers --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json -t imagetwo -f Dockerfile.name /var/tmp/go/src/github.com/containers/buildah/tests/./bud/multi-stage-builds
[+1012s] # [1/2] STEP 1/2: FROM alpine AS myname
[+1012s] # Trying to pull docker.io/library/alpine:latest...
[+1012s] # Getting image source signatures
[+1012s] # Copying blob sha256:8a49fdb3b6a5ff2bd8ec6a86c05b2922a0f7454579ecc07637e94dfd1d0639b6
[+1012s] # Copying config sha256:5e2b554c1c45d22c9d1aa836828828e320a26011b76c08631ac896cbc3625e3e
[+1012s] # Writing manifest to image destination
[+1012s] # Storing signatures
[+1012s] # [1/2] STEP 2/2: COPY Dockerfile.name /
[+1012s] # --> ace9312b60b8
[+1012s] # [2/2] STEP 1/2: FROM scratch
[+1012s] # [2/2] STEP 2/2: COPY --from=myname /Dockerfile.name /Dockerfile.name
[+1012s] # --> Using cache 4fb82e4e645168a4b52f04c79c7d05baee81947332084c2b3e819a850c662135
[+1012s] # [2/2] COMMIT imagetwo
[+1012s] # --> 4fb82e4e6451
[+1012s] # Successfully tagged localhost/imagetwo:latest
[+1012s] # 4fb82e4e645168a4b52f04c79c7d05baee81947332084c2b3e819a850c662135
[+1012s] # #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
[+1012s] # #|     FAIL: buildah build --layers --signature-policy /var/tmp/go/src/github.com/containers/buildah/tests/./policy.json -t imagetwo -f Dockerfile.name /var/tmp/go/src/github.com/containers/buildah/tests/./bud/multi-stage-builds
[+1012s] # #| expected: =~ 'Using cache'
[+1012s] # #|   actual:    'Getting image source signatures'
[+1012s] # #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+1012s] # /var/tmp/go/src/github.com/containers/buildah/tests

@edsantiago
Copy link
Member

@TomSweeneyRedHat I'm not sure what your question is? The test is poorly written, it's ambiguous in its failure message, but basically it expects line 2 to be "Using cache" and it is not. I don't know enough about this test or about layers to know what the problem is. sorry.

@edsantiago
Copy link
Member

So, to simplify the life of whoever debugs this, here is a good/bad diff:

$ buildah build --layers [...]  -t imagetwo -f Dockerfile.name .../multi-stage-builds
[1/2] STEP 1/2: FROM alpine AS myname             | <same>
[1/2] STEP 2/2: COPY Dockerfile.name /            | Trying to pull docker.io/library/alpine:latest...
--> Using cache fa1c25317072...                   | Getting image source signatures
--> fa1c25317072                                  | Copying blob ...

Left is good (expected output), right is bad (failure in this CI run). Basically, the failed run does "Trying to pull alpine". Again, I can't explain why, and leave it to smarter people to investigate.

@TomSweeneyRedHat
Copy link
Member

Thanks @edsantiago your answer is what I was looking for. I saw the "Using cache" in the output, and given that, thought the test expected: =~ 'Using cache' should have been successful.

@kolyshkin
Copy link
Contributor Author

Rebased to include #4837

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

Rebased

@rhatdan
Copy link
Member

rhatdan commented Jun 13, 2023

/approve
LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 13, 2023

@giuseppe @vrothberg PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kolyshkin, rhatdan, vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Jun 14, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 14, 2023
@rhatdan rhatdan merged commit 13b6e4a into containers:main Jun 14, 2023
@rhatdan
Copy link
Member

rhatdan commented Jun 14, 2023

Now we need to debate whether we bump the major version of Buildah.

@vrothberg
Copy link
Member

Now we need to debate whether we bump the major version of Buildah.

Assuming devicemapper has never been supported, we may win in court :^)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants