smart_proxy_discovery_image 1.3.0 → 1.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
  SHA256:
3
- metadata.gz: 249769da7939f13c7cf220e3b347613d5999a4f06ee68f81d0c930ed1494ce59
4
- data.tar.gz: b746dcd6207df3f11c666d55dd215a1d14da5d8ae6b7bf710ad65f6438a971a9
3
+ metadata.gz: 9f47a18d14a308a59b433e5831ecff7dc1dbf8160fa17dc50686c020b2eb21a5
4
+ data.tar.gz: 5ec638b594edf18045fc816abbcc7ea35cd8ea8605db66dd3b66cca7357dbd23
5
5
  SHA512:
6
- metadata.gz: 6a85568d2bb0b3ef030f413c197a7d3c04f6c168e15890c968250fc04b79a47024e2e8c3ff4c4b4f213f0b2684313301bd580eeb1b53d9ac9fa03f506ab2642e
7
- data.tar.gz: 8d0e231d24fc81b5df213585b67c5ded6b64ee4f9af3cbd1e72b4fdf65ffc15c8f6375414ab83ca14fcf081aacda4b4d00f11cf35b54abca3ce1640aabfdd8fc
6
+ metadata.gz: b2097ea10be509e9ddd6bc13c4839e5e9baabd35dce45b2cfbe6b7345bd8010e6c09d19e8da1a4a1439019be60fb2034a54646f0f2415fa8966e0a27b29a71a3
7
+ data.tar.gz: d5ff12c3d216ffc39ed1acb1df9aef6c7ad5daa72f5eb04da396771c25e2cfe9183eac567c6fc51eb902af28541227cbd32dc135761a37c6e02df25cf7f4e125
@@ -7,8 +7,9 @@ module Proxy::DiscoveryImage
7
7
  include Proxy::Util
8
8
 
9
9
  put "/reboot" do
10
- log_halt(500, "shutdown binary was not found") unless (shutdown = which('shutdown'))
11
- run_after_response 5, shutdown, "-r", "now", "Foreman Power API reboot"
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
@@ -26,9 +27,13 @@ module Proxy::DiscoveryImage
26
27
  rescue JSON::ParserError
27
28
  log_halt 500, "Unable to parse kexec JSON input: #{body_data}"
28
29
  end
29
- args = ["--debug", "--force", "--reset-vga"]
30
- args << data['extra'] if data['extra']
31
- args << "--kexec-file-syscall" if is_secureboot
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
32
37
  args << "--append=#{data['append']}"
33
38
  args << "--initrd=/tmp/initrd.img"
34
39
  download_and_run_after_response data, 2, kexec, *args, "/tmp/vmlinuz"
@@ -1,5 +1,5 @@
1
1
  module Proxy
2
2
  module DiscoveryImage
3
- VERSION = '1.3.0'
3
+ VERSION = '1.6.0'
4
4
  end
5
5
  end
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.3.0
4
+ version: 1.6.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: 2020-09-07 00:00:00.000000000 Z
11
+ date: 2022-01-17 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.2
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: []