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

[25.0 backport] pkg/system: return even richer xattr errors #47178

Merged
merged 1 commit into from Jan 23, 2024

Conversation

thaJeztah
Copy link
Member

The names of extended attributes are not completely freeform. Attributes are namespaced, and the kernel enforces (among other things) that only attributes whose names are prefixed with a valid namespace are permitted. The name of the attribute therefore needs to be known in order to diagnose issues with lsetxattr. Include the name of the extended attribute in the errors returned from the Lsetxattr and Lgetxattr so users and us can more easily troubleshoot xattr-related issues. Include the name in a separate rich-error field to provide code handling the error enough information to determine whether or not the failure can be ignored.

(cherry picked from commit 43bf65c)

- Description for the changelog

- To assist in troubleshooting, the name of the xattr which could not be set is now reported in error messages

- A picture of a cute animal (not mandatory but encouraged)

The names of extended attributes are not completely freeform. Attributes
are namespaced, and the kernel enforces (among other things) that only
attributes whose names are prefixed with a valid namespace are
permitted. The name of the attribute therefore needs to be known in
order to diagnose issues with lsetxattr. Include the name of the
extended attribute in the errors returned from the Lsetxattr and
Lgetxattr so users and us can more easily troubleshoot xattr-related
issues. Include the name in a separate rich-error field to provide code
handling the error enough information to determine whether or not the
failure can be ignored.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 43bf65c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added area/builder status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Jan 23, 2024
@thaJeztah thaJeztah added this to the 25.0.1 milestone Jan 23, 2024
@thaJeztah thaJeztah self-assigned this Jan 23, 2024
@thaJeztah thaJeztah marked this pull request as ready for review January 23, 2024 08:46
@thaJeztah
Copy link
Member Author

Failure is unrelated, and tracked in #47119

=== Failed
=== FAIL: amd64.integration.system TestDiskUsage/empty (0.00s)
    disk_usage_test.go:41: assertion failed: 
        --- du
        +++ →
          types.DiskUsage{
        - 	LayersSize: 4096,
        + 	LayersSize: 0,
          	Images:     {},
          	Containers: {},
          	... // 3 identical fields
          }
        
    --- FAIL: TestDiskUsage/empty (0.00s)

=== FAIL: amd64.integration.system TestDiskUsage (2.62s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants