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
Support zfs_pool
and zfs_dataset
resources on Linux
#5075
Labels
Component: Core Resources
Resources shipped with InSpec.
Type: Enhancement
Improves an existing feature
Comments
mattjmcnaughton
added a commit
to mattjmcnaughton/self-hosted
that referenced
this issue
Jun 6, 2020
Add more components of the `zfs-nas` role. Specifically, add the components that actually create the `zpool` and `zfs datasets`. The `zfs` support is ok... we can create datasets via Ansible, but not zpool. W.r.t. inspec, we need to use command, as we can't use the `inspec` ZFS resources. See inspec/inspec#5075 for more details.
Hi @mattjmcnaughton - I think your analysis is right, what is needed is:
|
james-stocks
added
Component: Core Resources
Resources shipped with InSpec.
Type: Enhancement
Improves an existing feature
labels
Jun 8, 2020
On Mon, Jun 08, 2020 at 03:13:17AM -0700, James Stocks wrote:
Hi @mattjmcnaughton -
Thank you for the kind feedback and this detailed description.
I think your analysis is right, what is needed is:
1. Remove the `unless` condition that restricts zfs resources to BSD.
2. Test carefully on a host that _might_ have zfs but currently doesn't - need to ensure there are no unhandled exceptions. Resources should just return nil/false when they don't exist on the target host.
3. Handle zfs not always being `/sbin/zfs`
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#5075 (comment)
Cool - I can take an initial stab at this hopefully within the next week? I must
admit, its been a while since I've worked w/ Ruby so no guarantees haha :P but
hopefully will be able to get a pr for y'all.
Of course, of someone else wants to work on it before then, please do! Maybe
just comment in the issue so I don't also spend time on it?
Thanks!
|
If you get a chance, that would be great, thank you! You could set yourself as assignee so anyone else reviewing this issue sees that someone is already looking into the implementation. Cheers! |
kannanr
added a commit
to kannanr/inspec
that referenced
this issue
May 15, 2021
2 tasks
kannanr
added a commit
to kannanr/inspec
that referenced
this issue
May 15, 2021
kannanr
added a commit
to kannanr/inspec
that referenced
this issue
May 15, 2021
kannanr
added a commit
to kannanr/inspec
that referenced
this issue
May 15, 2021
. Signed-off-by: @kannanr <kannaa.ram@gmail.com>
clintoncwolfe
added a commit
that referenced
this issue
May 16, 2021
Support zfs_pool and zfs_dataset resources on Linux. Handled #5075
Added on #5523 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Core Resources
Resources shipped with InSpec.
Type: Enhancement
Improves an existing feature
Would y'all be open to removing the restriction that only allows the
zfs_pool
andzfs_dataset
commands to run on FreeBSD? With the advent of ZFS on Linux (particularly its inclusion in Ubuntu 20.04), I imagine it'll see greater and greater Linux adoption. It'd be great if folks running ZFS on Linux could use the Inspec ZFS Resources.Detailed Description
If folks using Linux can't use the
zfs_pool
andzfs_dataset
, but still want to test ZFS resources, they are left usingcommand
, which is less readable and wasted effort.Context
My personal use case is that I'm deploying ZFS on some Ubuntu 20.04 machines, and want to test my provisioning via Inspec using the built in
zfs_pool
andzfs_dataset
resources.Possible Implementation
The first step would be removing the guard against any OS other than FreeBSD here. We may also want to start using
which
to identify thezfs/zpool
binaries, instead of relying on/sbin/zfs
. I think that the ideas presented in #3800 could serve as a starting point.If y'all are open to this feature, I'm happy to try and implement. Also, happy to have someone else implement it :)
Thanks so much for the great software - Inspec has made testing my infra a joy!
Aha! Link: https://chef.aha.io/features/SH-2190
The text was updated successfully, but these errors were encountered: