katello 3.13.0.rc1 → 3.13.0.rc2
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/v2/content_uploads_controller.rb +2 -2
- data/app/controllers/katello/remote_execution_controller.rb +6 -4
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +3 -4
- data/app/lib/actions/katello/host/attach_subscriptions.rb +4 -0
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +4 -0
- data/app/lib/actions/katello/host/destroy.rb +4 -0
- data/app/lib/actions/katello/host/erratum/install.rb +6 -2
- data/app/lib/actions/katello/host/generate_applicability.rb +4 -0
- data/app/lib/actions/katello/host/hypervisors.rb +4 -0
- data/app/lib/actions/katello/host/package/install.rb +6 -2
- data/app/lib/actions/katello/host/package/remove.rb +6 -2
- data/app/lib/actions/katello/host/package/update.rb +6 -2
- data/app/lib/actions/katello/host/update.rb +4 -0
- data/app/lib/actions/katello/host/upload_package_profile.rb +4 -0
- data/app/lib/actions/katello/host/upload_profiles.rb +4 -0
- data/app/models/katello/concerns/pulp_database_unit.rb +2 -1
- data/app/models/katello/host/subscription_facet.rb +15 -2
- data/app/models/katello/repository.rb +1 -1
- data/app/models/setting/content.rb +3 -1
- data/app/services/katello/repository_type.rb +6 -1
- data/app/views/katello/api/v2/subscription_facet/show.json.rabl +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +4 -1
- data/lib/katello/engine.rb +6 -0
- data/lib/katello/repository_types/docker.rb +2 -0
- data/lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake +22 -0
- data/lib/katello/version.rb +1 -1
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +1 -1
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d0e538e35d121bdac9c26397b7ddf2ed685a43934edbaae83af20156b3a58a9
|
4
|
+
data.tar.gz: ccbc1461a9c1a12f467a987a96d09e9b1abcce122576c960584984a15cb3f188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20802df43b0521b4ab9525174cb55cef95a9f32440c76171d4c28c8a1d031d3e695d89f72c091cecc119127bd93b739af834733b9e5a8efda0bc8531d7d37290
|
7
|
+
data.tar.gz: 3ba13c9ac26e9795876fda7cf522b1ad3d8c9d8caabf96772618e1e19075619738bce4208e8366f2259ba7754e14ace8b6a8a1b4671f7d93887dc2179767e90c
|
@@ -14,7 +14,7 @@ module Katello
|
|
14
14
|
|
15
15
|
api :PUT, "/repositories/:repository_id/content_uploads/:id", N_("Upload a chunk of the file's content")
|
16
16
|
param :repository_id, :number, :required => true, :desc => N_("Repository id")
|
17
|
-
param :id,
|
17
|
+
param :id, String, :required => true, :desc => N_("Upload request id")
|
18
18
|
param :offset, :number, :required => true, :desc => N_("The offset in the file where the content starts")
|
19
19
|
param :content, File, :required => true, :desc => N_("The actual file contents")
|
20
20
|
def update
|
@@ -25,7 +25,7 @@ module Katello
|
|
25
25
|
|
26
26
|
api :DELETE, "/repositories/:repository_id/content_uploads/:id", N_("Delete an upload request")
|
27
27
|
param :repository_id, :number, :required => true, :desc => N_("Repository id")
|
28
|
-
param :id,
|
28
|
+
param :id, String, :required => true, :desc => N_("Upload request id")
|
29
29
|
def destroy
|
30
30
|
@repository.backend_content_service(::SmartProxy.pulp_master).delete_upload(params[:id])
|
31
31
|
head :no_content
|
@@ -31,13 +31,15 @@ module Katello
|
|
31
31
|
|
32
32
|
def hosts
|
33
33
|
host_ids = params[:host_ids].is_a?(String) ? params[:host_ids].split(',') : params[:host_ids]
|
34
|
-
|
34
|
+
|
35
|
+
bulk_params = {
|
35
36
|
included: {
|
36
37
|
ids: host_ids,
|
37
|
-
search: params[:scoped_search]
|
38
|
-
excluded: params[:excluded]
|
38
|
+
search: params[:scoped_search]
|
39
39
|
}
|
40
|
-
|
40
|
+
}
|
41
|
+
|
42
|
+
find_bulk_hosts('edit_hosts', bulk_params)
|
41
43
|
end
|
42
44
|
|
43
45
|
def inputs
|
@@ -264,11 +264,10 @@ module Actions
|
|
264
264
|
::Katello::PuppetModule.with_identifiers(ids)
|
265
265
|
end
|
266
266
|
|
267
|
-
def
|
267
|
+
def copy_puppet_module(new_repo, module_id)
|
268
268
|
puppet_module = find_puppet_modules([module_id]).first
|
269
|
-
possible_repos = puppet_module.repositories.in_organization(new_repo.organization).
|
270
|
-
plan_action(Pulp::
|
271
|
-
[puppet_module])
|
269
|
+
possible_repos = puppet_module.repositories.in_organization(new_repo.organization).in_default_view
|
270
|
+
plan_action(Pulp::ContentViewPuppetEnvironment::CopyContents, new_repo, source_repository_id: possible_repos.first.id, puppet_modules: [puppet_module])
|
272
271
|
end
|
273
272
|
|
274
273
|
def plan_copy(action_class, source_repo, target_repo, clauses = nil, override_config = nil)
|
@@ -4,6 +4,10 @@ module Actions
|
|
4
4
|
class AutoAttachSubscriptions < Actions::EntryAction
|
5
5
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
6
|
|
7
|
+
def queue
|
8
|
+
::Katello::HOST_TASKS_QUEUE
|
9
|
+
end
|
10
|
+
|
7
11
|
def plan(host)
|
8
12
|
action_subject(host)
|
9
13
|
plan_action(::Actions::Candlepin::Consumer::AutoAttachSubscriptions, :uuid => host.subscription_facet.uuid)
|
@@ -4,6 +4,10 @@ module Actions
|
|
4
4
|
class Destroy < Actions::EntryAction
|
5
5
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
6
|
|
7
|
+
def queue
|
8
|
+
::Katello::HOST_TASKS_QUEUE
|
9
|
+
end
|
10
|
+
|
7
11
|
def plan(host, options = {})
|
8
12
|
action_subject(host)
|
9
13
|
# normalize options before passing through to run phase
|
@@ -8,7 +8,7 @@ module Actions
|
|
8
8
|
def plan(host, errata_ids)
|
9
9
|
Type! host, ::Host::Managed
|
10
10
|
|
11
|
-
action_subject(host, :errata => errata_ids)
|
11
|
+
action_subject(host, :hostname => host.name, :errata => errata_ids)
|
12
12
|
if Setting['erratum_install_batch_size'] && Setting['erratum_install_batch_size'] > 0
|
13
13
|
errata_ids.each_slice(Setting['erratum_install_batch_size']) do |errata_ids_batch|
|
14
14
|
plan_action(Pulp::Consumer::ContentInstall,
|
@@ -26,7 +26,11 @@ module Actions
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def humanized_name
|
29
|
-
|
29
|
+
if input.try(:[], :hostname)
|
30
|
+
_("Install erratum for %s") % input[:hostname]
|
31
|
+
else
|
32
|
+
_("Install erratum")
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
def humanized_input
|
@@ -2,6 +2,10 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Host
|
4
4
|
class GenerateApplicability < Actions::Base
|
5
|
+
def queue
|
6
|
+
::Katello::HOST_TASKS_QUEUE
|
7
|
+
end
|
8
|
+
|
5
9
|
def plan(hosts, use_queue = true)
|
6
10
|
uuids = hosts.map { |host| host.content_facet.try(:uuid) }.compact
|
7
11
|
unless uuids.empty?
|
@@ -8,7 +8,7 @@ module Actions
|
|
8
8
|
def plan(host, packages)
|
9
9
|
Type! host, ::Host::Managed
|
10
10
|
|
11
|
-
action_subject(host, :packages => packages)
|
11
|
+
action_subject(host, :hostname => host.name, :packages => packages)
|
12
12
|
plan_action(Pulp::Consumer::ContentInstall,
|
13
13
|
consumer_uuid: host.content_facet.uuid,
|
14
14
|
type: 'rpm',
|
@@ -17,7 +17,11 @@ module Actions
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def humanized_name
|
20
|
-
|
20
|
+
if input.try(:[], :hostname)
|
21
|
+
_("Install package for %s") % input[:hostname]
|
22
|
+
else
|
23
|
+
_("Install package")
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
def humanized_input
|
@@ -6,7 +6,7 @@ module Actions
|
|
6
6
|
include Helpers::Presenter
|
7
7
|
|
8
8
|
def plan(host, packages)
|
9
|
-
action_subject(host, :packages => packages)
|
9
|
+
action_subject(host, :hostname => host.name, :packages => packages)
|
10
10
|
plan_action(Pulp::Consumer::ContentUninstall,
|
11
11
|
consumer_uuid: host.content_facet.uuid,
|
12
12
|
type: 'rpm',
|
@@ -15,7 +15,11 @@ module Actions
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def humanized_name
|
18
|
-
|
18
|
+
if input.try(:[], :hostname)
|
19
|
+
_("Remove package for %s") % input[:hostname]
|
20
|
+
else
|
21
|
+
_("Remove package")
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
def humanized_input
|
@@ -8,7 +8,7 @@ module Actions
|
|
8
8
|
def plan(host, packages)
|
9
9
|
Type! host, ::Host::Managed
|
10
10
|
|
11
|
-
action_subject(host, :packages => packages)
|
11
|
+
action_subject(host, :hostname => host.name, :packages => packages)
|
12
12
|
plan_action(Pulp::Consumer::ContentUpdate,
|
13
13
|
consumer_uuid: host.content_facet.uuid,
|
14
14
|
type: 'rpm',
|
@@ -17,7 +17,11 @@ module Actions
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def humanized_name
|
20
|
-
|
20
|
+
if input.try(:[], :hostname)
|
21
|
+
_("Update package for %s") % input[:hostname]
|
22
|
+
else
|
23
|
+
_("Update package")
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
def humanized_input
|
@@ -80,7 +80,8 @@ module Katello
|
|
80
80
|
def import_for_repository(repository)
|
81
81
|
pulp_ids = []
|
82
82
|
service_class = SmartProxy.pulp_master!.content_service(content_type)
|
83
|
-
fetch_only_ids = !repository.content_view.default?
|
83
|
+
fetch_only_ids = !repository.content_view.default? &&
|
84
|
+
!repository.repository_type.unique_content_per_repo
|
84
85
|
|
85
86
|
service_class.pulp_units_batch_for_repo(repository, fetch_identifiers: fetch_only_ids).each do |units|
|
86
87
|
units.each do |unit|
|
@@ -40,6 +40,11 @@ module Katello
|
|
40
40
|
host_facts["virt::host_type"] || host_facts["hypervisor::type"]
|
41
41
|
end
|
42
42
|
|
43
|
+
def dmi_system_uuid
|
44
|
+
host_facts = self.host.facts
|
45
|
+
host_facts["dmi::system::uuid"]
|
46
|
+
end
|
47
|
+
|
43
48
|
def update_from_consumer_attributes(consumer_params)
|
44
49
|
import_database_attributes(consumer_params)
|
45
50
|
self.facts = consumer_params['facts'] unless consumer_params['facts'].blank?
|
@@ -272,9 +277,17 @@ module Katello
|
|
272
277
|
|
273
278
|
if hosts_size == 1
|
274
279
|
host = hosts.first
|
275
|
-
found_uuid = host.fact_values.find { |fv| fv.fact_name_id == uuid_fact_id }
|
276
280
|
|
277
|
-
|
281
|
+
if host.name == host_name
|
282
|
+
unless host.build
|
283
|
+
found_uuid = host.fact_values.where(fact_name_id: uuid_fact_id).first
|
284
|
+
if found_uuid && found_uuid.value != host_uuid
|
285
|
+
fail Katello::Errors::RegistrationError, _("This host is reporting a DMI UUID that differs from the existing registration.")
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
return host
|
290
|
+
end
|
278
291
|
end
|
279
292
|
|
280
293
|
hostnames = hosts.pluck(:name).sort.join(', ')
|
@@ -772,7 +772,7 @@ module Katello
|
|
772
772
|
|
773
773
|
if self.yum? && !self.master?
|
774
774
|
index_linked_repo
|
775
|
-
elsif source_repository
|
775
|
+
elsif source_repository && !repository_type.unique_content_per_repo
|
776
776
|
copy_indexed_data(source_repository)
|
777
777
|
else
|
778
778
|
repository_type.content_types_to_index.each do |type|
|
@@ -132,7 +132,9 @@ class Setting::Content < Setting
|
|
132
132
|
"packages to solve the dependencies if the package needed doesn't exist. Greedy will pull in the " \
|
133
133
|
"latest package to solve a dependency even if it already does exist in the repository."),
|
134
134
|
'conservative', N_('Content View Dependency Solving Algorithm'), nil,
|
135
|
-
:collection => dependency_solving_options)
|
135
|
+
:collection => dependency_solving_options),
|
136
|
+
self.set('host_tasks_workers_pool_size', N_("Amount of workers in the pool to handle the execution of host-related tasks. When set to 0, the default queue will be used instead. Restart of the dynflowd/foreman-tasks service is required."),
|
137
|
+
5, N_('Host Tasks Workers Pool Size'))
|
136
138
|
].each { |s| self.create! s.update(:category => "Setting::Content") }
|
137
139
|
end
|
138
140
|
true
|
@@ -14,11 +14,16 @@ module Katello
|
|
14
14
|
|
15
15
|
def_field :allow_creation_by_user, :service_class, :pulp3_service_class, :pulp3_plugin, :pulp3_skip_publication
|
16
16
|
attr_accessor :metadata_publish_matching_check, :index_additional_data_proc
|
17
|
-
attr_reader :id
|
17
|
+
attr_reader :id, :unique_content_per_repo
|
18
18
|
|
19
19
|
def initialize(id)
|
20
20
|
@id = id.to_sym
|
21
21
|
allow_creation_by_user(true)
|
22
|
+
@unique_content_per_repo = false
|
23
|
+
end
|
24
|
+
|
25
|
+
def set_unique_content_per_repo
|
26
|
+
@unique_content_per_repo = true
|
22
27
|
end
|
23
28
|
|
24
29
|
def content_types
|
@@ -9,6 +9,7 @@ UpgradeTask.define_tasks(:katello) do
|
|
9
9
|
{:name => 'katello:upgrades:3.11:import_yum_metadata'},
|
10
10
|
{:name => 'katello:upgrades:3.11:update_puppet_repos'},
|
11
11
|
{:name => 'katello:upgrades:3.11:clear_checksum_type', :task_name => 'katello:upgrades:3.8:clear_checksum_type'},
|
12
|
-
{:name => 'katello:upgrades:3.12:remove_pulp2_notifier'}
|
12
|
+
{:name => 'katello:upgrades:3.12:remove_pulp2_notifier'},
|
13
|
+
{:name => 'katello:upgrades:3.13:republish_deb_metadata'}
|
13
14
|
]
|
14
15
|
end
|
@@ -50,8 +50,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
|
|
50
50
|
$scope.remoteExecutionByDefault = BastionConfig.remoteExecutionByDefault;
|
51
51
|
|
52
52
|
$scope.errataActionFormValues = {
|
53
|
-
authenticityToken: $window.AUTH_TOKEN.replace(/"/g, '')
|
54
|
-
search: hostIds.included.search
|
53
|
+
authenticityToken: $window.AUTH_TOKEN.replace(/"/g, '')
|
55
54
|
};
|
56
55
|
|
57
56
|
if (hostIds.included.ids) {
|
@@ -38,8 +38,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkModuleStream
|
|
38
38
|
|
39
39
|
$scope.moduleStreamActionFormValues = {
|
40
40
|
authenticityToken: $window.AUTH_TOKEN.replace(/"/g, ''),
|
41
|
-
remoteAction: 'module_stream_action'
|
42
|
-
search: hostIds.included.search
|
41
|
+
remoteAction: 'module_stream_action'
|
43
42
|
};
|
44
43
|
|
45
44
|
if (hostIds.included.ids) {
|
@@ -138,8 +138,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkPackagesModa
|
|
138
138
|
$scope.packageActionFormValues.hostIds = selectedHosts.included.ids.join(',');
|
139
139
|
}
|
140
140
|
|
141
|
-
$scope.packageActionFormValues.search = selectedHosts.included.search;
|
142
|
-
|
143
141
|
$timeout(function () {
|
144
142
|
angular.element('#packageActionForm').submit();
|
145
143
|
}, 0);
|
@@ -9,7 +9,6 @@
|
|
9
9
|
<input type="hidden" name="remote_action" ng-value="moduleStreamActionFormValues.remoteAction"/>
|
10
10
|
<input type="hidden" name="module_stream_action" ng-value="moduleStreamActionFormValues.moduleStreamAction"/>
|
11
11
|
<input type="hidden" name="module_spec" ng-value="moduleStreamActionFormValues.moduleSpec"/>
|
12
|
-
<input type="hidden" name="scoped_search" ng-value="moduleStreamActionFormValues.search"/>
|
13
12
|
<input type="hidden" name="host_ids" ng-value="moduleStreamActionFormValues.hostIds"/>
|
14
13
|
<input type="hidden" name="customize" ng-value="moduleStreamActionFormValues.customize"/>
|
15
14
|
<input type="hidden" name="authenticity_token" ng-value="moduleStreamActionFormValues.authenticityToken"/>
|
@@ -5,7 +5,6 @@
|
|
5
5
|
<form id="errataActionForm" name="errataActionForm" class="form" method="post" action="/katello/remote_execution">
|
6
6
|
<input type="hidden" name="name" ng-value="errataActionFormValues.errata"/>
|
7
7
|
<input type="hidden" name="remote_action" ng-value="errataActionFormValues.remoteAction"/>
|
8
|
-
<input type="hidden" name="scoped_search" ng-value="errataActionFormValues.search"/>
|
9
8
|
<input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
|
10
9
|
<input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
|
11
10
|
<input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
|
@@ -33,7 +33,6 @@
|
|
33
33
|
<form id="packageActionForm" name="packageActionForm" class="form" method="post" action="/katello/remote_execution">
|
34
34
|
<input type="hidden" name="name" ng-value="content.content"/>
|
35
35
|
<input type="hidden" name="remote_action" ng-value="packageActionFormValues.remoteAction"/>
|
36
|
-
<input type="hidden" name="scoped_search" ng-value="packageActionFormValues.search"/>
|
37
36
|
<input type="hidden" name="host_ids" ng-value="packageActionFormValues.hostIds"/>
|
38
37
|
<input type="hidden" name="authenticity_token" ng-value="packageActionFormValues.authenticityToken"/>
|
39
38
|
<input type="hidden" name="customize" ng-value="packageActionFormValues.customize"/>
|
@@ -161,4 +160,4 @@
|
|
161
160
|
Done
|
162
161
|
</button>
|
163
162
|
</div>
|
164
|
-
</div>
|
163
|
+
</div>
|
@@ -16,9 +16,12 @@
|
|
16
16
|
on-save="save(host)">
|
17
17
|
</dd>
|
18
18
|
|
19
|
-
<dt translate>UUID</dt>
|
19
|
+
<dt translate>Subscription UUID</dt>
|
20
20
|
<dd>{{ host.subscription_facet_attributes.uuid }}</dd>
|
21
21
|
|
22
|
+
<dt translate>Bios UUID</dt>
|
23
|
+
<dd>{{ host.subscription_facet_attributes.dmi_system_uuid }}</dd>
|
24
|
+
|
22
25
|
<dt translate>Description</dt>
|
23
26
|
<dd bst-edit-textarea="host.comment"
|
24
27
|
readonly="denied('edit_hosts', host)"
|
data/lib/katello/engine.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Katello
|
2
|
+
HOST_TASKS_QUEUE = :hosts_queue
|
3
|
+
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
isolate_namespace Katello
|
4
6
|
|
@@ -63,6 +65,10 @@ module Katello
|
|
63
65
|
|
64
66
|
initializer "katello.register_actions", :before => :finisher_hook do |_app|
|
65
67
|
ForemanTasks.dynflow.require!
|
68
|
+
if (Setting.table_exists? rescue(false)) && Setting['host_tasks_workers_pool_size'].to_i > 0
|
69
|
+
ForemanTasks.dynflow.config.queues.add(HOST_TASKS_QUEUE, :pool_size => Setting['host_tasks_workers_pool_size'])
|
70
|
+
end
|
71
|
+
|
66
72
|
action_paths = %W(#{Katello::Engine.root}/app/lib/actions
|
67
73
|
#{Katello::Engine.root}/app/lib/headpin/actions
|
68
74
|
#{Katello::Engine.root}/app/lib/katello/actions)
|
@@ -5,6 +5,8 @@ Katello::RepositoryTypeManager.register(::Katello::Repository::DOCKER_TYPE) do
|
|
5
5
|
pulp3_skip_publication true
|
6
6
|
pulp3_plugin 'pulp_docker'
|
7
7
|
|
8
|
+
set_unique_content_per_repo
|
9
|
+
|
8
10
|
content_type Katello::DockerManifest,
|
9
11
|
:priority => 1,
|
10
12
|
:pulp2_service_class => ::Katello::Pulp::DockerManifest,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
namespace :katello do
|
2
|
+
namespace :upgrades do
|
3
|
+
namespace '3.13' do
|
4
|
+
desc "Regenerate the metadata for repositories affected by pulp_deb migration 0004"
|
5
|
+
task :republish_deb_metadata, [:input_file] => ["environment"] do |task, args|
|
6
|
+
User.current = User.anonymous_api_admin
|
7
|
+
input_file = args[:input_file] || "/var/lib/pulp/0004_deb_repo_republish_candidates.txt"
|
8
|
+
if File.readable?(input_file)
|
9
|
+
pulp_ids = File.read(input_file).each_line.map(&:strip) || []
|
10
|
+
repos = Katello::Repository.where(:pulp_id => pulp_ids)
|
11
|
+
puts _("Starting BulkMetadataGenerate task.")
|
12
|
+
task = ForemanTasks.async_task(Actions::Katello::Repository::BulkMetadataGenerate, repos, :force => true)
|
13
|
+
puts _("Please check that the task #{task.id} completes successfully.")
|
14
|
+
puts _('You can manually re-trigger this task by running "foreman-rake katello:upgrades:3.13:republish_deb_metadata"')
|
15
|
+
else
|
16
|
+
puts _("Input file #{input_file} was not readable.")
|
17
|
+
puts _('You can manually use an alternate input file by running "foreman-rake katello:upgrades:3.13:republish_deb_metadata[<path>]"')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/katello/version.rb
CHANGED
@@ -74,7 +74,7 @@ export default (state = initialState, action) => {
|
|
74
74
|
return Immutable({
|
75
75
|
repositories: mapRepositories(results),
|
76
76
|
pagination: {
|
77
|
-
page: Number(page) ||
|
77
|
+
page: Number(page) || 1,
|
78
78
|
// server can return per_page: null when there's error in the search query,
|
79
79
|
// don't store it in such case
|
80
80
|
// eslint-disable-next-line camelcase
|
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.13.0.
|
4
|
+
version: 3.13.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -208,16 +208,16 @@ dependencies:
|
|
208
208
|
name: pulpcore_client
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - '='
|
212
212
|
- !ruby/object:Gem::Version
|
213
|
-
version:
|
213
|
+
version: 3.0.0rc5.dev01564590949
|
214
214
|
type: :runtime
|
215
215
|
prerelease: false
|
216
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
217
|
requirements:
|
218
|
-
- -
|
218
|
+
- - '='
|
219
219
|
- !ruby/object:Gem::Version
|
220
|
-
version:
|
220
|
+
version: 3.0.0rc5.dev01564590949
|
221
221
|
- !ruby/object:Gem::Dependency
|
222
222
|
name: pulp_file_client
|
223
223
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,30 +236,30 @@ dependencies:
|
|
236
236
|
name: pulp_ansible_client
|
237
237
|
requirement: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- -
|
239
|
+
- - '='
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: 0.2.0b2.dev01565014789
|
242
242
|
type: :runtime
|
243
243
|
prerelease: false
|
244
244
|
version_requirements: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- -
|
246
|
+
- - '='
|
247
247
|
- !ruby/object:Gem::Version
|
248
|
-
version:
|
248
|
+
version: 0.2.0b2.dev01565014789
|
249
249
|
- !ruby/object:Gem::Dependency
|
250
250
|
name: pulp_docker_client
|
251
251
|
requirement: !ruby/object:Gem::Requirement
|
252
252
|
requirements:
|
253
|
-
- -
|
253
|
+
- - '='
|
254
254
|
- !ruby/object:Gem::Version
|
255
|
-
version:
|
255
|
+
version: 4.0.0b6.dev01564578980
|
256
256
|
type: :runtime
|
257
257
|
prerelease: false
|
258
258
|
version_requirements: !ruby/object:Gem::Requirement
|
259
259
|
requirements:
|
260
|
-
- -
|
260
|
+
- - '='
|
261
261
|
- !ruby/object:Gem::Version
|
262
|
-
version:
|
262
|
+
version: 4.0.0b6.dev01564578980
|
263
263
|
- !ruby/object:Gem::Dependency
|
264
264
|
name: deface
|
265
265
|
requirement: !ruby/object:Gem::Requirement
|
@@ -4055,6 +4055,7 @@ files:
|
|
4055
4055
|
- lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake
|
4056
4056
|
- lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake
|
4057
4057
|
- lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake
|
4058
|
+
- lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake
|
4058
4059
|
- lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake
|
4059
4060
|
- lib/katello/tasks/virt_who_report.rake
|
4060
4061
|
- lib/katello/url_constrained_cookie_store.rb
|