foreman_maintain 0.6.15 → 0.6.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03389eb2ca1e4f48b3fd795cdf443254a873c8823b2142bffdac15a4c940a29c'
|
4
|
+
data.tar.gz: 322a7413bb3e65c2d07f4646ee33f6e24cedfa64bfd5a519e91ea6c70ccfa53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57661b18eafd6943bd5dfd73bf8314247ee426874b80de2ced9c1cf3341fc5e7d3750554bc349d09ae37d3dba4e5a7d9bf8f938c482f4d22080febc0f03e50f1
|
7
|
+
data.tar.gz: ea65edc6f4b121f32aad24069d0f7c68340465cd8d36fd3d1ca507b2e0f1a46bf4c62a9a62c5d965fc7915f6b66b0250ba8c3230de9b52a7114d94286aa91f4d
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Checks
|
2
|
+
module Disk
|
3
|
+
class AvailableSpaceCandlepin < ForemanMaintain::Check
|
4
|
+
metadata do
|
5
|
+
label :available_space_cp
|
6
|
+
description 'Check to make sure /var/lib/candlepin has enough space'
|
7
|
+
tags :pre_upgrade
|
8
|
+
confine do
|
9
|
+
feature(:candlepin) && check_min_version('candlepin', '3.1')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
MAX_USAGE_IN_PERCENT = 90
|
14
|
+
|
15
|
+
def run
|
16
|
+
assert(enough_space?, "System has more than #{MAX_USAGE_IN_PERCENT}% space used"\
|
17
|
+
" on #{feature(:candlepin).work_dir}.\n"\
|
18
|
+
'See https://bugzilla.redhat.com/show_bug.cgi?id=1898605')
|
19
|
+
end
|
20
|
+
|
21
|
+
def enough_space?
|
22
|
+
io_obj = ForemanMaintain::Utils::Disk::IODevice.new(feature(:candlepin).work_dir)
|
23
|
+
io_obj.space_used_in_percent < MAX_USAGE_IN_PERCENT
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -22,6 +22,10 @@ module ForemanMaintain
|
|
22
22
|
convert_kb_to_mb(execute!("df #{dir}|awk {'print $4'}|tail -1").to_i)
|
23
23
|
end
|
24
24
|
|
25
|
+
def space_used_in_percent
|
26
|
+
execute!("df #{dir}|awk {'print $5'}|tail -1").to_i
|
27
|
+
end
|
28
|
+
|
25
29
|
private
|
26
30
|
|
27
31
|
# In fio command, --direct option bypass the cache page
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- definitions/checks/check_hotfix_installed.rb
|
126
126
|
- definitions/checks/check_tmout.rb
|
127
127
|
- definitions/checks/disk/available_space.rb
|
128
|
+
- definitions/checks/disk/available_space_candlepin.rb
|
128
129
|
- definitions/checks/disk/performance.rb
|
129
130
|
- definitions/checks/env_proxy.rb
|
130
131
|
- definitions/checks/foreman/check_checkpoint_segments.rb
|
@@ -406,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
406
407
|
- !ruby/object:Gem::Version
|
407
408
|
version: '0'
|
408
409
|
requirements: []
|
409
|
-
rubygems_version: 3.0.
|
410
|
+
rubygems_version: 3.0.3
|
410
411
|
signing_key:
|
411
412
|
specification_version: 4
|
412
413
|
summary: Foreman maintenance tool belt
|