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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5cb69151feb9aff8869369e3c3d16b1899bd51248ab4cb8a2cf08f862d78c72
4
- data.tar.gz: f7760b031fb5f00e4ad853d8ac7c139555cc0606dcbd40ba542f340bfbe08135
3
+ metadata.gz: c94f318599cc4644b57c55556ec625347b4fbac35a4a545708ae5f5dc7f70073
4
+ data.tar.gz: 9c5b2568c13a0aca23af2615f6f11f08357fb4e6c28a0eab51f48585bcd76c8d
5
5
  SHA512:
6
- metadata.gz: 27baf9be9b11280cd352cc418b62955473396b9d4b3245bc558e9e335e353d209c904acce90936644a9b023e82f60b5fba78ab902eb1aafd8068ae92d34e14ea
7
- data.tar.gz: aa2ff036cca2d1d24fa11003272ffecaa51d1a8a03a482471a2074adf92edbbe94b17b82e998a79134635f207e611056d9e91187a6a4ce88191f36836588dbd1
6
+ metadata.gz: b0c922769add3c8047b2fb44a411366842c0b6ad852aa224b432ad99f7d51ac5fe6702d6df3962a7bede5af1aa1f8890778cf3c6a09067407d6e91f00aded6a7
7
+ data.tar.gz: 1e2bfc89f29d6ada5367129b52d315be14b67f55c2baf39f0f747a8d0a586497941e1924a6bb75f17b048d2a40c40036c38721e5d9b5d44e583ee8aa640143bf
@@ -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' => !!@progress_bar,
462
+ 'evaltrace' => true,
463
463
  'noop' => !!noop?,
464
464
  'profile' => !!profile?,
465
465
  'show_diff' => true,
466
466
  )
467
467
 
468
- exit_code = 0
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
- logger.notice("Starting system configuration")
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 "Puppet has finished, bye!"
519
+ logger.notice "System configuration has finished."
506
520
 
507
521
  self.class.hooking.execute(:post)
508
522
  self.class.exit(exit_code)
@@ -46,7 +46,8 @@ module Kafo
46
46
  level: log_level,
47
47
  filename: filename,
48
48
  layout: layout(color: false),
49
- truncate: true
49
+ truncate: true,
50
+ roll_by: 'date'
50
51
  )
51
52
 
52
53
  FileUtils.chown(
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
3
  PARSER_CACHE_VERSION = 1
4
- VERSION = "6.0.0"
4
+ VERSION = "6.1.0"
5
5
  end
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.0.0
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-10-28 00:00:00.000000000 Z
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: []