katello 4.1.3 → 4.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1adb0b8312ecc97c2044f94caff1265923f1cc909ff71a67cb95303c55658c11
4
- data.tar.gz: 9a0584aad43b18d1ce26d9cd5fde0709e7b34233e005fd5fff046960a4674693
3
+ metadata.gz: 6c5585f90b341b73cc8ff5d0b5adea7f31e794da93c42e6f755de36b86f0fe12
4
+ data.tar.gz: fea8f7973ec98df5967310fcd025767d7fe03ee8077a388c64bb8b50101190b1
5
5
  SHA512:
6
- metadata.gz: 4a887f66325269c29a3d1413184172d357ea097031fffad680789ebbb6c5d044eeb01b053e6e570cd8eb4d8528132ee8739d2b3224b14c73b412c19389d7f144
7
- data.tar.gz: b54b6cfd02c914f976b38c6b5ad586192ffb7cf146957b8b1a09626560d046ecb4683760a7c90a72cb58558a3333fe972415c401f1afb06fd4bc96414aa9a536
6
+ metadata.gz: aabf11851850da36e0a135c9a8dc0e0561ab4791c234bdd47e63caef2342cd60bf8428060399161f17eafe22878144dac4b7277250b68ae1a9c15e63c7ed4fac
7
+ data.tar.gz: 4b72e1f19961cf571056f14291e2bb811c29c353ae7453175a8afd2bf83b29f02709ad540a82230fcbc982923e5025cb19f37730373ea90c16afe7818f745c66
@@ -74,11 +74,13 @@ module Katello
74
74
  def initialize(url:, ssl_cert_file:, ssl_key_file:, ssl_ca_file:)
75
75
  @url = url
76
76
  ssl_domain = ::Qpid::Proton::SSLDomain.new(::Qpid::Proton::SSLDomain::MODE_CLIENT)
77
+ ssl_domain.peer_authentication(::Qpid::Proton::SSLDomain::VERIFY_PEER_NAME)
77
78
  ssl_domain.credentials(ssl_cert_file, ssl_key_file, nil) if ssl_cert_file && ssl_key_file
78
79
  ssl_domain.trusted_ca_db(ssl_ca_file) if ssl_ca_file
79
80
  @connection_options = {
80
81
  ssl_domain: ssl_domain,
81
- sasl_allowed_mechs: 'external'
82
+ sasl_allowed_mechs: 'external',
83
+ virtual_host: URI.parse(url).host
82
84
  }
83
85
  end
84
86
 
@@ -215,10 +215,15 @@ module Katello
215
215
  new_ids = new_available_module_streams.keys - old_associated_ids
216
216
  new_ids.each do |new_id|
217
217
  module_stream = new_available_module_streams[new_id]
218
+ status = module_stream["status"]
219
+ # Set status to "unknown" only if the active field is in use and set to false and the module is enabled
220
+ if enabled_module_stream_inactive?(module_stream)
221
+ status = "unknown"
222
+ end
218
223
  self.host_available_module_streams.create!(host_id: self.id,
219
224
  available_module_stream_id: new_id,
220
225
  installed_profiles: module_stream["installed_profiles"],
221
- status: module_stream["status"])
226
+ status: status)
222
227
  end
223
228
 
224
229
  upgradable_streams.each do |hams|
@@ -228,6 +233,10 @@ module Katello
228
233
  if hams.attributes.slice(*shared_keys) != module_stream_data
229
234
  hams.update!(module_stream_data)
230
235
  end
236
+ # Set status to "unknown" only if the active field is in use and set to false and the module is enabled
237
+ if enabled_module_stream_inactive?(module_stream)
238
+ hams.update!(status: "unknown")
239
+ end
231
240
  end
232
241
  end
233
242
 
@@ -347,6 +356,10 @@ module Katello
347
356
  self.get_status(::Katello::TraceStatus).refresh!
348
357
  self.refresh_global_status!
349
358
  end
359
+
360
+ def enabled_module_stream_inactive?(module_stream)
361
+ !module_stream["active"].nil? && module_stream["active"] == false && module_stream["status"] == "enabled"
362
+ end
350
363
  end
351
364
  end
352
365
  end
@@ -42,7 +42,7 @@ module Katello
42
42
  def sync_status
43
43
  all_repos = repos(self.library, nil, false)
44
44
  task = last_repo_sync_task
45
- last_synced_repo = task ? all_repos.find { |repo| task.locks.where(:resource_type => ::Katello::Repository.name).pluck(:resource_id).map(&:to_s).include?(repo.id.to_s) } : nil
45
+ last_synced_repo = task ? all_repos.find { |repo| task.links.where(:resource_type => ::Katello::Repository.name).pluck(:resource_id).map(&:to_s).include?(repo.id.to_s) } : nil
46
46
  ::Katello::SyncStatusPresenter.new(last_synced_repo, task).sync_progress
47
47
  end
48
48
 
@@ -92,7 +92,8 @@ module Katello
92
92
  ::Katello::ModuleStream.
93
93
  joins("inner join katello_available_module_streams on
94
94
  katello_module_streams.name = katello_available_module_streams.name and
95
- katello_module_streams.stream = katello_available_module_streams.stream").
95
+ katello_module_streams.stream = katello_available_module_streams.stream and
96
+ katello_module_streams.context = katello_available_module_streams.context").
96
97
  joins("inner join katello_host_available_module_streams on
97
98
  katello_available_module_streams.id = katello_host_available_module_streams.available_module_stream_id").
98
99
  where("katello_host_available_module_streams.host_id = :content_facet_id and
@@ -249,6 +249,8 @@ module Katello
249
249
  end
250
250
 
251
251
  def delete_agent_queue(host)
252
+ return unless ::Katello.with_katello_agent?
253
+
252
254
  queue_name = Katello::Agent::Dispatcher.host_queue_name(host)
253
255
  Katello::EventQueue.push_event(::Katello::Events::DeleteHostAgentQueue::EVENT_TYPE, host.id) do |attrs|
254
256
  attrs[:metadata] = { queue_name: queue_name }
@@ -39,13 +39,23 @@ class DeletePuppetAndOstreeRepos < ActiveRecord::Migration[6.0]
39
39
  FakeContentViewPuppetEnvironment.delete_all
40
40
  FakePuppetModule.delete_all
41
41
 
42
- ::Katello::Repository.delete(puppet_repositories) if puppet_repositories.any?
42
+ if puppet_repositories.any?
43
+ User.as_anonymous_admin do
44
+ ::Katello::Repository.delete(puppet_repositories)
45
+ ::Katello::RootRepository.where(content_type: 'puppet').destroy_all
46
+ end
47
+ end
43
48
 
44
49
  FakeRepositoryOstreeBranch.delete_all
45
50
  FakeOstreeBranch.delete_all
46
- Katello::Repository.ostree_type.where.not(:library_instance_id => nil, :environment_id => nil).destroy_all #CV LCE repos
47
- Katello::Repository.ostree_type.where.not(:library_instance_id => nil).destroy_all # archive repos
48
- Katello::Repository.ostree_type.destroy_all #all the rest (should just be library repos)
51
+
52
+ if Katello::Repository.ostree_type.any?
53
+ User.as_anonymous_admin do
54
+ Katello::Repository.ostree_type.where.not(:library_instance_id => nil, :environment_id => nil).destroy_all #CV LCE repos
55
+ Katello::Repository.ostree_type.where.not(:library_instance_id => nil).destroy_all # archive repos
56
+ Katello::Repository.ostree_type.destroy_all #all the rest (should just be library repos)
57
+ end
58
+ end
49
59
 
50
60
  Katello::ContentViewVersion.where.not(:content_counts => nil).each do |version|
51
61
  version.content_counts.except!('ostree', 'puppet_module')
@@ -4,6 +4,7 @@ UpgradeTask.define_tasks(:katello) do
4
4
  {:name => 'katello:clean_backend_objects', :long_running => true, :skip_failure => true, :always_run => true},
5
5
  {:name => 'katello:upgrades:4.0:remove_ostree_puppet_content'},
6
6
  {:name => 'katello:upgrades:4.1:sync_noarch_content'},
7
- {:name => 'katello:upgrades:4.1:fix_invalid_pools'}
7
+ {:name => 'katello:upgrades:4.1:fix_invalid_pools'},
8
+ {:name => 'katello:upgrades:4.1:update_content_import_export_perms'}
8
9
  ]
9
10
  end
@@ -37,7 +37,7 @@ angular.module('Bastion.errata').controller('ApplyErrataController',
37
37
  $scope.errataActionFormValues = {
38
38
  authenticityToken: $window.AUTH_TOKEN.replace(/&quot;/g, ''),
39
39
  errata: IncrementalUpdate.getErrataIds().join(','),
40
- hostIds: IncrementalUpdate.getBulkContentHosts().included.ids.join(','),
40
+ bulkHostIds: angular.toJson({ included: { ids: IncrementalUpdate.getBulkContentHosts().included.ids }}),
41
41
  customize: false
42
42
  };
43
43
 
@@ -18,7 +18,7 @@
18
18
  <form id="errataActionForm" method="post" action="/katello/remote_execution">
19
19
  <input type="hidden" name="remote_action" value="errata_install"/>
20
20
  <input type="hidden" name="name" ng-value="errataActionFormValues.errata"/>
21
- <input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
21
+ <input type="hidden" name="bulk_host_ids" ng-value="errataActionFormValues.bulkHostIds"/>
22
22
  <input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
23
23
  <input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
24
24
  <input type="hidden" name="install_all" ng-value="table.allResultsSelected" />
@@ -132,4 +132,3 @@
132
132
  </button>
133
133
  </form>
134
134
  </section>
135
-
@@ -5,11 +5,13 @@ namespace :katello do
5
5
  task :remove_ostree_puppet_content => ["environment", "check_ping"] do
6
6
  contents = Katello::Content.where(content_type: ['ostree', 'puppet'])
7
7
  contents.each do |content|
8
- Katello::Resources::Candlepin::Content.destroy(content.organization.label, content.cp_content_id)
8
+ unless content.products.any?(&:redhat?)
9
+ Katello::Resources::Candlepin::Content.destroy(content.organization.label, content.cp_content_id)
10
+ content.destroy
11
+ end
9
12
  rescue RestClient::NotFound
10
13
  #skip content not found
11
14
  end
12
- contents.destroy_all
13
15
  end
14
16
  end
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.1.3".freeze
2
+ VERSION = "4.1.4".freeze
3
3
  end
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: 4.1.3
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-20 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -126,16 +126,16 @@ dependencies:
126
126
  name: dynflow
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "<"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.2.0
131
+ version: 1.6.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "<"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.2.0
138
+ version: 1.6.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: activerecord-import
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -5100,7 +5100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
5100
5100
  - !ruby/object:Gem::Version
5101
5101
  version: '0'
5102
5102
  requirements: []
5103
- rubygems_version: 3.1.2
5103
+ rubygems_version: 3.1.6
5104
5104
  signing_key:
5105
5105
  specification_version: 4
5106
5106
  summary: Content and Subscription Management plugin for Foreman