ood_core 0.23.2 → 0.23.4

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: 9864509d310ba9c2fc6f896595f62e429be829107029a81e91251d10abfd16e7
4
- data.tar.gz: 3f71fbe1c5502068d39f2cba7971e5055a1a64818248df3dab486761357a3c4c
3
+ metadata.gz: aaa540da7d8afffa45674650d11ef7bf260e55ff44e32244950d233e1d4d145a
4
+ data.tar.gz: ff4e1fbe8c59309f36fc45c634cb27752d71e3e66e847496ab3678f556a90e8b
5
5
  SHA512:
6
- metadata.gz: 9ae243f303ccd6910a73009538e59c56a071b742f002182a14bc667006831e5993552bfc662363083db8144c34cd0f1310aff947d1db1f158c3c43f54a14be0f
7
- data.tar.gz: 61581da1191e92f68fadf2735bb05570be7297ee5e0769f20dafb2d6dceda8a5d644ab2b582fd117f2d028a0db9c45d2015e930aaa8b70420c82d5c1a3e81e06
6
+ metadata.gz: bc0fecb3a8eae6db9c5d6c40d62d4568f930fc197a153ec28a0942ec2d2bc8da0e488e6fe86d906ce03ca2ae53d911c43804623e7b185335281d23b1cef7af41
7
+ data.tar.gz: 56eae7c8a31c5f4b625b06b33b84def3d80a0652bd883f39f656a276c63e7224b88cb9ed801ef4482e62d1eeee6aeff366787414d21c52daf03cc4eb2265d83a
data/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.23.4] - 03-06-2023
11
+
12
+ ### Fixed
13
+
14
+ - [800](https://github.com/OSC/ood_core/pull/800) fixed some Fujitsu bugs.
15
+
16
+ ## [0.23.3] - 02-17-2023
17
+
18
+ ### Added
19
+
20
+ - ACLs now respond to `allowlist` and `blocklist` in [795](https://github.com/OSC/ood_core/pull/795).
21
+ - Sites can now use `OOD_SSH_PORT` to use a nonstandard port in [797](https://github.com/OSC/ood_core/pull/797).
22
+
10
23
  ## [0.23.2] - 02-02-2023
11
24
 
12
25
  ### Fixed
@@ -486,7 +499,9 @@ Functionally the same as [0.17.3] but with some CI updates.
486
499
  ### Added
487
500
  - Initial release!
488
501
 
489
- [Unreleased]: https://github.com/OSC/ood_core/compare/v0.23.2...HEAD
502
+ [Unreleased]: https://github.com/OSC/ood_core/compare/v0.23.4...HEAD
503
+ [0.23.4]: https://github.com/OSC/ood_core/compare/v0.23.4...v0.23.3
504
+ [0.23.3]: https://github.com/OSC/ood_core/compare/v0.23.3...v0.23.2
490
505
  [0.23.2]: https://github.com/OSC/ood_core/compare/v0.23.1...v0.23.2
491
506
  [0.23.1]: https://github.com/OSC/ood_core/compare/v0.23.0...v0.23.1
492
507
  [0.23.0]: https://github.com/OSC/ood_core/compare/v0.22.0...v0.23.0
@@ -8,20 +8,21 @@ module OodCore
8
8
  # Build the group acl adapter from a configuration
9
9
  # @param config [#to_h] the configuration for an acl adapter
10
10
  # @option config [Array<#to_s>] :groups The list of groups
11
- # @option config [#to_s] :type ('whitelist') The type of ACL ('whitelist' or 'blacklist')
11
+ # @option config [#to_s] :type ('allowlist') The type of ACL ('allowlist' or 'blocklist')
12
12
  def self.build_group(config)
13
13
  c = config.to_h.symbolize_keys
14
14
 
15
15
  groups = c.fetch(:groups) { raise ArgumentError, "No groups specified. Missing argument: groups" }.map(&:to_s)
16
16
  acl = OodSupport::ACL.new(entries: groups.map { |g| OodSupport::ACLEntry.new principle: g })
17
17
 
18
- type = c.fetch(:type, "whitelist").to_s
19
- if type == "whitelist"
18
+ type = c.fetch(:type, 'allowlist').to_s
19
+ case type
20
+ when 'allowlist', 'whitelist'
20
21
  allow = true
21
- elsif type == "blacklist"
22
+ when 'blocklist', 'blacklist'
22
23
  allow = false
23
24
  else
24
- raise ArgumentError, "Invalid type specified. Valid types: whitelist, blacklist"
25
+ raise ArgumentError, 'Invalid type specified. Valid types: allowlist, blocklist'
25
26
  end
26
27
 
27
28
  Adapters::Group.new(acl: acl, allow: allow)
@@ -90,7 +90,7 @@ module OodCore
90
90
  {
91
91
  adapter: "group",
92
92
  groups: h["data"]["groups"],
93
- type: h["data"]["allow"] ? "whitelist" : "blacklist"
93
+ type: h["data"]["allow"] ? 'allowlist' : 'blocklist'
94
94
  }
95
95
  end
96
96
  end
@@ -221,10 +221,12 @@ module OodCore
221
221
  else
222
222
  args.concat ["-e", script.error_path]
223
223
  end
224
- args.concat ["--rscgrp", script.queue_name] unless script.queue_name.nil?
224
+ args.concat ["-L rscgrp=" + script.queue_name] unless script.queue_name.nil?
225
225
  args.concat ["-p", script.priority] unless script.priority.nil?
226
- args.concat ["--at", script.start_time.localtime.strftime("%C%y-%m-%dT%H:%M:%S")] unless script.start_time.nil?
227
- args.concat ["-L \"elapse=" + seconds_to_duration(script.wall_time) + "\""] unless script.wall_time.nil?
226
+
227
+ # start_time: <%= Time.local(2023,11,22,13,4).to_i %> in form.yml.erb
228
+ args.concat ["--at", script.start_time.localtime.strftime("%C%y%m%d%H%M")] unless script.start_time.nil?
229
+ args.concat ["-L elapse=" + seconds_to_duration(script.wall_time)] unless script.wall_time.nil?
228
230
  args.concat ["--bulk", "--sparam", script.job_array_request] unless script.job_array_request.nil?
229
231
 
230
232
  # Set environment variables
@@ -26,11 +26,20 @@ module OodCore
26
26
  return cmd, cmd_args if submit_host.to_s.empty?
27
27
 
28
28
  check_host = strict_host_checking ? "yes" : "no"
29
- args = ['-o', 'BatchMode=yes', '-o', 'UserKnownHostsFile=/dev/null', '-o', "StrictHostKeyChecking=#{check_host}", "#{submit_host}"]
29
+
30
+ # Have to OodCore::Job::Adapters::Helper.ssh_port instead of self.ssh_port due to test failure
31
+ args = ['-p', OodCore::Job::Adapters::Helper.ssh_port, '-o', 'BatchMode=yes', '-o', 'UserKnownHostsFile=/dev/null', '-o', "StrictHostKeyChecking=#{check_host}", "#{submit_host}"]
30
32
  env.each{|key, value| args.push("export #{key}=#{value};")}
31
33
 
32
34
  return 'ssh', args + [cmd] + cmd_args
33
35
  end
36
+
37
+ # Allows for Non-Standard Port usage in ssh commands
38
+ # To set ENV["OOD_SSH_PORT"], add assignment in /etc/ood/config/nginx_stage.yml
39
+ def self.ssh_port
40
+ return ENV["OOD_SSH_PORT"].nil? ? "22" : "#{ENV['OOD_SSH_PORT'].to_i.to_s}"
41
+ end
42
+
34
43
  end
35
44
  end
36
45
  end
@@ -58,7 +58,6 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
58
58
  # @param script [OodCore::Job::Script] The script object defining the work
59
59
  def start_remote_session(script)
60
60
  cmd = ssh_cmd(submit_host(script), ['/usr/bin/env', 'bash'])
61
-
62
61
  session_name = unique_session_name
63
62
  output = call(*cmd, stdin: wrapped_script(script, session_name))
64
63
  hostname = parse_hostname(output)
@@ -122,15 +121,18 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
122
121
  # @param destination_host [#to_s] the destination host you wish to ssh into
123
122
  # @param cmd [Array<#to_s>] the command to be executed on the destination host
124
123
  def ssh_cmd(destination_host, cmd)
124
+
125
125
  if strict_host_checking
126
126
  [
127
127
  'ssh', '-t',
128
+ '-p', OodCore::Job::Adapters::Helper.ssh_port,
128
129
  '-o', 'BatchMode=yes',
129
130
  "#{username}@#{destination_host}"
130
131
  ].concat(cmd)
131
132
  else
132
133
  [
133
134
  'ssh', '-t',
135
+ '-p', OodCore::Job::Adapters::Helper.ssh_port,
134
136
  '-o', 'BatchMode=yes',
135
137
  '-o', 'UserKnownHostsFile=/dev/null',
136
138
  '-o', 'StrictHostKeyChecking=no',
@@ -291,4 +293,5 @@ class OodCore::Job::Adapters::LinuxHost::Launcher
291
293
  line.match(/^(([\w+]|[a-zA-Z0-9][\w*-]*\.))*$/)
292
294
  end.compact.last.to_s
293
295
  end
296
+
294
297
  end
@@ -104,12 +104,14 @@ class OodCore::Job::Adapters::LinuxSystemd::Launcher
104
104
  if strict_host_checking
105
105
  [
106
106
  'ssh', '-t',
107
+ '-p', OodCore::Job::Adapters::Helper.ssh_port,
107
108
  '-o', 'BatchMode=yes',
108
109
  "#{username}@#{destination_host}"
109
110
  ].concat(cmd)
110
111
  else
111
112
  [
112
113
  'ssh', '-t',
114
+ '-p', OodCore::Job::Adapters::Helper.ssh_port,
113
115
  '-o', 'BatchMode=yes',
114
116
  '-o', 'UserKnownHostsFile=/dev/null',
115
117
  '-o', 'StrictHostKeyChecking=no',
@@ -1,4 +1,4 @@
1
1
  module OodCore
2
2
  # The current version of {OodCore}
3
- VERSION = "0.23.2"
3
+ VERSION = "0.23.4"
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.23.2
4
+ version: 0.23.4
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: 2023-02-02 00:00:00.000000000 Z
13
+ date: 2023-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ood_support