kafo 6.0.0 → 6.1.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 +4 -4
- data/lib/kafo/kafo_configure.rb +20 -6
- data/lib/kafo/logging.rb +2 -1
- data/lib/kafo/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c94f318599cc4644b57c55556ec625347b4fbac35a4a545708ae5f5dc7f70073
|
|
4
|
+
data.tar.gz: 9c5b2568c13a0aca23af2615f6f11f08357fb4e6c28a0eab51f48585bcd76c8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0c922769add3c8047b2fb44a411366842c0b6ad852aa224b432ad99f7d51ac5fe6702d6df3962a7bede5af1aa1f8890778cf3c6a09067407d6e91f00aded6a7
|
|
7
|
+
data.tar.gz: 1e2bfc89f29d6ada5367129b52d315be14b67f55c2baf39f0f747a8d0a586497941e1924a6bb75f17b048d2a40c40036c38721e5d9b5d44e583ee8aa640143bf
|
data/lib/kafo/kafo_configure.rb
CHANGED
|
@@ -459,13 +459,13 @@ module Kafo
|
|
|
459
459
|
execution_env.store_answers
|
|
460
460
|
puppetconf = execution_env.configure_puppet(
|
|
461
461
|
'color' => false,
|
|
462
|
-
'evaltrace' =>
|
|
462
|
+
'evaltrace' => true,
|
|
463
463
|
'noop' => !!noop?,
|
|
464
464
|
'profile' => !!profile?,
|
|
465
465
|
'show_diff' => true,
|
|
466
466
|
)
|
|
467
467
|
|
|
468
|
-
exit_code
|
|
468
|
+
self.class.exit_handler.exit_code = 0
|
|
469
469
|
exit_status = nil
|
|
470
470
|
options = [
|
|
471
471
|
'--verbose',
|
|
@@ -476,7 +476,14 @@ module Kafo
|
|
|
476
476
|
command = PuppetCommand.new('include kafo_configure', options, puppetconf).command
|
|
477
477
|
log_parser = PuppetLogParser.new
|
|
478
478
|
logger = Logger.new('configure')
|
|
479
|
-
|
|
479
|
+
|
|
480
|
+
start_message = <<-HEREDOC
|
|
481
|
+
Starting system configuration.
|
|
482
|
+
The total number of configuration tasks may increase during the run.
|
|
483
|
+
Observe logs or specify --verbose-log-level to see individual configuration tasks.
|
|
484
|
+
HEREDOC
|
|
485
|
+
|
|
486
|
+
logger.notice(start_message.chomp)
|
|
480
487
|
|
|
481
488
|
PTY.spawn(*PuppetCommand.format_command(command)) do |stdin, stdout, pid|
|
|
482
489
|
begin
|
|
@@ -484,6 +491,13 @@ module Kafo
|
|
|
484
491
|
line = normalize_encoding(line)
|
|
485
492
|
method, message = log_parser.parse(line)
|
|
486
493
|
progress_log(method, message, logger)
|
|
494
|
+
|
|
495
|
+
if (output = line.match(%r{(.+\]): Starting to evaluate the resource( \((?<count>\d+) of (?<total>\d+)\))?}))
|
|
496
|
+
if (output[:count].to_i % 100) == 1 && output[:count].to_i != 1
|
|
497
|
+
logger.notice("#{output[:count].to_i - 1} out of #{output[:total]} done.")
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
|
|
487
501
|
@progress_bar.update(line) if @progress_bar
|
|
488
502
|
end
|
|
489
503
|
rescue Errno::EIO # we reach end of input
|
|
@@ -493,16 +507,16 @@ module Kafo
|
|
|
493
507
|
Process.wait(pid)
|
|
494
508
|
rescue Errno::ECHILD # process could exit meanwhile so we rescue
|
|
495
509
|
end
|
|
496
|
-
exit_code = $?.exitstatus
|
|
510
|
+
self.class.exit_handler.exit_code = $?.exitstatus
|
|
497
511
|
end
|
|
498
512
|
end
|
|
499
513
|
end
|
|
500
514
|
rescue PTY::ChildExited => e # could be raised by Process.wait on older ruby or by PTY.check
|
|
501
|
-
exit_code = e.status.exitstatus
|
|
515
|
+
self.class.exit_handler.exit_code = e.status.exitstatus
|
|
502
516
|
end
|
|
503
517
|
|
|
504
518
|
@progress_bar.close if @progress_bar
|
|
505
|
-
logger.notice "
|
|
519
|
+
logger.notice "System configuration has finished."
|
|
506
520
|
|
|
507
521
|
self.class.hooking.execute(:post)
|
|
508
522
|
self.class.exit(exit_code)
|
data/lib/kafo/logging.rb
CHANGED
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kafo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marek Hulan
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -305,7 +305,7 @@ homepage: https://github.com/theforeman/kafo
|
|
|
305
305
|
licenses:
|
|
306
306
|
- GPL-3.0+
|
|
307
307
|
metadata: {}
|
|
308
|
-
post_install_message:
|
|
308
|
+
post_install_message:
|
|
309
309
|
rdoc_options: []
|
|
310
310
|
require_paths:
|
|
311
311
|
- lib
|
|
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
321
321
|
version: '0'
|
|
322
322
|
requirements: []
|
|
323
323
|
rubygems_version: 3.1.4
|
|
324
|
-
signing_key:
|
|
324
|
+
signing_key:
|
|
325
325
|
specification_version: 4
|
|
326
326
|
summary: A gem for making installations based on puppet user friendly
|
|
327
327
|
test_files: []
|