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

Re-add EmbeddedAnsible::ConfiguredSystem#ext_management_system #18883

Conversation

NickLaMuro
Copy link
Member

@NickLaMuro NickLaMuro commented Jun 18, 2019

This was removed as part of 63be848 when decoupling EmbeddedAnsible from the AnsibleTower::Shared code, however, this method is needed when going to:

Configuration -> Management

In the UI. For now, just adding this method back in to fix things up and unblock others, but some tests along with a evaluation of the other methods not brought over should be done to determine if those methods are needed should be done as well.

Links

Steps for Testing/QA

Note: Currently unsure how to recreate, and the below were just a thought (seems to not work). Will circle back and update these steps once I find out what needs to be done to replicate the issue.

On a master appliance:

  1. Enable the EmbeddedAnsible role
  2. Wait for everything to be seeded (you should be able to add a repository in Automation -> Ansible -> Repository when everything has been seeded)
  3. Head to Configuration -> Management

On master (without this fix) this will cause the following error:

[----] F, [2000-00-00T00:00:00.000000 #1111:111111] FATAL -- : Error caught: [NoMethodError] undefined method `ext_management_system' for #<ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfiguredSystem:0x00007efdcd44ce98>
[gems]/ruby-2.4.4/gems/activemodel-5.0.7.2/lib/active_model/attribute_methods.rb:433:in `method_missing'
./manageiq/lib/rbac/filterer.rb:707:in `block in matches_via_descendants'
[gems]/ruby-2.4.4/gems/activerecord-5.0.7.2/lib/active_record/relation/delegation.rb:38:in `each'
[gems]/ruby-2.4.4/gems/activerecord-5.0.7.2/lib/active_record/relation/delegation.rb:38:in `each'
./manageiq/lib/rbac/filterer.rb:707:in `flat_map'
./manageiq/lib/rbac/filterer.rb:707:in `matches_via_descendants'
./manageiq/lib/rbac/filterer.rb:489:in `calc_filtered_ids'
./manageiq/lib/rbac/filterer.rb:640:in `scope_targets'
./manageiq/lib/rbac/filterer.rb:265:in `search'
./manageiq/lib/rbac/filterer.rb:147:in `search'
...

With this fix, it should render the page just fine.

This was removed as part of 63be848 when decoupling EmbeddedAnsible
from the AnsibleTower::Shared code, however, this method is needed when
going to:

    Configuration -> Management

In the UI.  For now, just adding this method back in to fix things up
and unblock others, but some tests along with a evaluation of the other
methods not brought over should be done to determine if those methods
are needed should be done as well.
@NickLaMuro NickLaMuro changed the title Readd EmbeddedAnsible::ConfiguredSystem#ext_management_system Re-add EmbeddedAnsible::ConfiguredSystem#ext_management_system Jun 18, 2019
@miq-bot
Copy link
Member

miq-bot commented Jun 18, 2019

Checked commit NickLaMuro@a792d23 with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@carbonin carbonin self-assigned this Jun 18, 2019
@carbonin carbonin merged commit 3a48eca into ManageIQ:master Jun 18, 2019
@carbonin carbonin added this to the Sprint 114 Ending Jun 24, 2019 milestone Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants