zfs_mgmt 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7f44dfd817cadcabaf53c1b8fcfd251b59ffcd919aa8a97a6cc9d19c98bbf45
4
- data.tar.gz: 01b9855f993dac35e65e8d41bf67552bd50c85d18d7e6929c6aa8d564dd9533b
3
+ metadata.gz: 97a0bda8881608e6e7fae8a94103e2867d199923f2df9ca9d1776ad6d4626fbe
4
+ data.tar.gz: 1851e69229905792ace9c998a3f6e88129c4d2f3d45440e8e2c3f7c07626c147
5
5
  SHA512:
6
- metadata.gz: c9eb6b8de6cc72dec2445ccd4b937c9655fb8ac10105991c9351fe31afd138c5a66575797dcb746a9f0da176cb8c57aeffcc25a8a9ba32fc59f835d2a0b5381e
7
- data.tar.gz: c65977164b6aa98cfc3112ef9a9cdb767d7dc675e0bc4acbe2e118becb35b11d8eb6a8b9bf818959cb3754f6b492471481fbde155e966364f21f02a79c983943
6
+ metadata.gz: 74fc7184eaf7b95edbe8d28dc804230c63c30ff3db0a495e4f86d395006d85ec29e3f2a7ce73d891c0d76627ee47004443d0c81819ece352933dde2a2115c844
7
+ data.tar.gz: 3437621f4c6ba8e52254c48d0496685efb530f31bfc96d5b73c396fd275161aae02aeef8714ace50682c086f748b5fe787324372b5994947e69ec6c40ab988a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zfs_mgmt (0.4.8)
4
+ zfs_mgmt (0.4.9)
5
5
  filesize (~> 0.2)
6
6
  text-table (~> 1.2)
7
7
  thor (~> 1.0)
@@ -1,3 +1,3 @@
1
1
  module ZfsMgmt
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
data/lib/zfs_mgmt.rb CHANGED
@@ -257,7 +257,7 @@ module ZfsMgmt
257
257
  next unless managed
258
258
  snaps = self.zfsget(properties: ['name','creation','userrefs','used','written','referenced'],types: ['snapshot'], zfs: zfs)
259
259
  if snaps.length == 0
260
- $logger.warn("unable to process this zfs, no snapshots at all: #{zfs}")
260
+ $logger.debug("not processing #{zfs} as there are no snapshots")
261
261
  next
262
262
  end
263
263
  zfss.push([zfs,props,snaps])
@@ -701,6 +701,13 @@ module ZfsMgmt
701
701
  $logger.error("unable to open lock file (#{options[:lock_file]}), possibly the directory doesn't exist")
702
702
  raise
703
703
  end
704
+ if lock.flock(File::LOCK_EX|File::LOCK_NB)
705
+ lock.flock(File::LOCK_UN)
706
+ else
707
+ # we failed to lock so locked without NB is likely to block for some amount of time
708
+ $logger.info("attempting to lock control file, this may block")
709
+ end
710
+
704
711
  if options[:lock_wait] > 0
705
712
  begin
706
713
  status = Timeout::timeout(options[:lock_wait]) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfs_mgmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aran Cox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-29 00:00:00.000000000 Z
11
+ date: 2025-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler