radosgw-s3 0.4 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ceph/radosgw.rb +4 -1
- data/lib/s3/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de2e6c6190b45b9b75aae4043eb248ebe80752aa
|
4
|
+
data.tar.gz: 5eaf652702ee6343ba519b099db3a6436442f9a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20d3f333a2a7091f2246fbb4fbf9fe98d8252493d790040c898e02c6c9b1026b7ee12d9ad58ae4fb52d13497a7fb641183a68ba02c4af14f7a002bdbd59bff7a
|
7
|
+
data.tar.gz: 828fed5272e3946575c92c86958ad317c243a57468df73600b023edf1f9d365d7f270a7ead77287d8043390400d5dba405dfd7725611430e57fffd263cac0e60
|
data/lib/ceph/radosgw.rb
CHANGED
@@ -37,11 +37,14 @@ module CEPH
|
|
37
37
|
user_usage_json = ssh.exec!("sudo radosgw-admin user stats --uid='#{uid}'")
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
if user_usage_json.include? "ERROR: can't read user header: (2) No such file or directory"
|
41
|
+
usage_hash = {"total_objects" => "0", "total_bytes" => "0", "last_update" => "#{Time.now}" }
|
42
|
+
else
|
41
43
|
user_usage_hash = JSON.parse(user_usage_json)
|
42
44
|
usage_hash = {"total_objects" => "#{user_usage_hash['stats']['total_entries']}", "total_bytes" => "#{user_usage_hash['stats']['total_bytes_rounded']}", "last_update" => "#{user_usage_hash['last_stats_update']}" }
|
43
45
|
usage_hash
|
44
46
|
end
|
47
|
+
end
|
45
48
|
|
46
49
|
end
|
47
50
|
end
|
data/lib/s3/version.rb
CHANGED