ood_core 0.5.1 → 0.6.0

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: 4b61e4bf73722fcbd1addb34112df942ac672909
4
- data.tar.gz: bb8d8358be3565e2e9b304729936a69df5995e9d
3
+ metadata.gz: b683439945311b9ec37061a7b52e318fce62c1b8
4
+ data.tar.gz: 84fed35c58484b25c42031c90e2ba00941ff23b9
5
5
  SHA512:
6
- metadata.gz: bde820e45c4b5fd535eac02b76a3b736ca5f5dd912f93d732d7e659062c7416cc6c17833b20175be0ee92118ff99ef7f2ed29e14f7412c29c55b1431078540e5
7
- data.tar.gz: bf23a4ac0338c9b63d9909ca2524d2fa896d7a3f23e7b4b3cfa1826a8e7eb2ec6423cba1f9a3b8b50c88f004368a46ec31784c6a9fc1c6c7be5f80b15df03a42
6
+ metadata.gz: 21a3e7219b482d0174afabbd5d9c56a966efcf30525e8cba7dafd0703aa39596df0c80cab3c81c23dd38d754390c897115f5db70da19df7e408eac1a05c699eb
7
+ data.tar.gz: 7e3dc186e839286882fbf2e74e93ad00cf58c2036fc077b2e30c4df797f54962042bdeeea881649242dfaf179ee5252e7c1e6b165ee35a518e9b98b81bf2c531
data/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ 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.6.0] - 2018-12-19
10
+ ### Added
11
+ - Added ability to override the default password length
12
+ - Merge the pbs-ruby gem removing that as a dependency, but adding FFI
13
+ - Added support for overriding resource manager client executables using `bin_overrides` in the cluster configs
14
+ - Add support for the Grid Engine resource manager (tested on GE 6.2u5 and UGE 8.0.1)
15
+
16
+ ### Fixed
17
+ - Fixed a bug in password creation where certain locales resulted in invalid passwords [#91](https://github.com/OSC/ood_core/issues/91)
9
18
 
10
19
  ## [0.5.1] - 2018-05-14
11
20
  ### Fixed
@@ -130,7 +139,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
130
139
  ### Added
131
140
  - Initial release!
132
141
 
133
- [Unreleased]: https://github.com/OSC/ood_core/compare/v0.5.1...HEAD
142
+ [Unreleased]: https://github.com/OSC/ood_core/compare/v0.6.0...HEAD
143
+ [0.6.0]: https://github.com/OSC/ood_core/compare/v0.5.1...v0.6.0
134
144
  [0.5.1]: https://github.com/OSC/ood_core/compare/v0.5.0...v0.5.1
135
145
  [0.5.0]: https://github.com/OSC/ood_core/compare/v0.4.0...v0.5.0
136
146
  [0.4.0]: https://github.com/OSC/ood_core/compare/v0.3.0...v0.4.0
@@ -24,7 +24,7 @@ module OodCore
24
24
  # for available port
25
25
  # @option context [#to_i] :max_port (65535) Maximum port used when
26
26
  # looking for available port
27
- # @option context [#to_i] :passwd_size (32) Length of randomly generated
27
+ # @option context [#to_i] :password_size (32) Length of randomly generated
28
28
  # password
29
29
  # @option context [#to_s] :header ("") Shell code prepended at the top of
30
30
  # the script body
@@ -68,6 +68,19 @@ module OodCore
68
68
  EOT
69
69
  end
70
70
 
71
+ protected
72
+ def password_size
73
+ context.fetch(:password_size, 8).to_i
74
+ end
75
+
76
+ def min_port
77
+ context.fetch(:min_port, 2000).to_i
78
+ end
79
+
80
+ def max_port
81
+ context.fetch(:max_port, 65535).to_i
82
+ end
83
+
71
84
  private
72
85
  # Working directory that batch script runs in
73
86
  def work_dir
@@ -93,9 +106,7 @@ module OodCore
93
106
  # Helper methods used in the bash scripts
94
107
  def bash_helpers
95
108
  context.fetch(:bash_helpers) do
96
- min_port = context.fetch(:min_port, 2000).to_i
97
- max_port = context.fetch(:max_port, 65535).to_i
98
- passwd_size = context.fetch(:passwd_size, 32).to_i
109
+
99
110
 
100
111
  <<-EOT.gsub(/^ {14}/, '')
101
112
  # Source in all the helper functions
@@ -141,9 +152,9 @@ module OodCore
141
152
  }
142
153
  export -f wait_until_port_used
143
154
 
144
- # Generate random alphanumeric password with $1 (default: #{passwd_size}) characters
155
+ # Generate random alphanumeric password with $1 (default: #{password_size}) characters
145
156
  create_passwd () {
146
- tr -cd '[:alnum:]' < /dev/urandom 2> /dev/null | head -c${1:-#{passwd_size}}
157
+ tr -cd 'a-zA-Z0-9' < /dev/urandom 2> /dev/null | head -c${1:-#{password_size}}
147
158
  }
148
159
  export -f create_passwd
149
160
  }
@@ -71,8 +71,8 @@ module OodCore
71
71
  # Setup one-time use passwords and initialize the VNC password
72
72
  function change_passwd () {
73
73
  echo "Setting VNC password..."
74
- password=$(create_passwd 8)
75
- spassword=${spassword:-$(create_passwd 8)}
74
+ password=$(create_passwd "#{password_size}")
75
+ spassword=${spassword:-$(create_passwd "#{password_size}")}
76
76
  (
77
77
  umask 077
78
78
  echo -ne "${password}\\n${spassword}" | vncpasswd -f > "#{vnc_passwd}"