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: chattr exits with status 1 for files that are not permitted without force flag #2351

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

Glitchfix
Copy link
Contributor

@Glitchfix Glitchfix commented Sep 27, 2023

What this PR does / why we need it:
chattr exits with status 1 for files that are not permitted without force flag

Which issue(s) this PR fixes (optional)
PWX-32298
It was obsereved that the package was throwing error despite of setting the immutability flags properly.

 Operation not supported while reading flags on /var/lib/kubelet/plugins_registry/pxd.portworx.com-reg.sock

Testing Notes
Use the package to set immutability flags on node registration socket,
use the ForceAddImmutable method to set the immutability flags
it can be compared to AddImmutable that ForceAddImmutable does set the flags successfully

@Glitchfix Glitchfix marked this pull request as ready for review September 27, 2023 12:36
Copy link
Contributor

@ggriffiths ggriffiths left a comment

Choose a reason for hiding this comment

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

Let's try to avoid changing the functionality of code when not needed. This chattr package is called on every Mount/Unmount for every volume. So, changing the contract of how we return errors can lead to bugs.

pkg/chattr/chattr.go Outdated Show resolved Hide resolved
pkg/chattr/chattr.go Outdated Show resolved Hide resolved
pkg/chattr/chattr.go Outdated Show resolved Hide resolved
pkg/chattr/chattr.go Outdated Show resolved Hide resolved
pkg/chattr/chattr.go Outdated Show resolved Hide resolved
@ggriffiths
Copy link
Contributor

@Glitchfix can you fix the travis failure?

git-validation -run DCO,short-subject
 * 9a01976 "refactor: [minor refactor] remove extra line and return nil to not break existing mount functionalities" ... FAIL
  - FAIL - commit subject exceeds 90 characters

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

This PR is stale because it has been in review for 3 days with no activity.

@ggriffiths ggriffiths merged commit fa1889f into libopenstorage:master Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants