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

(Backport 52699) btrfs: Add properties state #53439

Closed
wants to merge 3 commits into from

Conversation

aplanas
Copy link
Contributor

@aplanas aplanas commented Jun 11, 2019

What does this PR do?

We can set via btrfs property command some properties. This command
is used in the btrfs execution module.

The current state will leverate this code to make sure that some
properties al set or unset in a safe mode.

Tests written?

Yes

(backport #52699)

@aplanas aplanas requested a review from a team as a code owner August 23, 2019 08:14
@ghost ghost requested a review from dwoz August 23, 2019 08:14
waynew
waynew previously requested changes Aug 28, 2019
Copy link
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

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

@aplanas thanks for the PR! Just a couple of requests & a discussion point.

salt/states/btrfs.py Outdated Show resolved Hide resolved
salt/states/btrfs.py Show resolved Hide resolved
salt/states/btrfs.py Show resolved Hide resolved
tests/unit/states/test_btrfs.py Show resolved Hide resolved
@waynew waynew dismissed their stale review September 6, 2019 16:58

All good now

The decorator can work without a device (so nothing can be mounted)

Also the traceback removed in PR#51205 is re-added, to show the
internal exception from the decorated code.

(cherry picked from commit adafb369d37a0b33b2b2e3e5c17e1388de34958b)
We can set via `btrfs property` command some properties. This command
is used in the btrfs execution module.

The current state will leverate this code to make sure that some
properties al set or unset in a safe mode.

For example:

   set_property_ro_/:
     - name: /
     - device: /dev/sda1
     - use_defaults: yes
     - ro: yes

(cherry picked from commit e3d14dffc8991bd453701c4f4b8770d961a769b6)
(cherry picked from commit d2280f060faef109ea439c539472d159b7dfb172)
@aplanas
Copy link
Contributor Author

aplanas commented Oct 14, 2019

Rebased on master in #52699

@aplanas aplanas closed this Oct 14, 2019
@aplanas aplanas deleted the backport_52699 branch October 14, 2019 12:46
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.

4 participants