ood_core 0.11.2 → 0.11.3

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: ee8aed504e3bdb8ef0e768a82cae8632a683d16764248a16c6061350a88f9f86
4
- data.tar.gz: 92c4f97a2f6f10e22085be6406ff5d3f9eebd1e0656a15f7b835f4fe4421d90a
3
+ metadata.gz: a23c90c01adf4d666e030c9279aad4dd234d36974b6b8a2d3395973d02f952e4
4
+ data.tar.gz: 628f309e893510774e19a73c04aa142ee0c7df5559e61c1dd17b00627d4b7c52
5
5
  SHA512:
6
- metadata.gz: 5b0f8422158f377f56a202a788a703ceb628dcfffc1e13a78c193ffa4e0f538108280a3c45af2dd404dd933142c1e78858cb7e8c2ffbdcd51e243d8d23afb6ca
7
- data.tar.gz: 7599e841e9c9e56b1c3308e5baa8b58db919707d940947dfee8cc93fdf98e5262b4674aec551ad084428c0312e4725408cb13d589ea9c119b71d3eb66f94c2de
6
+ metadata.gz: 64b840badad164595ff00bcecf12ac0da049787036f12c6fae3c3d52aa959d06e4e980ac93b638072aee8b0defee1b076fb2548399bbef31d4aff5e011a6df20
7
+ data.tar.gz: 7d0f69f0fd651a523dba71e26bae6d5846be01018cb9bc36aeae7dd01cc496b4e1319c2f8c6e15ccda7dbbb52f58941377292b176301197304cfa8dfd9472070
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
+ ## [0.11.3] - 2020-05-11
10
+ ### Fixed
11
+ - LinuxhHost Adapter to work with any login shell ([#188](https://github.com/OSC/ood_core/pull/188))
12
+ - LinuxhHost Adapter needs to display long lines in pstree to successfully parse
13
+ output ([#188](https://github.com/OSC/ood_core/pull/188))
14
+
9
15
  ## [0.11.2] - 2020-04-23
10
16
  ### Fixed
11
17
  - fix signature of `LinuxHost#info_where_owner`
@@ -222,7 +228,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
222
228
  ### Added
223
229
  - Initial release!
224
230
 
225
- [Unreleased]: https://github.com/OSC/ood_core/compare/v0.11.2...HEAD
231
+ [Unreleased]: https://github.com/OSC/ood_core/compare/v0.11.3...HEAD
232
+ [0.11.3]: https://github.com/OSC/ood_core/compare/v0.11.2...v0.11.3
226
233
  [0.11.2]: https://github.com/OSC/ood_core/compare/v0.11.1...v0.11.2
227
234
  [0.11.1]: https://github.com/OSC/ood_core/compare/v0.11.0...v0.11.1
228
235
  [0.11.0]: https://github.com/OSC/ood_core/compare/v0.10.0...v0.11.0
@@ -57,7 +57,7 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
57
57
  # @param hostname [#to_s] The hostname to submit the work to
58
58
  # @param script [OodCore::Job::Script] The script object defining the work
59
59
  def start_remote_session(script)
60
- cmd = ssh_cmd(submit_host(script))
60
+ cmd = ssh_cmd(submit_host(script), ['/usr/bin/env', 'bash'])
61
61
 
62
62
  session_name = unique_session_name
63
63
  output = call(*cmd, stdin: wrapped_script(script, session_name))
@@ -67,13 +67,13 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
67
67
  end
68
68
 
69
69
  def stop_remote_session(session_name, hostname)
70
- cmd = ssh_cmd(hostname)
70
+ cmd = ssh_cmd(hostname, ['/usr/bin/env', 'bash'])
71
71
 
72
72
  kill_cmd = <<~SCRIPT
73
73
  # Get the tmux pane PID for the target session
74
74
  pane_pid=$(tmux list-panes -aF '\#{session_name} \#{pane_pid}' | grep '#{session_name}' | cut -f 2 -d ' ')
75
75
  # Find the Singularity sinit PID child of the pane process
76
- pane_sinit_pid=$(pstree -p "$pane_pid" | grep -o 'sinit([[:digit:]]*' | grep -o '[[:digit:]]*')
76
+ pane_sinit_pid=$(pstree -p -l "$pane_pid" | grep -o 'sinit([[:digit:]]*' | grep -o '[[:digit:]]*')
77
77
  # Kill sinit which stops both Singularity-based processes and the tmux session
78
78
  kill "$pane_sinit_pid"
79
79
  SCRIPT
@@ -116,19 +116,23 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
116
116
  s.success? ? o : raise(Error, e)
117
117
  end
118
118
 
119
- # The SSH invocation to send a command
119
+ # The full command to ssh into the destination host and execute the command.
120
+ # SSH options include:
120
121
  # -t Force pseudo-terminal allocation (required to allow tmux to run)
121
122
  # -o BatchMode=yes (set mode to be non-interactive)
122
123
  # if ! strict_host_checking
123
124
  # -o UserKnownHostsFile=/dev/null (do not update the user's known hosts file)
124
125
  # -o StrictHostKeyChecking=no (do no check the user's known hosts file)
125
- def ssh_cmd(destination_host)
126
+ #
127
+ # @param destination_host [#to_s] the destination host you wish to ssh into
128
+ # @param cmd [Array<#to_s>] the command to be executed on the destination host
129
+ def ssh_cmd(destination_host, cmd)
126
130
  if strict_host_checking
127
131
  [
128
132
  'ssh', '-t',
129
133
  '-o', 'BatchMode=yes',
130
134
  "#{username}@#{destination_host}"
131
- ]
135
+ ].concat(cmd)
132
136
  else
133
137
  [
134
138
  'ssh', '-t',
@@ -136,7 +140,7 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
136
140
  '-o', 'UserKnownHostsFile=/dev/null',
137
141
  '-o', 'StrictHostKeyChecking=no',
138
142
  "#{username}@#{destination_host}"
139
- ]
143
+ ].concat(cmd)
140
144
  end
141
145
  end
142
146
 
@@ -245,7 +249,7 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
245
249
  ['#{session_name}', '#{session_created}', '#{pane_pid}'].join(UNIT_SEPARATOR)
246
250
  )
247
251
  keys = [:session_name, :session_created, :session_pid]
248
- cmd = ssh_cmd(destination_host) + ['tmux', 'list-panes', '-aF', format_str]
252
+ cmd = ssh_cmd(destination_host, ['tmux', 'list-panes', '-aF', format_str])
249
253
 
250
254
  call(*cmd).split(
251
255
  "\n"
@@ -1,4 +1,4 @@
1
1
  module OodCore
2
2
  # The current version of {OodCore}
3
- VERSION = "0.11.2"
3
+ VERSION = "0.11.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Franz
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-04-24 00:00:00.000000000 Z
13
+ date: 2020-05-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ood_support
@@ -215,7 +215,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.0.3
218
+ rubyforge_project:
219
+ rubygems_version: 2.7.6.2
219
220
  signing_key:
220
221
  specification_version: 4
221
222
  summary: Open OnDemand core library