hybrid_platforms_conductor 32.17.0 → 32.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/docs/plugins/connector/ssh.md +1 -1
  4. data/docs/plugins/test/check_deploy_and_idempotence.md +1 -1
  5. data/docs/plugins/test/connection.md +1 -0
  6. data/docs/plugins/test/deploy_removes_root_access.md +1 -1
  7. data/docs/plugins/test/file_system.md +1 -0
  8. data/docs/plugins/test/hostname.md +1 -0
  9. data/docs/plugins/test/ip.md +1 -0
  10. data/docs/plugins/test/local_users.md +1 -0
  11. data/docs/plugins/test/mounts.md +1 -0
  12. data/docs/plugins/test/orphan_files.md +1 -0
  13. data/docs/plugins/test/ports.md +1 -0
  14. data/docs/plugins/test/spectre.md +1 -0
  15. data/docs/plugins/test/vulnerabilities.md +1 -0
  16. data/lib/hybrid_platforms_conductor/hpc_plugins/test/connection.rb +3 -1
  17. data/lib/hybrid_platforms_conductor/hpc_plugins/test/file_system.rb +2 -1
  18. data/lib/hybrid_platforms_conductor/hpc_plugins/test/hostname.rb +3 -1
  19. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ip.rb +3 -1
  20. data/lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb +3 -1
  21. data/lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb +3 -1
  22. data/lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb +3 -1
  23. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ports.rb +3 -1
  24. data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre.rb +3 -1
  25. data/lib/hybrid_platforms_conductor/hpc_plugins/test/vulnerabilities.rb +2 -1
  26. data/lib/hybrid_platforms_conductor/test_only_remote_node.rb +18 -0
  27. data/lib/hybrid_platforms_conductor/version.rb +1 -1
  28. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f67bfa1f30b7c9dd212e403b33adf88b7955e8c8d5202cdb7d2ef4f9e35e87e5
4
- data.tar.gz: e7f7da0c313fdfb841cacd570e030f678343f3a2fb7b3b31daa653c25318efa5
3
+ metadata.gz: 8d66286a0b94c89bde4c7557a1b707158095363ccb854e3af5bdf951fe9065ee
4
+ data.tar.gz: fa1976b8f50dd96a1717ec596540f3ae0cbb35c3b0d44b55e46e53f40e8a460d
5
5
  SHA512:
6
- metadata.gz: 12f526fc089214b09e21220d0a6bcf55083ee3c8b5dff2f23f3764a453de10c6b5a1f0695dc8b567888f903b0130180f56095bb5dff7f44c664dd57b272feabd
7
- data.tar.gz: 86d6663b9af0159a551eae58c5803dc63099d8119472d137cb0d46ebee25156fd06e92f95dc6ef8fce948f3081cb0c9c3e015ae27dee781ba1d4e4aafa71f3e1
6
+ metadata.gz: 2f2e172771aa4925c790d2faa57aaeca5da59914806787f8b19774af9a58ffb3e76766b66997e55a97602e05eeb7395f04c1f866c7a0acb17656adb87fdab8a2
7
+ data.tar.gz: f61b8ede205e1cbbb863b2261fb7f8ad01d57b3cc319eec1fada0dcbcb99ce14384a5d74bbfaf86ef0aa5e3c0fbd5568933bf5ddf0c99e7deaa5e3db900e7e28
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v32.17.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.17.0...v32.17.1) (2021-06-03 16:20:09)
2
+
3
+ ### Patches
4
+
5
+ * [[Hotfix] Don't run remote nodes tests on local nodes](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/fe8e34a4d74f21d4903c14b1e156b9730f4b5fee)
6
+
1
7
  # [v32.17.0](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.4...v32.17.0) (2021-06-02 12:57:44)
2
8
 
3
9
  ## Global changes
@@ -70,7 +70,7 @@ end
70
70
  | `host_keys` | `Array<String>` | The node's host keys used to generate a `known_hosts` file with those to avoid user confirmations when connecting. |
71
71
  | `hostname` | `String` | Host name used to connect in case no IP address can be found in metadata. |
72
72
  | `private_ips` | `Array<String>` | IP list to connect in case `host_ip` is not defined in metadata. |
73
- | `ssh_session_exec` | `String` | If set to the string `false`, then consider that the node does not have any SSH SessionExec capabilities. This will make sure that remote command executions is done using stdin piping on interactive sessions instead of SSH commands execution. |
73
+ | `ssh_session_exec` | `Boolean` | If set to `false`, then consider that the node does not have any SSH SessionExec capabilities. This will make sure that remote command executions is done using stdin piping on interactive sessions instead of SSH commands execution. |
74
74
 
75
75
  ## Used environment variables
76
76
 
@@ -49,7 +49,7 @@ end
49
49
 
50
50
  | Metadata | Type | Usage
51
51
  | --- | --- | --- |
52
- | `root_access_allowed` | `String` | If set to `true`, then skip the test for `root` access being disabled after deployment |
52
+ | `root_access_allowed` | `Boolean` | If set to `true`, then skip the test for `root` access being disabled after deployment |
53
53
 
54
54
  ## Used environment variables
55
55
 
@@ -16,6 +16,7 @@ None
16
16
 
17
17
  | Metadata | Type | Usage
18
18
  | --- | --- | --- |
19
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
19
20
 
20
21
  ## Used environment variables
21
22
 
@@ -17,7 +17,7 @@ None
17
17
 
18
18
  | Metadata | Type | Usage
19
19
  | --- | --- | --- |
20
- | `root_access_allowed` | `String` | If set to `true`, then skip this test |
20
+ | `root_access_allowed` | `Boolean` | If set to `true`, then skip this test |
21
21
 
22
22
  ## Used environment variables
23
23
 
@@ -38,6 +38,7 @@ end
38
38
 
39
39
  | Metadata | Type | Usage
40
40
  | --- | --- | --- |
41
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
41
42
 
42
43
  ## Used environment variables
43
44
 
@@ -16,6 +16,7 @@ None
16
16
 
17
17
  | Metadata | Type | Usage
18
18
  | --- | --- | --- |
19
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
19
20
 
20
21
  ## Used environment variables
21
22
 
@@ -16,6 +16,7 @@ None
16
16
 
17
17
  | Metadata | Type | Usage
18
18
  | --- | --- | --- |
19
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
19
20
  | `private_ips` | `Array<String>` | List of possible private IPs the node should have |
20
21
 
21
22
  ## Used environment variables
@@ -37,6 +37,7 @@ check_local_users_do_not_exist %w[olduser1 olduser2]
37
37
 
38
38
  | Metadata | Type | Usage
39
39
  | --- | --- | --- |
40
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
40
41
 
41
42
  ## Used environment variables
42
43
 
@@ -44,6 +44,7 @@ end
44
44
 
45
45
  | Metadata | Type | Usage
46
46
  | --- | --- | --- |
47
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
47
48
 
48
49
  ## Used environment variables
49
50
 
@@ -27,6 +27,7 @@ end
27
27
 
28
28
  | Metadata | Type | Usage
29
29
  | --- | --- | --- |
30
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
30
31
 
31
32
  ## Used environment variables
32
33
 
@@ -39,6 +39,7 @@ check_closed_ports 25, 110
39
39
  | Metadata | Type | Usage
40
40
  | --- | --- | --- |
41
41
  | `host_ip` | `String` | Host IP address to be tested for port listening |
42
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
42
43
 
43
44
  ## Used environment variables
44
45
 
@@ -15,6 +15,7 @@ None
15
15
 
16
16
  | Metadata | Type | Usage
17
17
  | --- | --- | --- |
18
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
18
19
 
19
20
  ## Used environment variables
20
21
 
@@ -54,6 +54,7 @@ None
54
54
  | Metadata | Type | Usage
55
55
  | --- | --- | --- |
56
56
  | `image` | `String` | The name of the OS image to be used. The [configuration](../../config_dsl.md) should define the image and point it to a directory containing a `oval.json` that will contain definition of OVAL files to be checked for this OS(see above). |
57
+ | `local_node` | `Boolean` | Skip this test for nodes having this metadata set to `true` |
57
58
 
58
59
  ## Used environment variables
59
60
 
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the connection works by simply outputing something
8
- class Connection < HybridPlatformsConductor::Test
10
+ class Connection < TestOnlyRemoteNode
9
11
 
10
12
  TEST_CONNECTION_STRING = 'Test connection - ok'
11
13
 
@@ -1,3 +1,4 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
1
2
  require 'hybrid_platforms_conductor/common_config_dsl/file_system_tests'
2
3
 
3
4
  module HybridPlatformsConductor
@@ -7,7 +8,7 @@ module HybridPlatformsConductor
7
8
  module Test
8
9
 
9
10
  # Perform various tests on a node's file system
10
- class FileSystem < HybridPlatformsConductor::Test
11
+ class FileSystem < TestOnlyRemoteNode
11
12
 
12
13
  self.extend_config_dsl_with CommonConfigDsl::FileSystemTests, :init_file_system_tests
13
14
 
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the hostname is correct
8
- class Hostname < HybridPlatformsConductor::Test
10
+ class Hostname < TestOnlyRemoteNode
9
11
 
10
12
  # Check my_test_plugin.rb.sample documentation for signature details.
11
13
  def test_on_node
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the private IP address is correct
8
- class Ip < HybridPlatformsConductor::Test
10
+ class Ip < TestOnlyRemoteNode
9
11
 
10
12
  # Check my_test_plugin.rb.sample documentation for signature details.
11
13
  def test_on_node
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the node's local users
8
- class LocalUsers < HybridPlatformsConductor::Test
10
+ class LocalUsers < TestOnlyRemoteNode
9
11
 
10
12
  # Config DSL extension for this test plugin
11
13
  module ConfigDslExtension
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Various tests on mounts
8
- class Mounts < HybridPlatformsConductor::Test
10
+ class Mounts < TestOnlyRemoteNode
9
11
 
10
12
  # Config DSL extension for this test plugin
11
13
  module ConfigDslExtension
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the node has no orphan files
8
- class OrphanFiles < HybridPlatformsConductor::Test
10
+ class OrphanFiles < TestOnlyRemoteNode
9
11
 
10
12
  # Config DSL extension for this test plugin
11
13
  module ConfigDslExtension
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Various tests on ports
8
- class Ports < HybridPlatformsConductor::Test
10
+ class Ports < TestOnlyRemoteNode
9
11
 
10
12
  # Config DSL extension for this test plugin
11
13
  module ConfigDslExtension
@@ -1,3 +1,5 @@
1
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
+
1
3
  module HybridPlatformsConductor
2
4
 
3
5
  module HpcPlugins
@@ -5,7 +7,7 @@ module HybridPlatformsConductor
5
7
  module Test
6
8
 
7
9
  # Test that the vulnerabilities Spectre and Meltdown are patched
8
- class Spectre < HybridPlatformsConductor::Test
10
+ class Spectre < TestOnlyRemoteNode
9
11
 
10
12
  VULNERABILITIES_TO_CHECK = {
11
13
  'CVE-2017-5753' => 'Spectre Variant 1',
@@ -1,4 +1,5 @@
1
1
  require 'nokogiri'
2
+ require 'hybrid_platforms_conductor/test_only_remote_node'
2
3
 
3
4
  module HybridPlatformsConductor
4
5
 
@@ -17,7 +18,7 @@ module HybridPlatformsConductor
17
18
  # Each final OVAL URL can be directly an XML file, either raw or compressed with .gz or .bz2.
18
19
  # This is useful to follow repository links, such as jFrog or web servers serving common file systems structure storing several versions of the OVAL file.
19
20
  # * *reported_severities* (Array<String> or nil): List of severities to report, if any (use Unknown when the severity is not known), or nil for all [default: nil]
20
- class Vulnerabilities < HybridPlatformsConductor::Test
21
+ class Vulnerabilities < TestOnlyRemoteNode
21
22
 
22
23
  # Known compression methods, per file extension, and their corresponding uncompress bash script
23
24
  KNOWN_COMPRESSIONS = {
@@ -0,0 +1,18 @@
1
+ module HybridPlatformsConductor
2
+
3
+ # Ancestor for all tests that should be run just on remote nodes
4
+ class TestOnlyRemoteNode < Test
5
+
6
+ # Limit the list of nodes for these tests.
7
+ #
8
+ # Result::
9
+ # * Array<String or Regex> or nil: List of nodes allowed for this test, or nil for all. Regular expressions matching node names can also be used.
10
+ def self.only_on_nodes
11
+ # Just 1 node per service and platform
12
+ Test.nodes_handler.prefetch_metadata_of Test.nodes_handler.known_nodes, :local_node
13
+ Test.nodes_handler.known_nodes.select { |node| !Test.nodes_handler.get_local_node_of(node) }
14
+ end
15
+
16
+ end
17
+
18
+ end
@@ -1,5 +1,5 @@
1
1
  module HybridPlatformsConductor
2
2
 
3
- VERSION = '32.17.0'
3
+ VERSION = '32.17.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybrid_platforms_conductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 32.17.0
4
+ version: 32.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-02 00:00:00.000000000 Z
11
+ date: 2021-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: range_operators
@@ -747,6 +747,7 @@ files:
747
747
  - lib/hybrid_platforms_conductor/services_handler.rb
748
748
  - lib/hybrid_platforms_conductor/test.rb
749
749
  - lib/hybrid_platforms_conductor/test_by_service.rb
750
+ - lib/hybrid_platforms_conductor/test_only_remote_node.rb
750
751
  - lib/hybrid_platforms_conductor/test_report.rb
751
752
  - lib/hybrid_platforms_conductor/tests_runner.rb
752
753
  - lib/hybrid_platforms_conductor/thycotic.rb