contained_mr 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 440ccef564b310bd2bc7752380b7d97861ab2020
4
- data.tar.gz: 15f09bb85ba6e21447b38b26d0790b09342d3f01
3
+ metadata.gz: cb47353419e6a56f1246d06934b63c123edfb442
4
+ data.tar.gz: 594990cbb031cd9e9298832c0374b2d76e81196d
5
5
  SHA512:
6
- metadata.gz: 814c12447b2d338a6781cc81419117b189c19598f9dc942f0f8264dd05dfbd4d4cab297ee029a6efe9808cb5b5366cdb0968c6617ba9165eda169c76f2cc0b24
7
- data.tar.gz: e4b768cb0013ea3dc9b8f9817481eda342c87d966cb4dfcc206f175a5112826960d1c540e53ceaf1729f401e67c3ffb3dab38857e66ff7acda747f36c1f34c61
6
+ metadata.gz: b0bd1266cfdbaf5d1b24757d8bf52e37a0780b5912d78bf987c1f0b50247874709a832ad7aaec06649d7b8b80ca48c58f301bed0d91ea9632041d20ec697ca9b
7
+ data.tar.gz: 2925db33e8bb0179a80b7e93968c6728139d1b4735dc86918fd30d72a50f8355b3ba8d372357cfab01d2f16bb5ce15f77fffff4bf4cc8c5487fb7eb7c4f9d86f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/contained_mr.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: contained_mr 0.3.2 ruby lib
5
+ # stub: contained_mr 0.3.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "contained_mr"
9
- s.version = "0.3.2"
9
+ s.version = "0.3.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -109,8 +109,8 @@ module ContainedMr::JobLogic
109
109
 
110
110
  {
111
111
  'Memory' => ram_bytes, 'MemorySwap' => swap_bytes,
112
- 'CpuShares' => (job_section[:vcpus] * cpu_period).to_i,
113
- 'CpuPeriod' => cpu_period
112
+ 'CpuPeriod' => cpu_period,
113
+ 'CpuQuota' => (job_section[:vcpus] * cpu_period).to_i,
114
114
  }
115
115
  end
116
116
  private :container_host_config
@@ -112,8 +112,8 @@ class ContainedMr::Mock::Runner
112
112
  def _vcpus
113
113
  return nil unless host_config = @_container_options['HostConfig']
114
114
  return nil unless period = host_config['CpuPeriod']
115
- return nil unless shares = host_config['CpuShares']
115
+ return nil unless quota = host_config['CpuQuota']
116
116
 
117
- shares / period.to_f
117
+ quota / period.to_f
118
118
  end
119
119
  end
@@ -40,7 +40,7 @@ class TestJobLogic < MiniTest::Test
40
40
  'HostConfig' => {
41
41
  'Memory' => 256.5 * 1024 * 1024,
42
42
  'MemorySwap' => (256.5 + 64) * 1024 * 1024,
43
- 'CpuShares' => 1500000,
43
+ 'CpuQuota' => 1500000,
44
44
  'CpuPeriod' => 1000000,
45
45
  },
46
46
  }
@@ -63,7 +63,7 @@ class TestJobLogic < MiniTest::Test
63
63
  'HostConfig' => {
64
64
  'Memory' => 768.5 * 1024 * 1024,
65
65
  'MemorySwap' => -1,
66
- 'CpuShares' => 500000,
66
+ 'CpuQuota' => 500000,
67
67
  'CpuPeriod' => 1000000,
68
68
  },
69
69
  }
@@ -17,7 +17,7 @@ class TestMockRunner < MiniTest::Test
17
17
  'HostConfig' => {
18
18
  'Memory' => 256.5 * 1024 * 1024,
19
19
  'MemorySwap' => (256.5 + 64) * 1024 * 1024,
20
- 'CpuShares' => 1500000,
20
+ 'CpuQuota' => 1500000,
21
21
  'CpuPeriod' => 1000000,
22
22
  },
23
23
  }
@@ -137,7 +137,7 @@ class TestMockRunner < MiniTest::Test
137
137
  end
138
138
 
139
139
  def test_memory_cpu_limits_without_host_config_cpu_shares
140
- @container_options['HostConfig'].delete 'CpuShares'
140
+ @container_options['HostConfig'].delete 'CpuQuota'
141
141
  runner = ContainedMr::Mock::Runner.new @container_options, 2.5,
142
142
  '/usr/mrd/map-output'
143
143
  assert_equal 256.5, runner._ram_limit
@@ -16,7 +16,7 @@ class TestRunnerLogic < MiniTest::Test
16
16
  'HostConfig' => {
17
17
  'Memory' => 256.5 * 1024 * 1024,
18
18
  'MemorySwap' => (256.5 + 64) * 1024 * 1024,
19
- 'CpuShares' => 1500000,
19
+ 'CpuQuota' => 1500000,
20
20
  'CpuPeriod' => 1000000,
21
21
  },
22
22
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contained_mr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan