Closed sjorge closed 8 years ago
I'm happy to go over them and fix these up, although I am not sure how to do this and retain backwards compatibility with the current straight dumped output?
Any suggestions? Seems you can set a 'provider' in the minion config.
Maybe rename zfs to zfs_legacy and implement an new clean zfs/zpool module. People who really depend on the old one can enable it again.
There are also some simple additions that can be added (which I was looking for when I found this) e.g.
Stuff like above is often done from cron to send mails on failty pools, this can then be used with a scheduler and possibly reactor to automate parts of this work flow
/usr/sbin/zpool status -x | grep -v 'healthy' # asmd-cron-job [detect_zpool_health]
@sjorge, thanks for looking into this. I am unsure what you mean by creating a provider for zfs. If the zfs/zpool code needs an update, you are very welcome to deprecate functions and arguments or even whole modules and rewrite things in a better layout.
zpool done, up next zfs
Looks like the output is just a simple dump of the text output of the commands, e.g.:
/opt/local/salt/bin/salt-call --local zpool.list
/opt/local/salt/bin/salt-call --local zpool.status zones
/opt/local/salt/bin/salt-call --local zpool.status
does not work:While it is perfectly fine to request info for all zpools!
Looking at the code the seems looks to be true for salt.modules.zfs but it is not working on SmartOS at the moment, although the zfs command is available.