katello 3.16.0.rc5.1 → 3.16.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +39 -23
- data/app/helpers/katello/content_view_helper.rb +15 -0
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -1
- data/app/lib/actions/katello/content_view/publish.rb +55 -16
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +81 -51
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +66 -0
- data/app/lib/actions/katello/repository/multi_clone_to_version.rb +30 -0
- data/app/lib/actions/pulp3/abstract_async_task.rb +62 -58
- data/app/lib/actions/pulp3/content_migration.rb +4 -0
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb +36 -0
- data/app/lib/actions/pulp3/repository/multi_copy_content.rb +28 -0
- data/app/lib/actions/pulp3/repository/multi_copy_units.rb +14 -7
- data/app/lib/actions/pulp3/repository/save_version.rb +11 -3
- data/app/lib/actions/pulp3/repository/save_versions.rb +47 -13
- data/app/lib/katello/errors.rb +1 -15
- data/app/models/katello/content_view.rb +18 -6
- data/app/models/katello/content_view_erratum_filter.rb +13 -0
- data/app/models/katello/content_view_module_stream_filter.rb +19 -0
- data/app/models/katello/module_stream.rb +1 -1
- data/app/services/katello/pulp3/api/core.rb +4 -0
- data/app/services/katello/pulp3/erratum.rb +3 -1
- data/app/services/katello/pulp3/migration.rb +3 -2
- data/app/services/katello/pulp3/migration_plan.rb +6 -6
- data/app/services/katello/pulp3/repository.rb +10 -1
- data/app/services/katello/pulp3/repository/yum.rb +168 -35
- data/app/services/katello/pulp3/task.rb +100 -0
- data/app/services/katello/pulp3/task_group.rb +79 -0
- data/lib/katello/version.rb +1 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
- metadata +17 -10
@@ -0,0 +1,100 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
class Task
|
4
|
+
# A call report Looks like: {"task":"/pulp/api/v3/tasks/5/"}
|
5
|
+
# {
|
6
|
+
# "pulp_href":"/pulp/api/v3/tasks/4/",
|
7
|
+
# "pulp_created":"2019-02-21T19:50:40.476767Z",
|
8
|
+
# "job_id":"d0359658-d926-47a2-b430-1b2092b3bd86",
|
9
|
+
# "state":"completed",
|
10
|
+
# "name":"pulp_file.app.tasks.publishing.publish",
|
11
|
+
# "started_at":"2019-02-21T19:50:40.556002Z",
|
12
|
+
# "finished_at":"2019-02-21T19:50:40.618397Z",
|
13
|
+
# "non_fatal_errors":[
|
14
|
+
#
|
15
|
+
# ],
|
16
|
+
# "error":null,
|
17
|
+
# "worker":"/pulp/api/v3/workers/1/",
|
18
|
+
# "parent":null,
|
19
|
+
# "spawned_tasks":[
|
20
|
+
#
|
21
|
+
# ],
|
22
|
+
# "progress_reports":[
|
23
|
+
#
|
24
|
+
# ],
|
25
|
+
# "created_resources":[
|
26
|
+
# "/pulp/api/v3/publications/1/"
|
27
|
+
# ]
|
28
|
+
# }
|
29
|
+
|
30
|
+
WAITING = 'waiting'.freeze
|
31
|
+
SKIPPED = 'skipped'.freeze
|
32
|
+
RUNNING = 'running'.freeze
|
33
|
+
COMPLETED = 'completed'.freeze
|
34
|
+
FAILED = 'failed'.freeze
|
35
|
+
CANCELED = 'canceled'.freeze
|
36
|
+
|
37
|
+
FINISHED_STATES = [COMPLETED, FAILED, CANCELED, SKIPPED].freeze
|
38
|
+
|
39
|
+
#needed for serialization in dynflow
|
40
|
+
|
41
|
+
delegate :[], :key?, :dig, :to_hash, :to => :task_data
|
42
|
+
|
43
|
+
def initialize(smart_proxy, data)
|
44
|
+
@smart_proxy = smart_proxy
|
45
|
+
if (href = data['task'])
|
46
|
+
@href = href
|
47
|
+
else
|
48
|
+
@pulp_data = data.with_indifferent_access
|
49
|
+
@href = @pulp_data['pulp_href']
|
50
|
+
Rails.logger.error("Got empty pulp_href on #{@pulp_data}") if @href.nil?
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def task_data(force_refresh = false)
|
55
|
+
@pulp_data = nil if force_refresh
|
56
|
+
@pulp_data ||= tasks_api.read(@href).as_json.with_indifferent_access
|
57
|
+
end
|
58
|
+
|
59
|
+
def tasks_api
|
60
|
+
::Katello::Pulp3::Api::Core.new(@smart_proxy).tasks_api
|
61
|
+
end
|
62
|
+
|
63
|
+
def task_group_href
|
64
|
+
task_data[:task_group]
|
65
|
+
end
|
66
|
+
|
67
|
+
def done?
|
68
|
+
task_data[:finish_time] || FINISHED_STATES.include?(task_data[:state])
|
69
|
+
end
|
70
|
+
|
71
|
+
def poll
|
72
|
+
task_data(true)
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
def started?
|
77
|
+
task_data[:start_time]
|
78
|
+
end
|
79
|
+
|
80
|
+
def error
|
81
|
+
if task_data[:state] == CANCELED
|
82
|
+
self.new(_("Task canceled"))
|
83
|
+
elsif task_data[:state] == FAILED
|
84
|
+
if task_data[:error][:description].blank?
|
85
|
+
_("Pulp task error")
|
86
|
+
else
|
87
|
+
task_data[:error][:description]
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def cancel
|
93
|
+
data = PulpcoreClient::Task.new(state: 'canceled')
|
94
|
+
tasks_api.tasks_cancel(pulp_task['pulp_href'], data)
|
95
|
+
#the main task may have completed, so cancel spawned tasks too
|
96
|
+
task_data['spawned_tasks']&.each { |spawned| tasks_api.tasks_cancel(spawned['pulp_href'], data) }
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
class TaskGroup
|
4
|
+
WAITING = 'waiting'.freeze
|
5
|
+
SKIPPED = 'skipped'.freeze
|
6
|
+
RUNNING = 'running'.freeze
|
7
|
+
COMPLETED = 'completed'.freeze
|
8
|
+
CANCELLED = 'canceled'.freeze
|
9
|
+
FAILED = 'failed'.freeze
|
10
|
+
|
11
|
+
IN_PROGRESS_STATES = [WAITING, RUNNING].freeze
|
12
|
+
|
13
|
+
#needed for serialization in dynflow
|
14
|
+
delegate :to_hash, :to => :task_group_data
|
15
|
+
delegate :dig, :to => :task_group_data
|
16
|
+
|
17
|
+
attr_accessor :href
|
18
|
+
|
19
|
+
# A call report Looks like: {"task":"/pulp/api/v3/tasks/5/"}
|
20
|
+
#{
|
21
|
+
# "pulp_href":"/pulp/api/v3/task-groups/d9841aaa-8a47-4e31-9018-10e4430766bf/",
|
22
|
+
# "description":"Migration Sub-tasks",
|
23
|
+
# "waiting":0,
|
24
|
+
# "skipped":0,
|
25
|
+
# "running":0,
|
26
|
+
# "completed":0,
|
27
|
+
# "canceled":0,
|
28
|
+
# "failed":1
|
29
|
+
# }
|
30
|
+
|
31
|
+
def self.new_from_href(smart_proxy, href)
|
32
|
+
group = self.new(smart_proxy, {'pulp_href' => href})
|
33
|
+
group.clear_task_group_data
|
34
|
+
group
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize(smart_proxy, data)
|
38
|
+
@smart_proxy = smart_proxy
|
39
|
+
@pulp_data = data.with_indifferent_access
|
40
|
+
@href = @pulp_data['pulp_href']
|
41
|
+
Rails.logger.error("Got empty pulp_href on #{@pulp_data}") if @href.nil?
|
42
|
+
end
|
43
|
+
|
44
|
+
def task_group_data
|
45
|
+
@pulp_data ||= tasks_groups_api.read(@href).as_json.with_indifferent_access
|
46
|
+
end
|
47
|
+
|
48
|
+
def tasks_groups_api
|
49
|
+
::Katello::Pulp3::Api::Core.new(@smart_proxy).task_groups_api
|
50
|
+
end
|
51
|
+
|
52
|
+
def done?
|
53
|
+
task_group_data['all_tasks_dispatched'] = true && IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
|
54
|
+
end
|
55
|
+
|
56
|
+
def poll
|
57
|
+
clear_task_group_data
|
58
|
+
task_group_data
|
59
|
+
end
|
60
|
+
|
61
|
+
def clear_task_group_data
|
62
|
+
@pulp_data = nil
|
63
|
+
end
|
64
|
+
|
65
|
+
def started?
|
66
|
+
[SKIPPED, RUNNING, COMPLETED, CANCELLED, FAILED].any? { |state| task_group_data[state] }
|
67
|
+
end
|
68
|
+
|
69
|
+
def error
|
70
|
+
if task_group_data[FAILED] > 0
|
71
|
+
"#{task_group_data[FAILED]} subtask(s) failed for task group #{@href}."
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def cancel
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/lib/katello/version.rb
CHANGED
@@ -25,16 +25,16 @@ const recommendedRepositoriesRHEL = [
|
|
25
25
|
];
|
26
26
|
|
27
27
|
const recommendedRepositoriesSatTools = [
|
28
|
-
'satellite-tools-6.
|
29
|
-
'rhel-7-server-satellite-tools-6.
|
30
|
-
'rhel-6-server-satellite-tools-6.
|
31
|
-
'rhel-5-server-els-satellite-tools-6.
|
28
|
+
'satellite-tools-6.8-for-rhel-8-x86_64-rpms',
|
29
|
+
'rhel-7-server-satellite-tools-6.8-rpms',
|
30
|
+
'rhel-6-server-satellite-tools-6.8-rpms',
|
31
|
+
'rhel-5-server-els-satellite-tools-6.8-rpms',
|
32
32
|
'rhel-7-server-satellite-maintenance-6-rpms',
|
33
33
|
];
|
34
34
|
|
35
35
|
const recommendedRepositoriesMisc = [
|
36
36
|
'rhel-server-rhscl-7-rpms',
|
37
|
-
'rhel-7-server-satellite-capsule-6.
|
37
|
+
'rhel-7-server-satellite-capsule-6.8-rpms',
|
38
38
|
'rhel-7-server-ansible-2.8-rpms',
|
39
39
|
];
|
40
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.16.0
|
4
|
+
version: 3.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -298,27 +298,27 @@ dependencies:
|
|
298
298
|
requirements:
|
299
299
|
- - ">="
|
300
300
|
- !ruby/object:Gem::Version
|
301
|
-
version: 3.
|
301
|
+
version: 3.5.0
|
302
302
|
- - "<"
|
303
303
|
- !ruby/object:Gem::Version
|
304
|
-
version: 3.
|
304
|
+
version: 3.6.0
|
305
305
|
type: :runtime
|
306
306
|
prerelease: false
|
307
307
|
version_requirements: !ruby/object:Gem::Requirement
|
308
308
|
requirements:
|
309
309
|
- - ">="
|
310
310
|
- !ruby/object:Gem::Version
|
311
|
-
version: 3.
|
311
|
+
version: 3.5.0
|
312
312
|
- - "<"
|
313
313
|
- !ruby/object:Gem::Version
|
314
|
-
version: 3.
|
314
|
+
version: 3.6.0
|
315
315
|
- !ruby/object:Gem::Dependency
|
316
316
|
name: pulp_2to3_migration_client
|
317
317
|
requirement: !ruby/object:Gem::Requirement
|
318
318
|
requirements:
|
319
319
|
- - ">="
|
320
320
|
- !ruby/object:Gem::Version
|
321
|
-
version: 0.2.
|
321
|
+
version: 0.2.0b6
|
322
322
|
- - "<"
|
323
323
|
- !ruby/object:Gem::Version
|
324
324
|
version: 0.3.0
|
@@ -328,7 +328,7 @@ dependencies:
|
|
328
328
|
requirements:
|
329
329
|
- - ">="
|
330
330
|
- !ruby/object:Gem::Version
|
331
|
-
version: 0.2.
|
331
|
+
version: 0.2.0b6
|
332
332
|
- - "<"
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: 0.3.0
|
@@ -720,6 +720,7 @@ files:
|
|
720
720
|
- app/helpers/katello/concerns/dashboard_helper_extensions.rb
|
721
721
|
- app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb
|
722
722
|
- app/helpers/katello/concerns/smart_proxy_helper_extensions.rb
|
723
|
+
- app/helpers/katello/content_view_helper.rb
|
723
724
|
- app/helpers/katello/errata_mailer_helper.rb
|
724
725
|
- app/helpers/katello/hosts_and_hostgroups_helper.rb
|
725
726
|
- app/helpers/katello/katello_url_helper.rb
|
@@ -882,6 +883,8 @@ files:
|
|
882
883
|
- app/lib/actions/katello/repository/index_package_groups.rb
|
883
884
|
- app/lib/actions/katello/repository/instance_update.rb
|
884
885
|
- app/lib/actions/katello/repository/metadata_generate.rb
|
886
|
+
- app/lib/actions/katello/repository/multi_clone_contents.rb
|
887
|
+
- app/lib/actions/katello/repository/multi_clone_to_version.rb
|
885
888
|
- app/lib/actions/katello/repository/purge_empty_content.rb
|
886
889
|
- app/lib/actions/katello/repository/refresh_repository.rb
|
887
890
|
- app/lib/actions/katello/repository/remove_content.rb
|
@@ -992,6 +995,7 @@ files:
|
|
992
995
|
- app/lib/actions/pulp3/orchestration/repository/delete.rb
|
993
996
|
- app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb
|
994
997
|
- app/lib/actions/pulp3/orchestration/repository/import_upload.rb
|
998
|
+
- app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb
|
995
999
|
- app/lib/actions/pulp3/orchestration/repository/refresh_if_needed.rb
|
996
1000
|
- app/lib/actions/pulp3/orchestration/repository/refresh_repos.rb
|
997
1001
|
- app/lib/actions/pulp3/orchestration/repository/remove_units.rb
|
@@ -1015,6 +1019,7 @@ files:
|
|
1015
1019
|
- app/lib/actions/pulp3/repository/delete_remote.rb
|
1016
1020
|
- app/lib/actions/pulp3/repository/delete_version.rb
|
1017
1021
|
- app/lib/actions/pulp3/repository/import_upload.rb
|
1022
|
+
- app/lib/actions/pulp3/repository/multi_copy_content.rb
|
1018
1023
|
- app/lib/actions/pulp3/repository/multi_copy_units.rb
|
1019
1024
|
- app/lib/actions/pulp3/repository/presenters/abstract_sync_presenter.rb
|
1020
1025
|
- app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb
|
@@ -1402,6 +1407,8 @@ files:
|
|
1402
1407
|
- app/services/katello/pulp3/smart_proxy_mirror_repository.rb
|
1403
1408
|
- app/services/katello/pulp3/smart_proxy_repository.rb
|
1404
1409
|
- app/services/katello/pulp3/srpm.rb
|
1410
|
+
- app/services/katello/pulp3/task.rb
|
1411
|
+
- app/services/katello/pulp3/task_group.rb
|
1405
1412
|
- app/services/katello/pulp3/yum_metadata_file.rb
|
1406
1413
|
- app/services/katello/puppet_class_importer_extensions.rb
|
1407
1414
|
- app/services/katello/pxe_files_downloader.rb
|
@@ -4878,9 +4885,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
4878
4885
|
version: '0'
|
4879
4886
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
4880
4887
|
requirements:
|
4881
|
-
- - "
|
4888
|
+
- - ">="
|
4882
4889
|
- !ruby/object:Gem::Version
|
4883
|
-
version:
|
4890
|
+
version: '0'
|
4884
4891
|
requirements: []
|
4885
4892
|
rubygems_version: 3.0.3
|
4886
4893
|
signing_key:
|