smart_proxy_discovery_image 1.2.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63fcad0e9bd9c8a39569890351e410f31a18067de5047df0c8fa8417af589fe7
|
|
4
|
+
data.tar.gz: 6d543be76718df30385823f19e9b9ba6c53ded883974f7a65f9e620ca9d2e9d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8dcb2bedf37a4e212751dbd6183208b03aff8e88dca2bebbccd008e36efa03bbb79ab6daa4ef42eabe2934fdd15e49b58eeee67ccde7197b1a842373b5007d9
|
|
7
|
+
data.tar.gz: 7d2cb6faa3d9cb6f01e0bb5e6cef224dd7c14ebe2dca84a9783999622c04d78b09592d3caf5c2655cc9d378823c3a2f5a6b2fe141dff70f9493af8318a265ac7
|
|
@@ -7,8 +7,9 @@ module Proxy::DiscoveryImage
|
|
|
7
7
|
include Proxy::Util
|
|
8
8
|
|
|
9
9
|
put "/reboot" do
|
|
10
|
-
log_halt(500, "
|
|
11
|
-
|
|
10
|
+
log_halt(500, "reboot binary was not found") unless (reboot = which('reboot'))
|
|
11
|
+
# --force must be used to avoid transitioning back from systemd to initramdisk
|
|
12
|
+
run_after_response 2, reboot, "-f"
|
|
12
13
|
content_type :json
|
|
13
14
|
{ :result => true }.to_json
|
|
14
15
|
end
|
|
@@ -17,6 +18,8 @@ module Proxy::DiscoveryImage
|
|
|
17
18
|
body_data = request.body.read
|
|
18
19
|
# change virtual terminal out of newt screen
|
|
19
20
|
system("chvt", "2")
|
|
21
|
+
is_secureboot = system('mokutil --sb-state|grep enabled')
|
|
22
|
+
logger.debug "Secure boot is #{is_secureboot}"
|
|
20
23
|
logger.debug "Initiated kexec provisioning with #{body_data}"
|
|
21
24
|
log_halt(500, "kexec binary was not found") unless (kexec = which('kexec'))
|
|
22
25
|
begin
|
|
@@ -24,7 +27,18 @@ module Proxy::DiscoveryImage
|
|
|
24
27
|
rescue JSON::ParserError
|
|
25
28
|
log_halt 500, "Unable to parse kexec JSON input: #{body_data}"
|
|
26
29
|
end
|
|
27
|
-
|
|
30
|
+
args = ["--debug", "--force"]
|
|
31
|
+
extra = data['extra']
|
|
32
|
+
if extra && extra.is_a?(String)
|
|
33
|
+
args << extra
|
|
34
|
+
elsif extra && extra.is_a?(Array)
|
|
35
|
+
args.concat(extra)
|
|
36
|
+
end
|
|
37
|
+
args << "--kexec-file-syscall" if is_secureboot
|
|
38
|
+
args << "--append=#{data['append']}"
|
|
39
|
+
args << "--initrd=/tmp/initrd.img"
|
|
40
|
+
download_and_run_after_response data, 2, kexec, *args, "/tmp/vmlinuz"
|
|
41
|
+
|
|
28
42
|
{ :result => true }.to_json
|
|
29
43
|
end
|
|
30
44
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_proxy_discovery_image
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lukas Zapletal
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
Smart Proxy plugin providing Image API on discovered nodes. This plugin is only
|
|
@@ -34,7 +34,7 @@ homepage: https://github.com/theforeman/smart_proxy_discovery_image
|
|
|
34
34
|
licenses:
|
|
35
35
|
- GPL-3.0
|
|
36
36
|
metadata: {}
|
|
37
|
-
post_install_message:
|
|
37
|
+
post_install_message:
|
|
38
38
|
rdoc_options: []
|
|
39
39
|
require_paths:
|
|
40
40
|
- lib
|
|
@@ -49,8 +49,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
49
49
|
- !ruby/object:Gem::Version
|
|
50
50
|
version: '0'
|
|
51
51
|
requirements: []
|
|
52
|
-
rubygems_version: 3.1.
|
|
53
|
-
signing_key:
|
|
52
|
+
rubygems_version: 3.1.4
|
|
53
|
+
signing_key:
|
|
54
54
|
specification_version: 4
|
|
55
55
|
summary: FDI API for Foreman Smart-Proxy
|
|
56
56
|
test_files: []
|