hybrid_platforms_conductor 32.16.3 → 32.16.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/hybrid_platforms_conductor/deployer.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +3 -3
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/check_deploy_and_idempotence.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_removes_root_access.rb +1 -1
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connections_spec.rb +3 -3
- data/spec/hybrid_platforms_conductor_test/api/deployer/provisioner_spec.rb +4 -4
- data/spec/hybrid_platforms_conductor_test/helpers/connector_ssh_helpers.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d7b0039bca37d75c4f4893286370ca04ab72861b2c219b8199531dab80464fc
|
4
|
+
data.tar.gz: 4189e8181aad10e14ba60d325572ae85932718ff8d21506ad3374e07272b43f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38bc2f04b0f5c165ad61a3f402a9312b9d7bb596e7c828e19090e9f292c0fde28f6b4d00043e28d0bf840d4c842446d4899197fd379c43fa86bc1a461a5d1adc
|
7
|
+
data.tar.gz: c2188e0919f5c943905ff7384ab67c242169cd4182cdc61356b1be2c8bb7cc93a9e4fc88a9426fd2cb7a95b16ba9d477fbf253166ec8aa4a716f42fdd1e3e32b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [v32.16.4](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.3...v32.16.4) (2021-06-01 13:25:19)
|
2
|
+
|
3
|
+
### Patches
|
4
|
+
|
5
|
+
* [[Hotfix] Fixed boolean values incorrectly used as strings](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/a107f3e0fe4c1512ce7607a303fdf0753d92ddac)
|
6
|
+
|
1
7
|
# [v32.16.3](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.2...v32.16.3) (2021-06-01 11:19:50)
|
2
8
|
|
3
9
|
## Global changes
|
@@ -319,7 +319,7 @@ module HybridPlatformsConductor
|
|
319
319
|
)
|
320
320
|
instance.with_running_instance(stop_on_exit: true, destroy_on_exit: !reuse_instance, port: 22) do
|
321
321
|
# Test-provisioned nodes have SSH Session Exec capabilities and are not local
|
322
|
-
sub_executable.nodes_handler.override_metadata_of node, :ssh_session_exec,
|
322
|
+
sub_executable.nodes_handler.override_metadata_of node, :ssh_session_exec, true
|
323
323
|
sub_executable.nodes_handler.override_metadata_of node, :local_node, false
|
324
324
|
# Test-provisioned nodes use default sudo
|
325
325
|
sub_executable.config.sudo_procs.replace(sub_executable.config.sudo_procs.map do |sudo_proc_info|
|
@@ -238,7 +238,7 @@ module HybridPlatformsConductor
|
|
238
238
|
# * *bash_cmds* (String): Bash commands to execute
|
239
239
|
def remote_bash(bash_cmds)
|
240
240
|
ssh_cmd =
|
241
|
-
if @nodes_handler.get_ssh_session_exec_of(@node) ==
|
241
|
+
if @nodes_handler.get_ssh_session_exec_of(@node) == false
|
242
242
|
# When ExecSession is disabled we need to use stdin directly
|
243
243
|
"{ cat | #{ssh_exec} #{ssh_url} -T; } <<'HPC_EOF'\n#{bash_cmds}\nHPC_EOF"
|
244
244
|
else
|
@@ -300,7 +300,7 @@ module HybridPlatformsConductor
|
|
300
300
|
# * *owner* (String or nil): Owner to be used when copying the files, or nil for current one [default: nil]
|
301
301
|
# * *group* (String or nil): Group to be used when copying the files, or nil for current one [default: nil]
|
302
302
|
def remote_copy(from, to, sudo: false, owner: nil, group: nil)
|
303
|
-
if @nodes_handler.get_ssh_session_exec_of(@node) ==
|
303
|
+
if @nodes_handler.get_ssh_session_exec_of(@node) == false
|
304
304
|
# We don't have ExecSession, so don't use ssh, but scp instead.
|
305
305
|
if sudo
|
306
306
|
# We need to first copy the file in an accessible directory, and then sudo mv
|
@@ -513,7 +513,7 @@ module HybridPlatformsConductor
|
|
513
513
|
if current_users.empty?
|
514
514
|
log_debug "[ ControlMaster - #{ssh_url} ] - Creating SSH ControlMaster..."
|
515
515
|
exit_status = nil
|
516
|
-
if @nodes_handler.get_ssh_session_exec_of(node) ==
|
516
|
+
if @nodes_handler.get_ssh_session_exec_of(node) == false
|
517
517
|
# Here we have to create a ControlMaster using an interactive session, as the SSH server prohibits ExecSession, and so command executions.
|
518
518
|
# We'll do that using another terminal spawned in the background.
|
519
519
|
if ENV['hpc_interactive'] == 'false'
|
@@ -54,7 +54,7 @@ module HybridPlatformsConductor
|
|
54
54
|
instance.stop
|
55
55
|
instance.with_running_instance(port: 22) do
|
56
56
|
|
57
|
-
unless @nodes_handler.get_root_access_allowed_of(@node)
|
57
|
+
unless @nodes_handler.get_root_access_allowed_of(@node)
|
58
58
|
# ===== Deploy removes root access
|
59
59
|
# Check that we can't connect with root
|
60
60
|
ssh_ok = false
|
@@ -12,7 +12,7 @@ module HybridPlatformsConductor
|
|
12
12
|
|
13
13
|
# Check my_test_plugin.rb.sample documentation for signature details.
|
14
14
|
def test_for_node
|
15
|
-
unless @nodes_handler.get_root_access_allowed_of(@node)
|
15
|
+
unless @nodes_handler.get_root_access_allowed_of(@node)
|
16
16
|
@deployer.with_test_provisioned_instance(@config.tests_provisioner_id, @node, environment: 'deploy_removes_root_access', reuse_instance: log_debug?) do |deployer, instance|
|
17
17
|
# Check that we can connect with root
|
18
18
|
ssh_ok = false
|
data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connections_spec.rb
CHANGED
@@ -29,7 +29,7 @@ describe HybridPlatformsConductor::ActionsExecutor do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'creates an SSH master to 1 node not having Session Exec capabilities' do
|
32
|
-
with_test_platform(nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec:
|
32
|
+
with_test_platform(nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec: false } } }) do
|
33
33
|
with_cmd_runner_mocked(
|
34
34
|
[
|
35
35
|
['which env', proc { [0, "/usr/bin/env\n", ''] }],
|
@@ -45,7 +45,7 @@ describe HybridPlatformsConductor::ActionsExecutor do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'can\'t create an SSH master to 1 node not having Session Exec capabilities when hpc_interactive is false' do
|
48
|
-
with_test_platform(nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec:
|
48
|
+
with_test_platform(nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec: false } } }) do
|
49
49
|
ENV['hpc_interactive'] = 'false'
|
50
50
|
with_cmd_runner_mocked(
|
51
51
|
[
|
@@ -69,7 +69,7 @@ describe HybridPlatformsConductor::ActionsExecutor do
|
|
69
69
|
it 'fails without creating exception when creating an SSH master to 1 node not having Session Exec capabilities when hpc_interactive is false and we use no_exception' do
|
70
70
|
with_test_platform(nodes: {
|
71
71
|
'node1' => { meta: { host_ip: '192.168.42.1' } },
|
72
|
-
'node2' => { meta: { host_ip: '192.168.42.2', ssh_session_exec:
|
72
|
+
'node2' => { meta: { host_ip: '192.168.42.2', ssh_session_exec: false } },
|
73
73
|
'node3' => { meta: { host_ip: '192.168.42.3' } }
|
74
74
|
}) do
|
75
75
|
ENV['hpc_interactive'] = 'false'
|
@@ -54,8 +54,8 @@ describe HybridPlatformsConductor::Deployer do
|
|
54
54
|
with_test_platform(
|
55
55
|
{
|
56
56
|
nodes: {
|
57
|
-
'node1' => { meta: { host_ip: '192.168.42.1', ssh_session_exec:
|
58
|
-
'node2' => { meta: { host_ip: '192.168.42.2', ssh_session_exec:
|
57
|
+
'node1' => { meta: { host_ip: '192.168.42.1', ssh_session_exec: false } },
|
58
|
+
'node2' => { meta: { host_ip: '192.168.42.2', ssh_session_exec: false } }
|
59
59
|
}
|
60
60
|
},
|
61
61
|
false,
|
@@ -75,8 +75,8 @@ describe HybridPlatformsConductor::Deployer do
|
|
75
75
|
block.call
|
76
76
|
end
|
77
77
|
test_deployer.with_test_provisioned_instance(:test_provisioner, 'node1', environment: 'hpc_testing_provisioner') do |sub_test_deployer, test_instance|
|
78
|
-
expect(sub_test_deployer.instance_eval { @nodes_handler.get_ssh_session_exec_of('node1') }).to eq
|
79
|
-
expect(sub_test_deployer.instance_eval { @nodes_handler.get_ssh_session_exec_of('node2') }).to eq
|
78
|
+
expect(sub_test_deployer.instance_eval { @nodes_handler.get_ssh_session_exec_of('node1') }).to eq true
|
79
|
+
expect(sub_test_deployer.instance_eval { @nodes_handler.get_ssh_session_exec_of('node2') }).to eq false
|
80
80
|
ssh_transforms = test_instance.instance_eval { @config.ssh_connection_transforms }
|
81
81
|
expect(ssh_transforms.size).to eq 1
|
82
82
|
expect(ssh_transforms[0][:nodes_selectors_stack]).to eq [%w[node2]]
|
@@ -136,7 +136,7 @@ module HybridPlatformsConductorTest
|
|
136
136
|
session_exec: true
|
137
137
|
)
|
138
138
|
with_test_platform(
|
139
|
-
{ nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec: session_exec
|
139
|
+
{ nodes: { 'node' => { meta: { host_ip: '192.168.42.42', ssh_session_exec: session_exec } } } },
|
140
140
|
false,
|
141
141
|
additional_config
|
142
142
|
) do
|