Fixes #32599 - prevent to read facts without permissions #2076
Annotations
10 errors
Run rake test:katello:
katello/test/models/host/subscription_facet_test.rb#L672
Failure: test_update_foreman_facts_with_no_centos_different_major_and_no_minor_version
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/test/models/host/subscription_facet_test.rb:225:in `test_update_foreman_facts_with_no_centos_different_major_and_no_minor_version'
|
Run rake test:katello:
katello/test/models/host/subscription_facet_test.rb#L672
Failure: test_update_foreman_facts_with_os_version
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/test/models/host/subscription_facet_test.rb:245:in `test_update_foreman_facts_with_os_version'
|
Run rake test:katello:
katello/test/models/host/subscription_facet_test.rb#L672
Failure: test_update_foreman_facts_without_distribution_version
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/test/models/host/subscription_facet_test.rb:257:in `test_update_foreman_facts_without_distribution_version'
|
Run rake test:katello:
katello/test/models/host/subscription_facet_test.rb#L672
Failure: test_update_facts_with_centos_no_minor_version
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/test/models/host/subscription_facet_test.rb:212:in `test_update_facts_with_centos_no_minor_version'
|
Run rake test:katello:
katello/test/models/host/subscription_facet_test.rb#L672
Failure: test_update_foreman_facts
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/test/models/host/subscription_facet_test.rb:201:in `test_update_foreman_facts'
|
Run rake test:katello:
katello/test/actions/katello/host/hypervisors_update_test.rb#L140
Failure: test_existing_hypervisor_renamed
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:181:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:32:in `block (2 levels) in run'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `each'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `block in run'
app/models/concerns/foreman/thread_session.rb:108:in `as'
app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
katello/app/lib/actions/katello/host/hypervisors_update.rb:18:in `run'
katello/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
katello/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
katello/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
katello/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
katello/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
katello/app/lib/actions/middleware/remote_action.rb:16:in `run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
katello/test/actions/katello/host/hypervisors_update_test.rb:141:in `block in test_existing_hypervisor_renamed'
katello/test/actions/katello/host/hypervisors_update_test.rb:140:in `test_existing_hypervisor_renamed'
|
Run rake test:katello:
katello/test/actions/katello/host/hypervisors_update_test.rb#L29
Failure: test_existing_hypervisor_no_facet
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:181:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:32:in `block (2 levels) in run'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `each'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `block in run'
app/models/concerns/foreman/thread_session.rb:108:in `as'
app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
katello/app/lib/actions/katello/host/hypervisors_update.rb:18:in `run'
katello/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
katello/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
katello/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
katello/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
katello/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
katello/app/lib/actions/middleware/remote_action.rb:16:in `run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
katello/test/actions/katello/host/hypervisors_update_test.rb:125:in `test_existing_hypervisor_no_facet'
|
Run rake test:katello:
katello/test/actions/katello/host/hypervisors_update_test.rb#L29
Failure: test_handle_new_hypervisor
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:181:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:32:in `block (2 levels) in run'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `each'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `block in run'
app/models/concerns/foreman/thread_session.rb:108:in `as'
app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
katello/app/lib/actions/katello/host/hypervisors_update.rb:18:in `run'
katello/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
katello/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
katello/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
katello/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
katello/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
katello/app/lib/actions/middleware/remote_action.rb:16:in `run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
katello/test/actions/katello/host/hypervisors_update_test.rb:56:in `test_handle_new_hypervisor'
|
Run rake test:katello:
katello/test/actions/katello/host/hypervisors_update_test.rb#L29
Failure: test_update_guests_hypervisor
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
katello/app/models/katello/host/subscription_facet.rb:212:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:181:in `update_facts'
katello/app/lib/actions/katello/host/hypervisors_update.rb:32:in `block (2 levels) in run'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `each'
katello/app/lib/actions/katello/host/hypervisors_update.rb:31:in `block in run'
app/models/concerns/foreman/thread_session.rb:108:in `as'
app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
katello/app/lib/actions/katello/host/hypervisors_update.rb:18:in `run'
katello/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
katello/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
katello/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
katello/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
katello/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
katello/app/lib/actions/middleware/remote_action.rb:16:in `run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
foreman-tasks (10.0.0) app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
katello/test/actions/katello/host/hypervisors_update_test.rb:86:in `test_update_guests_hypervisor'
|
Run rake test:katello:
katello/test/actions/katello/host/hypervisors_test.rb#L56
Failure: test_duplicate_hostname
RuntimeError: Neutered Exception ForemanTasks::TaskError: Task 18e8460d-3232-4007-b7b8-ecd3bec312c5: ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
foreman-tasks (10.0.0) lib/foreman_tasks.rb:56:in `block in sync_task'
foreman-tasks (10.0.0) lib/foreman_tasks.rb:55:in `sync_task'
katello/test/actions/katello/host/hypervisors_test.rb:75:in `test_duplicate_hostname'
katello/test/support/vcr.rb:24:in `block in run'
katello/test/support/vcr.rb:23:in `run'
|
Loading