katello 3.14.0 → 3.14.1
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/activation_keys_controller.rb +1 -7
- data/app/lib/actions/candlepin/activation_key/create.rb +4 -0
- data/app/lib/actions/katello/activation_key/create.rb +3 -1
- data/app/lib/katello/resources/candlepin/activation_key.rb +13 -2
- data/app/lib/katello/resources/candlepin/product.rb +6 -2
- data/app/lib/katello/util/support.rb +2 -2
- data/app/models/katello/rhsm_fact_parser.rb +1 -1
- data/app/services/katello/candlepin/consumer.rb +4 -0
- data/app/services/katello/event_daemon.rb +5 -3
- data/app/services/katello/pulp/repository/yum.rb +1 -2
- data/engines/bastion/README.md +2 -2
- data/lib/katello/version.rb +1 -1
- data/webpack/redux/actions/RedHatRepositories/__tests__/enabled.test.js +9 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40ea2dd0117ec5d25205f3868df5ebcb700767dcc7a6eda96f6aa2c30c0c7da3
|
4
|
+
data.tar.gz: 2084af6536db98b8525ec9c790bd00b8c3186897a469716d4bf2b52b36057ae0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38b703df376f2b4dadbbbfc64aac8a399de28e4cb39762bffd6c3d126dc110f89e7b1bb6ea9d925e31b8ee33ea72386ba3db2e47ce18e5830b764eb663d49d46
|
7
|
+
data.tar.gz: 38234d68e96fd389181b11533e1705b3558b0fa4bd198a37da14ddea4074511d06e5698d6f9bd6611065500d49a4bfcd3bb411fbc33e7c4c6cb7e2a25c85ad44
|
@@ -49,15 +49,9 @@ module Katello
|
|
49
49
|
activation_key.organization = @organization
|
50
50
|
activation_key.user = current_user
|
51
51
|
end
|
52
|
-
sync_task(::Actions::Katello::ActivationKey::Create, @activation_key)
|
52
|
+
sync_task(::Actions::Katello::ActivationKey::Create, @activation_key, service_level: activation_key_params['service_level'])
|
53
53
|
@activation_key.reload
|
54
54
|
|
55
|
-
sync_task(::Actions::Katello::ActivationKey::Update, @activation_key,
|
56
|
-
:service_level => activation_key_params[:service_level],
|
57
|
-
:release_version => activation_key_params[:release_version],
|
58
|
-
:auto_attach => activation_key_params[:auto_attach]
|
59
|
-
)
|
60
|
-
|
61
55
|
respond_for_create(:resource => @activation_key)
|
62
56
|
end
|
63
57
|
|
@@ -4,6 +4,8 @@ module Actions
|
|
4
4
|
input_format do
|
5
5
|
param :organization_label
|
6
6
|
param :auto_attach
|
7
|
+
param :service_level
|
8
|
+
param :release_version
|
7
9
|
param :purpose_role
|
8
10
|
param :purpose_usage
|
9
11
|
param :purpse_addons
|
@@ -13,6 +15,8 @@ module Actions
|
|
13
15
|
output[:response] = ::Katello::Resources::Candlepin::ActivationKey.create(::Katello::Util::Model.uuid,
|
14
16
|
input[:organization_label],
|
15
17
|
input[:auto_attach],
|
18
|
+
input[:service_level],
|
19
|
+
input[:release_version],
|
16
20
|
input[:purpose_role],
|
17
21
|
input[:purpose_usage],
|
18
22
|
input[:purpose_addons])
|
@@ -2,12 +2,14 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module ActivationKey
|
4
4
|
class Create < Actions::EntryAction
|
5
|
-
def plan(activation_key)
|
5
|
+
def plan(activation_key, params = {})
|
6
6
|
activation_key.save!
|
7
7
|
if ::SETTINGS[:katello][:use_cp]
|
8
8
|
cp_create = plan_action(Candlepin::ActivationKey::Create,
|
9
9
|
organization_label: activation_key.organization.label,
|
10
10
|
auto_attach: activation_key.auto_attach,
|
11
|
+
service_level: params[:service_level],
|
12
|
+
release_version: activation_key.release_version,
|
11
13
|
purpose_role: activation_key.purpose_role,
|
12
14
|
purpose_usage: activation_key.purpose_usage,
|
13
15
|
purpose_addons: activation_key.purpose_addons.pluck(:name))
|
@@ -10,9 +10,20 @@ module Katello
|
|
10
10
|
::Katello::Util::Data.array_with_indifferent_access akeys
|
11
11
|
end
|
12
12
|
|
13
|
-
|
13
|
+
# rubocop:disable Metrics/ParameterLists
|
14
|
+
def create(name, owner_key, auto_attach, service_level, release_version, purpose_role, purpose_usage, purpose_addons)
|
14
15
|
url = "/candlepin/owners/#{owner_key}/activation_keys"
|
15
|
-
|
16
|
+
params = {
|
17
|
+
name: name,
|
18
|
+
autoAttach: auto_attach,
|
19
|
+
serviceLevel: service_level,
|
20
|
+
releaseVer: release_version,
|
21
|
+
role: purpose_role,
|
22
|
+
usage: purpose_usage,
|
23
|
+
addOns: purpose_addons
|
24
|
+
}
|
25
|
+
response = self.post(url, params.to_json, self.default_headers)
|
26
|
+
JSON.parse(response.body).with_indifferent_access
|
16
27
|
end
|
17
28
|
|
18
29
|
# rubocop:disable Metrics/ParameterLists
|
@@ -72,8 +72,12 @@ module Katello
|
|
72
72
|
|
73
73
|
def create_unlimited_subscription(owner_key, product_id, start_date)
|
74
74
|
start_date ||= Time.now
|
75
|
-
|
76
|
-
|
75
|
+
|
76
|
+
# Subscription-manager (python-rhsm) can't read the certificate with end date beyond
|
77
|
+
# 2049 year correctly. Refer the links below for more details:
|
78
|
+
# https://bugzilla.redhat.com/show_bug.cgi?id=1789654
|
79
|
+
# https://github.com/candlepin/candlepin/blob/5b87865f304555c112982af4fbc83a1c463d37b2/server/src/main/java/org/candlepin/model/UeberCertificateGenerator.java#L247
|
80
|
+
end_date = Time.parse('2049-12-01 00:00:00 +0000')
|
77
81
|
|
78
82
|
pool = {
|
79
83
|
'startDate' => start_date,
|
@@ -78,12 +78,12 @@ module Katello
|
|
78
78
|
logger.error(e.message)
|
79
79
|
logger.error("Lost database connection. Attempting reconnect.")
|
80
80
|
|
81
|
-
active_record_retry_connect
|
81
|
+
active_record_retry_connect(logger)
|
82
82
|
|
83
83
|
retry
|
84
84
|
end
|
85
85
|
|
86
|
-
def self.active_record_retry_connect
|
86
|
+
def self.active_record_retry_connect(logger)
|
87
87
|
sleep 3
|
88
88
|
ActiveRecord::Base.connection.reconnect!
|
89
89
|
rescue
|
@@ -9,7 +9,9 @@ module Katello
|
|
9
9
|
error = nil
|
10
10
|
status = nil
|
11
11
|
loop do
|
12
|
-
|
12
|
+
Rails.application.executor.wrap do
|
13
|
+
check_services(error, status)
|
14
|
+
end
|
13
15
|
sleep 15
|
14
16
|
end
|
15
17
|
end
|
@@ -21,7 +23,7 @@ module Katello
|
|
21
23
|
rescue => error
|
22
24
|
Rails.logger.error("Error occurred while pinging #{service_class}")
|
23
25
|
Rails.logger.error(error.message)
|
24
|
-
Rails.logger.error(error.backtrace.join(
|
26
|
+
Rails.logger.error(error.backtrace.join("\n"))
|
25
27
|
ensure
|
26
28
|
if error || !status&.dig(:running)
|
27
29
|
begin
|
@@ -30,7 +32,7 @@ module Katello
|
|
30
32
|
rescue => error
|
31
33
|
Rails.logger.error("Error occurred while starting #{service_class}")
|
32
34
|
Rails.logger.error(error.message)
|
33
|
-
Rails.logger.error(error.backtrace.join(
|
35
|
+
Rails.logger.error(error.backtrace.join("\n"))
|
34
36
|
ensure
|
35
37
|
error = nil
|
36
38
|
end
|
@@ -242,8 +242,7 @@ module Katello
|
|
242
242
|
remove = clause_gen.remove_clause
|
243
243
|
remove_clauses = {filters: {unit: remove}} if remove
|
244
244
|
else
|
245
|
-
|
246
|
-
copy_clauses = non_modular_rpms.blank? ? nil : {filters: {unit: ContentViewPackageFilter.generate_rpm_clauses(non_modular_rpms)}}
|
245
|
+
copy_clauses = {}
|
247
246
|
remove_clauses = nil
|
248
247
|
end
|
249
248
|
|
data/engines/bastion/README.md
CHANGED
@@ -262,7 +262,7 @@ npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'
|
|
262
262
|
npm WARN unmet dependency undefined
|
263
263
|
```
|
264
264
|
|
265
|
-
Running `sudo npm update -g
|
265
|
+
Running `sudo npm update -g bower grunt-cli` should fix the issue.
|
266
266
|
|
267
267
|
#### Fixing Dependency Errors ####
|
268
268
|
|
@@ -277,7 +277,7 @@ version of a component has been bumped.
|
|
277
277
|
[See also *Installing a New Dependency*](#installing-a-new-dependency) as well as the related section
|
278
278
|
[*Updating a New Dependency*](#updating-a-new-dependency)
|
279
279
|
|
280
|
-
- `sudo npm update -g
|
280
|
+
- `sudo npm update -g bower grunt-cli`
|
281
281
|
- `npm install`
|
282
282
|
- `grunt bower:dev`
|
283
283
|
|
data/lib/katello/version.rb
CHANGED
@@ -2,6 +2,7 @@ import thunk from 'redux-thunk';
|
|
2
2
|
import Immutable from 'seamless-immutable';
|
3
3
|
import configureMockStore from 'redux-mock-store';
|
4
4
|
import { disableRepository, loadEnabledRepos } from '../enabled.js';
|
5
|
+
import { mock as mockApi } from '../../../../mockRequest';
|
5
6
|
import {
|
6
7
|
ENABLED_REPOSITORIES_REQUEST,
|
7
8
|
DISABLE_REPOSITORY_REQUEST,
|
@@ -14,11 +15,13 @@ describe('RedHatRepositories enabled actions', () => {
|
|
14
15
|
describe('disableRepository', () => {
|
15
16
|
it('dispatches DISABLE_REPOSITORY_REQUEST', async () => {
|
16
17
|
const mockRepo = { // don't need actual values because just checking that the action matches
|
17
|
-
productId:
|
18
|
-
contentId:
|
19
|
-
basearch:
|
20
|
-
releasever:
|
18
|
+
productId: 'some-product-id',
|
19
|
+
contentId: 'some-content-id',
|
20
|
+
basearch: 'some-base-search',
|
21
|
+
releasever: 'some-releasever',
|
21
22
|
};
|
23
|
+
mockApi.onPut(`/products/${mockRepo.productId}/repository_sets/${mockRepo.contentId}/disable`).reply(200, []);
|
24
|
+
|
22
25
|
await store.dispatch(disableRepository(mockRepo));
|
23
26
|
expect(store.getActions()).toContainEqual({
|
24
27
|
type: DISABLE_REPOSITORY_REQUEST,
|
@@ -28,6 +31,8 @@ describe('RedHatRepositories enabled actions', () => {
|
|
28
31
|
});
|
29
32
|
describe('loadEnabledRepos', () => {
|
30
33
|
it('dispatches ENABLED_REPOSITORIES_REQUEST', async () => {
|
34
|
+
mockApi.onGet('/repositories').reply(200, []);
|
35
|
+
|
31
36
|
await store.dispatch(loadEnabledRepos());
|
32
37
|
expect(store.getActions()).toContainEqual({
|
33
38
|
type: ENABLED_REPOSITORIES_REQUEST,
|
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.14.
|
4
|
+
version: 3.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|