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

Fixes #37215 - Stop reporting CV/LCE if not set to hosts #10074

Merged

Conversation

hao-yu
Copy link
Member

@hao-yu hao-yu commented Feb 29, 2024

Uses safe navigation to allow reporting on hosts without content views or lifecycle environments (virt-who hypervisors).

Steps to Reproduce:

  1. Has some hosts not associated to any content view or LCE. The satellite host entry itself should be sufficient to reproduce.
  2. Navigate to Monitor -> Report Templates -> "Ansible - Ansible Inventory" -> Click "Generate" button
  3. Set "Yes" for Content Attributes and click Generate button.

Additional info:
Similar issue to https://projects.theforeman.org/issues/37016

Safe navigation doesn't work for older safe mode, if we want to backport to older version, we need to create another PR which is similar to #10023

Copy link
Contributor

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hao-yu!

This is correct because single_content_view and single_lifecycle_environment can return nil if the content facet doesn't have any content view environments.

ACK 👍

@jeremylenz jeremylenz merged commit b6bae77 into theforeman:develop Apr 5, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants