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

Require kubeclient in connection_rescue_block #519

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 29, 2024

Ensure that the Kubeclient::HttpError exception class is loaded in the connection_rescue_block method when verifying the prometheus endpoint.

[NameError]: uninitialized constant ManageIQ::Providers::Kubernetes::ContainerManager::Kubeclient
  rescue RestClient::Unauthorized, Kubeclient::HttpError => err
ERROR -- evm: /opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-kubernetes-7e766229622c/app/models/manageiq/providers/kubernetes/container_manager.rb:596:in `rescue in connection_rescue_block'
  /opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-kubernetes-7e766229622c/app/models/manageiq/providers/kubernetes/container_manager.rb:588:in `connection_rescue_block'
  /opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-kubernetes-7e766229622c/app/models/manageiq/providers/kubernetes/container_manager.rb:570:in `verify_credentials'
  /var/www/miq/vmdb/app/models/mixins/verify_credentials_mixin.rb:28:in `verify_credentials?'                                   ^^^^^^^^^^

Ensure that the Kubeclient::HttpError exception class is loaded in the
connection_rescue_block method.

```
[NameError]: uninitialized constant ManageIQ::Providers::Kubernetes::ContainerManager::Kubeclient
  rescue RestClient::Unauthorized, Kubeclient::HttpError => err
                                   ^^^^^^^^^^
```
@miq-bot
Copy link
Member

miq-bot commented Feb 29, 2024

Checked commit agrare@490e70e with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@Fryguy Fryguy merged commit 11f0134 into ManageIQ:master Feb 29, 2024
3 of 4 checks passed
@Fryguy Fryguy self-assigned this Feb 29, 2024
@agrare agrare deleted the require_kubeclient_connection_rescue_block branch February 29, 2024 23:02
@Fryguy
Copy link
Member

Fryguy commented Mar 6, 2024

Backported to radjabov in commit e56e15a.

commit e56e15abb89a906aa230843227e4963dadff9715
Author: Jason Frey <[email protected]>
Date:   Thu Feb 29 18:00:59 2024 -0500

    Merge pull request #519 from agrare/require_kubeclient_connection_rescue_block
    
    Require kubeclient in connection_rescue_block
    
    (cherry picked from commit 11f0134c1df2b894d49a096ff78e88824ff8116f)

Fryguy added a commit that referenced this pull request Mar 6, 2024
…cue_block

Require kubeclient in connection_rescue_block

(cherry picked from commit 11f0134)
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