-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
btrfs: Add properties state #52699
btrfs: Add properties state #52699
Conversation
69dad07
to
82fb3e8
Compare
What is the opinion about the code climate complains? Some of them are weird to me. |
Ready for reviews : ) |
@aplanas Yeah, we're (gradually) tuning the checks. Most of them are a little aggressive for what we need. We take the advice with a heaping spoonful of salt |
4272e1e
to
c9b414b
Compare
Rebased on top of #54962, that is also rebased on master. Once the other one is merged, I can rebase on top of the real master. |
3214b02
to
66277f4
Compare
450d104
to
1c69723
Compare
Just merged master in - twice it was missing |
@aplanas looks like it needs some pre-commit hooks executed. If you haven't yet, quickstart docs has a guide on setting it up. |
441a4d0
to
e59e156
Compare
The fails now is about missing documentation. How can I generate it? |
Did you get the docs figured out? I'm not seeing any failure messages about that (though we did recently merge a PR that would fail if the module lacks an entry in the I am seeing this failure, which looks definitely related: https://jenkinsci.saltstack.com/job/pr-fedora30-py3/job/PR-52699/27/testReport/junit/unit.states.test_btrfs/BtrfsTestCase/test_properties_test/ |
(cherry picked from commit 237d40d)
When we want to create a subvolume and set is as default, we can use the set_default parameter. The current code will check, for already created subvolumes, if it is actually marked as default, and if not it will be set inside the state. For composability with other states, we sometimes want to avoid the re-set of the default flag for already present subvolumes, as can be that this was change in a later action by another state. (cherry picked from commit 067482e)
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.
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
Yes, documentation issue figure out. I fixed the test case, was a bad rebase. |
@waynew Look good now? |
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.
@dwoz LGTM 👍
What does this PR do?
We can set via
btrfs property
command some properties. This commandis 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