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

Ansible service - rescue from Ansible role disabled exception #2628

Merged
merged 1 commit into from
Nov 3, 2017
Merged

Ansible service - rescue from Ansible role disabled exception #2628

merged 1 commit into from
Nov 3, 2017

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Nov 3, 2017

Opening a service detail if the service is related to Ansible, and the server has no embedded ansible role dies with..

I, [2017-11-03T19:56:54.395297 #25106]  INFO -- :   Rendered /home/martin/Projects/manageiq-ui-classic/app/views/service/_svcs_show.html.haml (1167.0ms)
F, [2017-11-03T19:56:54.395613 #25106] FATAL -- : Error caught: [ActionView::Template::Error] Embedded ansible is disabled
/home/martin/Projects/manageiq/app/models/manageiq/providers/embedded_ansible/provider.rb:14:in `raw_connect'
/home/martin/.rvm/gems/ruby-2.3.3/bundler/gems/manageiq-providers-ansible_tower-6426bea65f1b/app/models/manageiq/providers/ansible_tower/shared/provider.rb:41:in `connect'
/home/martin/Projects/manageiq/app/models/provider.rb:49:in `with_provider_connection'
/home/martin/.rvm/gems/ruby-2.3.3/bundler/gems/manageiq-providers-ansible_tower-6426bea65f1b/app/models/manageiq/providers/ansible_tower/shared/automation_manager.rb:5:in `with_provider_connection'
/home/martin/.rvm/gems/ruby-2.3.3/bundler/gems/manageiq-providers-ansible_tower-6426bea65f1b/app/models/manageiq/providers/ansible_tower/shared/automation_manager/job.rb:139:in `raw_stdout'
/home/martin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:17:in `public_send'
/home/martin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:17:in `try!'
/home/martin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:6:in `try'
/home/martin/Projects/manageiq-ui-classic/app/views/service/_svcs_show.html.haml:39:in `block in __home_martin__rojects_manageiq_ui_classic_app_views_service__svcs_show_html_haml___1096271421441941554_6999664174
5020'

Pending the resolution of #2470, this is a quick fix that hides the offending portion instead of failing.

@martinpovolny I can't test this right now, can you? :)

@martinpovolny martinpovolny self-assigned this Nov 3, 2017
@martinpovolny martinpovolny added this to the Sprint 73 Ending Nov 13, 2017 milestone Nov 3, 2017
@miq-bot
Copy link
Member

miq-bot commented Nov 3, 2017

Checked commit https://github.com/himdel/manageiq-ui-classic/commit/21cb974d13f58d7a178aa1ab9217410c9291541c with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 1 offense detected

app/views/service/_svcs_show.html.haml

  • ⚠️ - Line 39 - Avoid using rescue in its modifier form.

@martinpovolny martinpovolny merged commit 7d26ae8 into ManageIQ:master Nov 3, 2017
simaishi pushed a commit that referenced this pull request Nov 3, 2017
Ansible service - rescue from Ansible role disabled exception
(cherry picked from commit 7d26ae8)
@simaishi
Copy link
Contributor

simaishi commented Nov 3, 2017

Gaprindashvili backport details:

$ git log -1
commit 60d0b51a0d0b20ee359d6dc604246c0cfeec8b98
Author: Martin Povolny <[email protected]>
Date:   Fri Nov 3 21:16:37 2017 +0100

    Merge pull request #2628 from himdel/fix-ansible-raw
    
    Ansible service - rescue from Ansible role disabled exception
    (cherry picked from commit 7d26ae8268ecfd876386f2d946481e318c1755b9)

@simaishi
Copy link
Contributor

simaishi commented Nov 3, 2017

@himdel himdel deleted the fix-ansible-raw branch November 9, 2017 13:47
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.

4 participants