ood_core 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 459b58d5f136ce29268fe40b8eaf470de62e2784
4
- data.tar.gz: d63226217007a7b7a269561b45a3bbc655e83c57
3
+ metadata.gz: be86923f05460b4c0203e23561a6546c755f25da
4
+ data.tar.gz: b51795a22118a9d364ab46da9c10008fb79a79e5
5
5
  SHA512:
6
- metadata.gz: 3d15a23ba546a7c1ca4fd6dd6ef2f652e11f9eadfd3ae81c92b71649c04a380c5c282c5628a7b6aa571aaa42180b54e68cabce7bf0d6ebaf164588f26c7abebc
7
- data.tar.gz: 4736fcd7049e7c99f3587f936b98afd45cc1fc3f7ec110a28f788e1cc1421ad9e24e2ee034df78e836cb0e7902b0a6041dff6611fce9e362fa1dbb406d4445e2
6
+ metadata.gz: 08c632fa26bfdb1386c5ba144c4c84fe49c3ad0a625d99da66f70069f0b21535b5c59602f065163c5e0b22a4fbd0c5638c8440dfa06750bb1c6d5392712b3016
7
+ data.tar.gz: 103dabc355a0b32d4e55a4acb57db3cf07e34623404238d166732e1f7ffc98ebd1eff512a025298edfd3f04ed83af5752081043f1c6c7aac24a44a658230e9c1
data/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2018-01-26
11
+ ### Changed
12
+ - Updated the date in the `LICENSE.txt` file.
13
+
14
+ ### Fixed
15
+ - Fixed bug where LSF adapter would sometimes return `nil` when getting job
16
+ info. [#75](https://github.com/OSC/ood_core/issues/75)
17
+ - Fixed list of allocated nodes for LSF adapter when single node is expanded
18
+ for each core. [#71](https://github.com/OSC/ood_core/issues/71)
19
+ - Clean up children processes in forked Batch Connect main script before
20
+ cleaning up batch script. [#69](https://github.com/OSC/ood_core/issues/69)
21
+ - Fix bug when detecting open ports using the bash helpers in the Batch Connect
22
+ template. [#70](https://github.com/OSC/ood_core/issues/70)
23
+
10
24
  ## [0.2.0] - 2017-10-11
11
25
  ### Added
12
26
  - Added Batch Connect helper function to wait for port to be used.
@@ -85,7 +99,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
85
99
  ### Added
86
100
  - Initial release!
87
101
 
88
- [Unreleased]: https://github.com/OSC/ood_core/compare/v0.2.0...HEAD
102
+ [Unreleased]: https://github.com/OSC/ood_core/compare/v0.2.1...HEAD
103
+ [0.2.1]: https://github.com/OSC/ood_core/compare/v0.2.0...v0.2.1
89
104
  [0.2.0]: https://github.com/OSC/ood_core/compare/v0.1.1...v0.2.0
90
105
  [0.1.1]: https://github.com/OSC/ood_core/compare/v0.1.0...v0.1.1
91
106
  [0.1.0]: https://github.com/OSC/ood_core/compare/v0.0.5...v0.1.0
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Ohio Supercomputer Center
3
+ Copyright (c) 2017-2018 Ohio Supercomputer Center
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -105,7 +105,7 @@ module OodCore
105
105
  # Check if port $1 is in use
106
106
  port_used () {
107
107
  local port="${1#*:}"
108
- local host=$(expr "${1}" : '\\(.*\\):' || echo "localhost")
108
+ local host=$((expr "${1}" : '\\(.*\\):' || echo "localhost") | awk 'END{print $NF}')
109
109
  nc -w 2 "${host}" "${port}" < /dev/null &> /dev/null
110
110
  }
111
111
  export -f port_used
@@ -215,6 +215,7 @@ module OodCore
215
215
  clean_up () {
216
216
  echo "Cleaning up..."
217
217
  #{clean_script.gsub(/\n(?=[^\s])/, "\n ")}
218
+ [[ ${SCRIPT_PID} ]] && pkill -P ${SCRIPT_PID} || :
218
219
  pkill -P $$
219
220
  exit ${1:-0}
220
221
  }
@@ -27,11 +27,15 @@ class OodCore::Job::Adapters::Lsf::Helper
27
27
  # convert exec_host string format from bjobs to a hash
28
28
  # i.e. "c012" => [{host: "c012", slots: 1}]
29
29
  # i.e. "4*c012:8*c013" => [{host: "c012", slots: 4}, {host: "c013", slots: 8}]
30
+ # i.e. "c012:c012" => [{host: "c012", slots: 2}]
30
31
  def parse_exec_host(exec_host_str)
31
32
  return [] if exec_host_str.nil? || exec_host_str.empty?
32
33
 
33
34
  exec_host_str.scan(exec_host_regex).map do |match|
34
35
  {host: match[2], slots: match[1] ? match[1].to_i : 1}
36
+ end.group_by { |node| node[:host] }.map do |host, nodes|
37
+ slots = nodes.reduce(0) { |count, node| count + node[:slots] }
38
+ {host: host, slots: slots}
35
39
  end
36
40
  end
37
41
 
@@ -89,7 +89,14 @@ module OodCore
89
89
  def info(id)
90
90
  # TODO: handle job arrays
91
91
  job = batch.get_job(id: id)
92
- job ? info_for_batch_hash(job) : nil
92
+ if job
93
+ info_for_batch_hash(job)
94
+ else
95
+ Info.new(
96
+ id: id,
97
+ status: :completed
98
+ )
99
+ end
93
100
  rescue Batch::Error => e
94
101
  raise JobAdapterError, e.message
95
102
  end
@@ -1,4 +1,4 @@
1
1
  module OodCore
2
2
  # The current version of {OodCore}
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Nicklas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ood_support