foreman_maintain 1.7.1 → 1.7.2

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: ef8f53affe0970e853071b2568869c00aa94e850975b602538351cc9649dbc9e
4
- data.tar.gz: 3a60a60c9be41bb3aa34a7abee49c4b7c66f6f91629986e2a0f5e31cac98e125
3
+ metadata.gz: 84b855d08a7d01c7df1b6e6df2f757418986c9eb33a1dda287d894099d0cd4a4
4
+ data.tar.gz: 5862df244ff4a6dfa7edf3dd348eb942c43854ab9ff11d20399af2dec99a4775
5
5
  SHA512:
6
- metadata.gz: 68aa31aed572c7cec55cda60995e909f77b48028c9ed6708823b695d6373f07d3f94043eb5d8e4643f46f28363858bea362905a42f6ac7c1d8993ba6f6a5fc0d
7
- data.tar.gz: c989d6302e5c47dcf4bb5465c8671af3a40ec497d56459765d67c600049a88476e9447c6fc4b2457b281942b65c881884ba55b6ea896e77a013765eda70879e2
6
+ metadata.gz: 0422c2363fdb4fdd3b692205ce0db20f2b603c7a65efe3d7f30c8d1654036c5e6a344a0d8d4bdc1bc400b42eaf7e4eeca9ab0c799ceee5ad3cd1b60febe93c87
7
+ data.tar.gz: d983619c591e737257078a6b8f2cb15cc15bb3bc9227c6a8ae413b5742eeecc2d7f1e57544659ee4e3c23cf83eb553e83d1a5af3fd552115da3ee9864c714dd9
@@ -2,6 +2,9 @@ module Checks::Pulpcore
2
2
  class NoRunningTasks < ForemanMaintain::Check
3
3
  metadata do
4
4
  for_feature :pulpcore
5
+ confine do
6
+ feature(:pulpcore)&.cli_available?
7
+ end
5
8
  description 'Check for running pulpcore tasks'
6
9
  tags :pre_upgrade
7
10
  param :wait_for_tasks,
@@ -6,6 +6,7 @@ class Features::Pulpcore < ForemanMaintain::Feature
6
6
  TIMEOUT_FOR_TASKS_STATUS = 300
7
7
  RETRY_INTERVAL_FOR_TASKS_STATE = 10
8
8
  PULP_SETTINGS = '/etc/pulp/settings.py'.freeze
9
+ PULP_CLI_SETTINGS = '/etc/pulp/cli.toml'.freeze
9
10
 
10
11
  metadata do
11
12
  label :pulpcore
@@ -15,6 +16,10 @@ class Features::Pulpcore < ForemanMaintain::Feature
15
16
  end
16
17
  end
17
18
 
19
+ def cli_available?
20
+ File.exist?(PULP_CLI_SETTINGS)
21
+ end
22
+
18
23
  def cli(args)
19
24
  parse_json(execute("pulp --format json #{args}"))
20
25
  end
@@ -6,7 +6,7 @@ module Procedures::Crond
6
6
  description 'Start cron service'
7
7
 
8
8
  for_feature :cron
9
- tags :post_migrations, :maintenance_mode_off
9
+ tags :post_migrations
10
10
 
11
11
  after :iptables_remove_maintenance_mode_chain
12
12
  advanced_run false
@@ -4,7 +4,7 @@ module Procedures::Crond
4
4
  class Stop < Procedures::Service::Base
5
5
  metadata do
6
6
  description 'Stop cron service'
7
- tags :pre_migrations, :maintenance_mode_on
7
+ tags :pre_migrations
8
8
  for_feature :cron
9
9
 
10
10
  after :iptables_add_maintenance_mode_chain
@@ -4,7 +4,7 @@ module Procedures::MaintenanceMode
4
4
  metadata do
5
5
  label :disable_maintenance_mode
6
6
  description 'Remove maintenance mode table/chain from nftables/iptables'
7
- tags :post_migrations, :maintenance_mode_off
7
+ tags :post_migrations
8
8
  after :sync_plans_enable
9
9
  end
10
10
 
@@ -4,7 +4,7 @@ module Procedures::MaintenanceMode
4
4
  metadata do
5
5
  label :enable_maintenance_mode
6
6
  description 'Add maintenance_mode tables/chain to nftables/iptables'
7
- tags :pre_migrations, :maintenance_mode_on
7
+ tags :pre_migrations
8
8
  after :sync_plans_disable
9
9
  end
10
10
 
@@ -8,7 +8,9 @@ module ForemanMaintain::Scenarios
8
8
  end
9
9
 
10
10
  def compose
11
- add_steps(find_procedures(:maintenance_mode_on))
11
+ add_step(Procedures::MaintenanceMode::EnableMaintenanceMode)
12
+ add_step(Procedures::Crond::Stop)
13
+ add_step(Procedures::SyncPlans::Disable)
12
14
  end
13
15
  end
14
16
 
@@ -21,7 +23,9 @@ module ForemanMaintain::Scenarios
21
23
  end
22
24
 
23
25
  def compose
24
- add_steps(find_procedures(:maintenance_mode_off))
26
+ add_step(Procedures::SyncPlans::Enable)
27
+ add_step(Procedures::Crond::Start)
28
+ add_step(Procedures::MaintenanceMode::DisableMaintenanceMode)
25
29
  end
26
30
  end
27
31
 
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp