-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 handling of tmpfs-mode for tmpfs creation in compat mode #13455
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM
…On Tue, Mar 8, 2022 at 09:00 openshift-ci[bot] ***@***.***> wrote:
[APPROVALNOTIFIER] This PR is *APPROVED*
This pull-request has been approved by: *rhatdan
<#13455#>*
The full list of commands accepted by this bot can be found here
<https://go.k8s.io/bot-commands?repo=containers%2Fpodman>.
The pull request process is described here
<https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process>
Needs approval from an approver in each of these files:
- OWNERS <https://github.com/containers/podman/blob/main/OWNERS>
[rhatdan]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
—
Reply to this email directly, view it on GitHub
<#13455 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCCEOOWM4O36K7TSVMDU65MOLANCNFSM5QGNVUTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Changes LGTM
|
It's a real error. Look at the colorized log. [EDIT: by "error" I mean "Dan fixed a real bug, and the test itself was actually broken"] |
Yes it is a real error but I can not understand how it is happening. When I run all of the tests with DOCKER_HOST docker, everything works correctly, If I inspect the container it looks correct. This only seems to be happening with the API.
|
Oh! Sorry, the bug is here: podman/test/apiv2/20-containers.at Line 397 in a08e4e5
The |
sigh index cc5eda88e..49f8fb3fc 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -394,7 +394,8 @@ t GET containers/$cid/json 200 \
.Config.Healthcheck.Retries=3
# compat api: Test for mount options support
-payload='{"Mounts":[{"Type":"tmpfs","Target":"/mnt/scratch","TmpfsOptions":{"SizeBytes":1024,"Mode":755}}]}'
+# Sigh, JSON can't handle octal. 0755(octal) = 493(decimal)
+payload='{"Mounts":[{"Type":"tmpfs","Target":"/mnt/scratch","TmpfsOptions":{"SizeBytes":1024,"Mode":493}}]}'
t POST containers/create Image=$IMAGE HostConfig="$payload" 201 .Id~[0-9a-f]\\{64\\}
cid=$(jq -r '.Id' <<<"$output")
t GET containers/$cid/json 200 \ |
Or, final thought for the day: maybe there's a way to make this code smarter about recognizing its input? podman/pkg/specgenutil/volumes.go Lines 431 to 435 in a08e4e5
|
The permissions on disk were wrong since we were not converting to octal. Fixes: containers#13108 [NO NEW TESTS NEEDED] Since we don't currently test using the docker client Signed-off-by: Daniel J Walsh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
The permissions on disk were wrong since we were not converting to
octal.
Fixes: #13108
[NO NEW TESTS NEEDED] Since we don't currently test using the docker
client
Signed-off-by: Daniel J Walsh [email protected]