foreman_maintain 1.0.12 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/definitions/features/capsule.rb +1 -1
  3. data/definitions/features/foreman_database.rb +7 -1
  4. data/definitions/features/installer.rb +7 -1
  5. data/definitions/features/katello.rb +1 -1
  6. data/definitions/features/satellite.rb +1 -1
  7. data/definitions/procedures/backup/config_files.rb +25 -10
  8. data/definitions/procedures/backup/metadata.rb +11 -7
  9. data/definitions/procedures/backup/offline/foreman_db.rb +30 -9
  10. data/definitions/procedures/maintenance_mode/disable_maintenance_mode.rb +2 -1
  11. data/definitions/procedures/maintenance_mode/enable_maintenance_mode.rb +1 -30
  12. data/definitions/procedures/packages/update.rb +3 -1
  13. data/definitions/procedures/pulp/remove.rb +49 -13
  14. data/definitions/procedures/restore/extract_files.rb +4 -0
  15. data/definitions/procedures/selinux/set_file_security.rb +3 -0
  16. data/definitions/scenarios/backup.rb +10 -0
  17. data/definitions/scenarios/packages.rb +2 -2
  18. data/definitions/scenarios/self_upgrade.rb +10 -67
  19. data/lib/foreman_maintain/cli/packages_command.rb +26 -7
  20. data/lib/foreman_maintain/cli/self_upgrade_command.rb +1 -7
  21. data/lib/foreman_maintain/concerns/base_database.rb +31 -3
  22. data/lib/foreman_maintain/concerns/downstream.rb +2 -3
  23. data/lib/foreman_maintain/concerns/firewall/maintenance_mode.rb +31 -0
  24. data/lib/foreman_maintain/concerns/os_facts.rb +26 -2
  25. data/lib/foreman_maintain/concerns/system_helpers.rb +19 -17
  26. data/lib/foreman_maintain/package_manager/apt.rb +71 -0
  27. data/lib/foreman_maintain/package_manager/yum.rb +19 -11
  28. data/lib/foreman_maintain/package_manager.rb +6 -4
  29. data/lib/foreman_maintain/repository_manager/el.rb +15 -4
  30. data/lib/foreman_maintain/repository_manager.rb +1 -1
  31. data/lib/foreman_maintain/utils/service/systemd.rb +8 -13
  32. data/lib/foreman_maintain/version.rb +1 -1
  33. data/lib/foreman_maintain.rb +1 -0
  34. metadata +4 -7
  35. data/bin/passenger-recycler +0 -89
  36. data/config/passenger-recycler.yaml +0 -38
  37. data/definitions/procedures/passenger_recycler.rb +0 -14
  38. data/extras/passenger-recycler.cron +0 -3
@@ -1,38 +0,0 @@
1
- ---
2
- #
3
- # Trivial Passenger memory monitor. By default it is executed from cron every
4
- # five minutes and it kills processes exceeding the RSS memory threashold
5
- # configured with MAX_PRIV_RSS_MEMORY. Up to MAX_TERMINATION processes is
6
- # terminated during one execution.
7
- #
8
-
9
- # Set to 'false' to completely disable this script.
10
- :ENABLED: true
11
-
12
- # RSS memory threashold to recycle processes (in kB).
13
- :MAX_PRIV_RSS_MEMORY: 2_000_000
14
-
15
- # Controls amount of processes killed during one run. This number should be
16
- # smaller by one or two than maximum allowed amount of processes by passenger
17
- # (defaults to 6) so there is at least one process left.
18
- :MAX_TERMINATION: 1
19
-
20
- # Kill processes which do not terminate gracefully using SIGKILL after
21
- # GRACEFUL_SHUTDOWN_SLEEP period.
22
- :KILL_BUSY: true
23
-
24
- # Amount of seconds to wait for graceful shutdown (SIGTERM) until a process
25
- # kill (SIGKILL) is sent. Must be lower than 15 minutes (900 seconds). This
26
- # gives Passenger some extra time for respawning application before another
27
- # process is terminated.
28
- :GRACEFUL_SHUTDOWN_SLEEP: 90
29
-
30
- # Print 'passenger-status' and 'ps' output before termination to get some extra
31
- # information via email from cron. Only printed when a kill is performed.
32
- :SEND_STATUS: true
33
-
34
- # Print verbose information "Process terminating" or "Process killed".
35
- :VERBOSE: true
36
-
37
- # Print extra debugging information.
38
- :DEBUG: false
@@ -1,14 +0,0 @@
1
- class Procedures::PassengerRecycler < ForemanMaintain::Procedure
2
- metadata do
3
- description 'Perform Passenger memory recycling'
4
-
5
- confine do
6
- execute?('which passenger-recycler')
7
- end
8
- end
9
-
10
- def run
11
- passenger_recycler_path = execute('which passenger-recycler')
12
- execute!(passenger_recycler_path)
13
- end
14
- end
@@ -1,3 +0,0 @@
1
- # Configuration file /etc/cron.d/passenger-recycler to run passenger-recycler
2
- # every 15 minutes.
3
- */15 * * * * root /usr/bin/passenger-recycler