-
Notifications
You must be signed in to change notification settings - Fork 43
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
Solaris port: zfs list without -p #16
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR - I'll have to debug what happened with the tests here. Can you please give your system information and zfs version so I can better look at the proposed changes? |
Solaris 11.3, with whatever version of ZFS comes with it (I'm running pool version 28, but that's not really relevant to command line options). |
Solaris does not support the -p option to zfs list. Parse dates manually. parse time in current location Solaris zfs list only accurate to minute
697d052
to
42b4e24
Compare
This is a bit uglier than I imagined. The output of "zfs get -H -p -o value creation" is accurate to the second, whereas on Solaris (which lacks -p and returns a string) it is only accurate to the minute. For snapshots to be found during an incremental backup, I needed to truncate snapshot creation times to the second when comparing. A better fix for Solaris would be to use |
This introduces a breaking change - one that I'm not comfortable making. I think a better solution would be to break apart the helpers package into better named ones (e.g. a Either way, I appreciate the PR and will probably be using it to test as I spin up my own Solaris VM to implement a fix here. |
That sounds like a good plan. I'm sure you can test on Linux/FreeBSD, as that will work of course without the -p option. Can I leave it with you? I'm not a Go programmer so I'm sure it will be quicker for you to fix! |
To-the-minute granularity (on Solaris) is fine for me, I'm more concerned actually about the timezone issue vis-a-vis changing to summer time. |
I can take it from here - thanks for all the work you've put in thus far! I'd like to try testing against Solaris as that's the target in question here. There could be other things that I notice while testing aside from just the dates here (e.g. ZoL has a guid per snapshot available but FreeBSD keeps this internal, hence why we're dealing with name and date matches currently) |
I found that on some opensource Solaris based OS,
So maybe we should check the availability of -p instead of detecting OS? |
Solaris does not support the -p option to zfs list. Parse dates manually.
NB – I'm not a go programmer so this is probably not idiomatic.