Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP] Katello 4.9.2 #10726

Merged
merged 27 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
52146d1
Fixes #36577 - Filter gets applied to all the repository upon removal…
sjha4 Jul 19, 2023
205545a
Fixes #36497 - Allow unsetting GPG and SSL keys (#10593)
evgeni Jun 9, 2023
b3b522e
Fixes #36506 - allow installable errata counts in safe mode
snagoor Jun 15, 2023
75d7727
Fixes #36500 - Optimize DockerMetaTag query and CV version deletion t…
sjha4 Jul 20, 2023
6f875c6
Fixes #36593 - Repository details page shouldn't say 'enabled by defa…
sjha4 Aug 2, 2023
f1b299e
Fixes #36430 - Get arch restriction data from root, not repositories …
jeremylenz Jun 2, 2023
b473fc8
Fixes #36504 - use assign_single_environment in bulk action (#10615)
jeremylenz Jun 16, 2023
5e954e5
Fixes #36498 - Don't try to unset a host's CV/LCE when inheriting fro…
jeremylenz Jun 16, 2023
39f269d
Fixes #36440 - Redefine #attributes= to hijack old content facet attr…
jeremylenz Jun 16, 2023
75d7458
Fixes #36462 - check for presence of content facet before assigning C…
jeremylenz Jun 16, 2023
0a4e609
Fixes #36516 - Add trailing / to CV RPM search autocomplete endpoint …
lumarel Jun 20, 2023
fd02f22
Fixes #36526 - Add banners warning about katello-agent removal (#10626)
jeremylenz Jun 23, 2023
9b4f1df
Refs #36526 - remove duplicate banners from applicable and installed …
jeremylenz Jul 5, 2023
6fddd0b
Fixes #36521 - raise an error with invalid manifest
lfu Jun 20, 2023
a71b9c2
Fixes #36523 - Optimized capsule sync doesn't sync recently published…
sjha4 Jun 30, 2023
2e82d83
Fixes #36528 - handle integer hash keys in katello-agent actions (#10…
jeremylenz Jun 30, 2023
2cb718e
Fixes #36524 - RegistrationManager expects an array for content_view_…
lfu Jun 29, 2023
52a75f8
Fixes #36562 - Clear RootRepo checksum if on_demand repo
sayan3296 Jun 30, 2023
60f0834
Fixes #36601 - Error when autoprovision/provision for a discovered host
stejskalleos Jul 18, 2023
ff6dedc
Fixes #36608 - Fix customizing discovered hosts / use safe navigation…
jeremylenz Aug 2, 2023
71f3df2
Fixes #36625 - allow verify checksum for all repo types
ianballou Jul 31, 2023
809ee05
Fixes #36631 - add file:// to ACS path types
ianballou Aug 2, 2023
c6d2efc
Fixes #36622 - Mark needs_publish after reindexing (#10668)
sjha4 Aug 2, 2023
47fac47
Fixes #36684 - allow single_content_view in ContentFacet::Jail (#10699)
evgeni Aug 16, 2023
9740780
Fixes #36667 - Hammer should fail non-existent LCE in host update
lfu Aug 10, 2023
caf3ad9
Fixes #36552 - Update PermissionDenied snapshots (#10633)
MariaAga Aug 25, 2023
9dabc81
Release 4.9.2
wbclark Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 55 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,64 @@
# 4.9.2 (2023-09-27)

## Bug Fixes

### Content Views
* undefined method '#single_content_view' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet) (Safemode::NoMethodError) ([#36684](https://projects.theforeman.org/issues/36684), [05690632](https://github.com/Katello/katello.git/commit/05690632cb3d0a501192c6e645fa6ee4466de187))
* Re-synchronizing the repository whose sync had failed earlier, the Content View does not display new upgradable packages that are available. ([#36622](https://projects.theforeman.org/issues/36622), [4e3d804e](https://github.com/Katello/katello.git/commit/4e3d804e104098e5f1b6c604ff55aeb01f9db971))
* Filter gets applied to all the repository upon removal of repository for which the filter was created. ([#36577](https://projects.theforeman.org/issues/36577), [49a55b14](https://github.com/Katello/katello.git/commit/49a55b142600866ac9e384b4230e91a7c2e03960))
* Content View comparison - RPM packages search missing auto completion ([#36516](https://projects.theforeman.org/issues/36516), [76fdd41f](https://github.com/Katello/katello.git/commit/76fdd41fcf9f8650cf188612cd5cecc7d41125c7))

### Hosts
* Hammer accepts non-existent LCE in host update ([#36667](https://projects.theforeman.org/issues/36667), [05b73f70](https://github.com/Katello/katello.git/commit/05b73f708fbebf6a5118da91dd75f888d9432605))
* Errors due to lack of safe navigation when you try to customize a discovered host ([#36608](https://projects.theforeman.org/issues/36608), [5f1e74d2](https://github.com/Katello/katello.git/commit/5f1e74d27e40b429a9ba8f81307e7554cf5dc244))
* Error when autoprovision/provision for a discovered host ([#36601](https://projects.theforeman.org/issues/36601), [e834c88d](https://github.com/Katello/katello.git/commit/e834c88d8a8cb95bd24d6bc2de6ec0d7054aae62))
* undefined method `each' for #<Katello::ContentViewEnvironment when running hammer host subscription register ([#36524](https://projects.theforeman.org/issues/36524), [f579e498](https://github.com/Katello/katello.git/commit/f579e4989f92f66c30608eac3c6d6426e6aa6dbe))
* undefined method `content_view=' for #<Katello::Host::ContentFacet:0x00007fc530855ac8> ([#36504](https://projects.theforeman.org/issues/36504), [ccd234ac](https://github.com/Katello/katello.git/commit/ccd234acfa7c7294f036d3904b01ca74aed9a985))
* Editing a host results in an error "content_view_id and lifecycle_environment_id must be provided together" ([#36498](https://projects.theforeman.org/issues/36498), [08941da7](https://github.com/Katello/katello.git/commit/08941da7038f16286688e237824560442f8afb54))
* Can't add hostgroup to new host ([#36462](https://projects.theforeman.org/issues/36462), [2fdd82af](https://github.com/Katello/katello.git/commit/2fdd82af41cb95ea54b48a59f535ab0e40af6436))
* hammer host update fails with "unknown attribute ‘content_view_id’ for Katello::Host::ContentFacet" when you pass a content view / LCE ([#36440](https://projects.theforeman.org/issues/36440), [0a200518](https://github.com/Katello/katello.git/commit/0a200518702c6d87ade221a030701dfe6e8cab22))
* Arch restriction label missing from Repository sets for repos without URL ([#36430](https://projects.theforeman.org/issues/36430), [338eb1db](https://github.com/Katello/katello.git/commit/338eb1dbe72be020ea02bc088afed2e3607aacfc))

### Alternate Content Sources
* Custom ACS path help text is missing file:// ([#36631](https://projects.theforeman.org/issues/36631), [9b68b005](https://github.com/Katello/katello.git/commit/9b68b005185e0c9fe421d49a5961bb6a3239dc0e))

### Repositories
* hammer- allow user to run Verify Content Checksum, on container repositories. ([#36625](https://projects.theforeman.org/issues/36625), [03101039](https://github.com/Katello/katello.git/commit/031010390a8b089377c6ecff51f69548b0ea1685))
* Repository details page shouldn't say 'enabled by default' ([#36593](https://projects.theforeman.org/issues/36593), [6b1d742c](https://github.com/Katello/katello.git/commit/6b1d742c9d8ec2ee40efba1c9bdacd5683678beb))
* Upgrade to Katello 4.5 can fail if some on_demand repositories have checksum_type set ([#36562](https://projects.theforeman.org/issues/36562), [f0ab69db](https://github.com/Katello/katello.git/commit/f0ab69db3927014c5e570366162d8bbb1fbc6044))
* Optimize DockerMetaTag query and CV version deletion to run a single invocation of the method. ([#36500](https://projects.theforeman.org/issues/36500), [6077a1ec](https://github.com/Katello/katello.git/commit/6077a1ecf4221470fe3eaadbf6822477bf6ee707))
* Can't remove GPG and SSL Keys from existing Product using the API ([#36497](https://projects.theforeman.org/issues/36497), [5dc7382e](https://github.com/Katello/katello.git/commit/5dc7382e8b9abe55847b67558af7405e8a59468b))

### Web UI
* Update PermissionDenied snapshots ([#36552](https://projects.theforeman.org/issues/36552), [1b149653](https://github.com/Katello/katello.git/commit/1b149653ba1c62a4473595b0a810d14f27c351a7))

### Client/Agent
* tasks Actions::Katello::BulkAgentAction without any sub-plans and stuck in running/pending ([#36528](https://projects.theforeman.org/issues/36528), [f9bf7d00](https://github.com/Katello/katello.git/commit/f9bf7d0065c55e202275de84b9c69b5ebbca9ed0))

### Foreman Proxy Content
* Optimized capsule sync doesn't sync recently published/promoted docker repositories ([#36523](https://projects.theforeman.org/issues/36523), [1429ec99](https://github.com/Katello/katello.git/commit/1429ec99c7916a6954fda50040397eb1f0142d6a))

### Inter Server Sync
* hammer content import fails with undefined method `substitutor' for nil:NilClass during import content if product being imported is not covered by subscriptions on the manifest ([#36521](https://projects.theforeman.org/issues/36521), [58dcb484](https://github.com/Katello/katello.git/commit/58dcb484f07c16b033d238b57f3e77206b02f3f9))

### Errata Management
* Allow installable errata count methods ([#36506](https://projects.theforeman.org/issues/36506), [f3dba82d](https://github.com/Katello/katello.git/commit/f3dba82d5f35f679c0f7906cf07e211a716b6785))

# 4.9.1 (2023-07-20)

## Bug Fixes

### Web UI
* Fix lint errors ([#36609](https://projects.theforeman.org/issues/36609), [ecfb84a0](https://github.com/Katello/katello.git/commit/ecfb84a04a724fd5c906961a0a1dbd6247497065))

### Subscriptions
* Reasons for not deleting the manifest don't apply with SCA enabled ([#36604](https://projects.theforeman.org/issues/36604), [1896c347](https://github.com/Katello/katello.git/commit/1896c34786d4ebdc8a4dc7027bb33dc3242da0ee))

### Tests
* Pin ostree binding on nightly for tests to pass. ([#36586](https://projects.theforeman.org/issues/36586), [ba8eb2ae](https://github.com/Katello/katello.git/commit/ba8eb2ae61121065e80b9511bac0bd1ad5a3b049))

### Content Views
* hammer content-view version info --include-applied-filters true should display rules ([#36585](https://projects.theforeman.org/issues/36585), [05ef2c83](https://github.com/Katello/hammer-cli-katello.git/commit/05ef2c83a5bd102049b827ad3ad06acf2b4c478f))
* Hammer should treat indeterminate needs_publish as publish_needed. ([#36581](https://projects.theforeman.org/issues/36581), [945e2e7f](https://github.com/Katello/katello.git/commit/945e2e7f628fb9752e5ae79fc71a2234b71257ad))
* Content view dependency solving should be tracked for needs_publish ([#36580](https://projects.theforeman.org/issues/36580), [d1a991e9](https://github.com/Katello/katello.git/commit/d1a991e96a66171708907b936827d0902d5d97b4))
* CV page needs refresh to get the current filters state ([#36529](https://projects.theforeman.org/issues/36529), [009f5c64](https://github.com/Katello/katello.git/commit/009f5c64ae900957b9f895e725815561139a213f))
Expand Down Expand Up @@ -86,7 +136,7 @@
* User with "Register Hosts" role ignores all the setup options. ([#36484](https://projects.theforeman.org/issues/36484), [56417cc7](https://github.com/Katello/katello.git/commit/56417cc7ef61b436a4ab95bfcdb7e8c82a8562a6))
* Installable updates links on the hosts page still link to the old content host detail page. ([#36254](https://projects.theforeman.org/issues/36254), [38d1581e](https://github.com/Katello/katello.git/commit/38d1581ece23303b443fe10feede7a88979bd911))
* Add export definitions for columns ([#36132](https://projects.theforeman.org/issues/36132), [930847cf](https://github.com/Katello/katello.git/commit/930847cf62243afa1448f752ab4cb7480d9b5ffd))
* Package upgradable versions are not set correctly based on architecture ([#36100](https://projects.theforeman.org/issues/36100), [449e3197](https://github.com/Katello/katello.git/commit/449e319762f962c33dafd8b123f3f7f1d9feb1f5))
* Package upgradable versions are not set correctly based on architecture ([#36100](https://projects.theforeman.org/issues/36100), [449e3197](https://github.com/Katello/katello.git/commit/449e319762f962c33dafd8b123f3f7f1d9feb1f5), [7fa589c0](https://github.com/Katello/katello.git/commit/7fa589c085080b2aad1f116e94faa67793e0c33c))
* Link from host collections and Errata page should go to new host details page ([#36095](https://projects.theforeman.org/issues/36095), [c1529496](https://github.com/Katello/katello.git/commit/c1529496a3cf5b3f1554174492c34dbc343a2d02))
* Setting a Content Source is not persistent ([#35834](https://projects.theforeman.org/issues/35834), [2de0d704](https://github.com/Katello/katello.git/commit/2de0d7043d5825cf660318eeb931fc83f124e7c4))
* Global registration form needs call-to-action link when there are no activation keys created ([#35310](https://projects.theforeman.org/issues/35310), [df619076](https://github.com/Katello/katello.git/commit/df619076961a7cadcedac56d43bf2fc223f92a39))
Expand Down Expand Up @@ -122,10 +172,6 @@
* Refine empty states for CV UI ([#36204](https://projects.theforeman.org/issues/36204), [052ed6b7](https://github.com/Katello/katello.git/commit/052ed6b7a734e47523ac0751625571c63615cb51))
* Columns are overlapping while adding columns through "Manage columns" tab in "All Hosts" - katello edition ([#36172](https://projects.theforeman.org/issues/36172), [3746b037](https://github.com/Katello/katello.git/commit/3746b0372da77f9547ff47f4bd982aea2753c93f))

### Hammer
* hammer host info no longer shows content view and lifecycle environment ([#36401](https://projects.theforeman.org/issues/36401), [85e4eaea](https://github.com/Katello/katello.git/commit/85e4eaea613dd001d7f6f8975ef6990c26e4b1a9), [94b39e09](https://github.com/Katello/hammer-cli-katello.git/commit/94b39e092ae176849b992cde4d9263392757fed7))
* Suppress 'Nothing to update' message when toggling SCA ([#36198](https://projects.theforeman.org/issues/36198), [c644dd65](https://github.com/Katello/hammer-cli-katello.git/commit/c644dd65f97c6c052dd0b73140abaf3e387b23bb))

### Subscriptions
* Test Candlepin 4.3.1 and tag to nightly ([#36287](https://projects.theforeman.org/issues/36287), [77440f96](https://github.com/Katello/katello.git/commit/77440f96751650710a95184516862eda951d3fa0))
* Add simple-content-access param to organization update command ([#36197](https://projects.theforeman.org/issues/36197), [2b70c9d6](https://github.com/Katello/katello.git/commit/2b70c9d6495d6207f52ce333bc85686a21195856))
Expand All @@ -140,6 +186,10 @@
### Tests
* Re-record VCR cassettes once artifact structure is reverted in pulp_rpm 3.19 ([#36205](https://projects.theforeman.org/issues/36205), [b1c6db3b](https://github.com/Katello/katello.git/commit/b1c6db3ba7d27707f8e7898cf22eb105c150088e))

### Hammer
* Suppress 'Nothing to update' message when toggling SCA ([#36198](https://projects.theforeman.org/issues/36198), [c644dd65](https://github.com/Katello/hammer-cli-katello.git/commit/c644dd65f97c6c052dd0b73140abaf3e387b23bb))
* hammer host info no longer shows content view and lifecycle environment ([#36401](https://projects.theforeman.org/issues/36401), [85e4eaea](https://github.com/Katello/katello.git/commit/85e4eaea613dd001d7f6f8975ef6990c26e4b1a9), [94b39e09](https://github.com/Katello/hammer-cli-katello.git/commit/94b39e092ae176849b992cde4d9263392757fed7))

### Errata Management
* Improve errata installation templates ([#36075](https://projects.theforeman.org/issues/36075), [c9c15fac](https://github.com/Katello/katello.git/commit/c9c15fac7fbdb39ab72ffd49c178eb047990bb38))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def destroy
def create
rhsm_params = params_to_rhsm_params

host = Katello::RegistrationManager.process_registration(rhsm_params, @content_view_environment)
host = Katello::RegistrationManager.process_registration(rhsm_params, [@content_view_environment])
host.reload
::Katello::Host::SubscriptionFacet.update_facts(host, rhsm_params[:facts]) unless rhsm_params[:facts].blank?

Expand Down
8 changes: 4 additions & 4 deletions app/controllers/katello/api/v2/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class Api::V2::ProductsController < Api::V2::ApiController

def_param_group :product do
param :description, String, :desc => N_("Product description")
param :gpg_key_id, :number, :desc => N_("Identifier of the GPG key")
param :ssl_ca_cert_id, :number, :desc => N_("Idenifier of the SSL CA Cert")
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert")
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key")
param :gpg_key_id, :number, :desc => N_("Identifier of the GPG key"), :allow_nil => true
param :ssl_ca_cert_id, :number, :desc => N_("Idenifier of the SSL CA Cert"), :allow_nil => true
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert"), :allow_nil => true
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key"), :allow_nil => true
param :sync_plan_id, :number, :desc => N_("Plan numeric identifier"), :allow_nil => true
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Api::V2::RepositoriesBulkActionsController < Api::V2::ApiController
def destroy_repositories
deletion_authorized_repositories = @repositories.deletable
unpromoted_repos = deletion_authorized_repositories.reject { |repo| repo.promoted? && repo.content_views.generated_for_none.exists? }

unpromoted_repos_non_last_affected_repo = unpromoted_repos.reject { |repo| repo.filters.any? { |filter| filter.repositories.size == 1 } }
messages1 = format_bulk_action_messages(
:success => "",
:error => _("You do not have permissions to delete %s"),
Expand All @@ -17,16 +17,23 @@ def destroy_repositories

messages2 = format_bulk_action_messages(
:success => "",
:error => _("Repository %s cannot be deleted since it has already been included in a published Content View."),
:error => _("Repository %s cannot be deleted since it has already been included in a published Content View. Use repository details page to delete"),
:models => deletion_authorized_repositories,
:authorized => unpromoted_repos
)

errors = messages1[:error] + messages2[:error]
messages3 = format_bulk_action_messages(
:success => "",
:error => _("Repository %s cannot be deleted since it is the last affected repository in a filter. Use repository details page to delete."),
:models => unpromoted_repos,
:authorized => unpromoted_repos_non_last_affected_repo
)

errors = messages1[:error] + messages2[:error] + messages3[:error]

task = nil
if unpromoted_repos.any?
task = async_task(::Actions::BulkAction, ::Actions::Katello::Repository::Destroy, unpromoted_repos)
if unpromoted_repos_non_last_affected_repo.any?
task = async_task(::Actions::BulkAction, ::Actions::Katello::Repository::Destroy, unpromoted_repos_non_last_affected_repo)
else
status = 400
end
Expand Down
17 changes: 10 additions & 7 deletions app/controllers/katello/api/v2/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ def custom_index_relation(collection)

def_param_group :repo do
param :url, String, :desc => N_("repository source url")
param :os_versions, Array,
:desc => N_("Identifies whether the repository should be disabled on a client with a non-matching OS version. Pass [] to enable regardless of OS version. Maximum length 1; allowed tags are: %s") % Katello::RootRepository::ALLOWED_OS_VERSIONS.join(', ')
param :gpg_key_id, :number, :desc => N_("id of the gpg key that will be assigned to the new repository")
param :ssl_ca_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL CA Cert")
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Cert")
param :ssl_client_key_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Key")
param :os_versions, Array, :desc => N_("Identifies whether the repository should be unavailable on a client with a non-matching OS version.
Pass [] to make repo available for clients regardless of OS version. Maximum length 1; allowed tags are: %s") % Katello::RootRepository::ALLOWED_OS_VERSIONS.join(', ')
param :gpg_key_id, :number, :desc => N_("id of the gpg key that will be assigned to the new repository"), :allow_nil => true
param :ssl_ca_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL CA Cert"), :allow_nil => true
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Cert"), :allow_nil => true
param :ssl_client_key_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Key"), :allow_nil => true
param :unprotected, :bool, :desc => N_("true if this repository can be published via HTTP")
param :checksum_type, String, :desc => N_("Checksum of the repository, currently 'sha1' & 'sha256' are supported")
param :docker_upstream_name, String, :desc => N_("Name of the upstream docker repository")
Expand Down Expand Up @@ -416,9 +416,12 @@ def update
api :DELETE, "/repositories/:id", N_("Destroy a custom repository")
param :id, :number, :required => true
param :remove_from_content_view_versions, :bool, :required => false, :desc => N_("Force delete the repository by removing it from all content view versions")
param :delete_empty_repo_filters, :bool, :required => false, :desc => N_("Delete content view filters that have this repository as the last associated repository. Defaults to true. If false, such filters will now apply to all repositories in the content view.")
def destroy
sync_task(::Actions::Katello::Repository::Destroy, @repository,
remove_from_content_view_versions: ::Foreman::Cast.to_bool(params.fetch(:remove_from_content_view_versions, false)))
remove_from_content_view_versions: ::Foreman::Cast.to_bool(params.fetch(:remove_from_content_view_versions, false)),
delete_empty_repo_filters: ::Foreman::Cast.to_bool(params.fetch(:delete_empty_repo_filters, true))
)
respond_for_destroy
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ module ContentFacetHostsControllerExtensions
before_action :set_up_content_view_environment, only: [:update]

def set_up_content_view_environment
return unless params[:host] && params[:host][:content_facet_attributes]
return unless @host&.content_facet.present? && params[:host]&.[](:content_facet_attributes)&.present?
cv_id = params[:host][:content_facet_attributes].delete(:content_view_id)
env_id = params[:host][:content_facet_attributes].delete(:lifecycle_environment_id)
Rails.logger.info "set_up_content_view_environment: cv_id=#{cv_id}, env_id=#{env_id}"
if (cv_id.present? && env_id.present?)
@host.content_facet.assign_single_environment(
lifecycle_environment_id: env_id,
content_view_id: cv_id
)
Rails.logger.info "set_up_content_view_environment: done"
end
Rails.logger.info "#{__method__}: cv_id=#{cv_id}, env_id=#{env_id}"
@host.content_facet.assign_single_environment(
lifecycle_environment_id: env_id,
content_view_id: cv_id
)
Rails.logger.info "#{__method__}: done"
end
end
end
Expand Down
Loading
Loading