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

fix: go into blocked status if MetalLB is not enabled and N2 relation is set #48

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

dariofaccin
Copy link
Contributor

@dariofaccin dariofaccin commented Nov 15, 2023

Description

This PR aims to fix #45. The fix catches the TypeError exception thrown when trying to access ingress information when MetalLB is not enabled or properly configured, and leverages the validation from the N2 interface to set the charm into blocked status.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have bumped the version of the library

@dariofaccin dariofaccin requested a review from a team as a code owner November 15, 2023 16:40
Copy link
Contributor

@gatici gatici left a comment

Choose a reason for hiding this comment

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

Could we consider to add an integration test which sets a relation with gnbsim ?

@dariofaccin
Copy link
Contributor Author

Could we consider to add an integration test which sets a relation with gnbsim ?

At the moment integration tests involves only mandatory relation: actually, we have the AMF-nGBsim integration test in the sdcore-gnbsim-operator repo.
It also is not related to the scope of this PR: please open a feature request for that.

@dariofaccin dariofaccin force-pushed the TELCO-873-fix-hook-error-missing-metallb branch from 3e94817 to 2e372e8 Compare November 17, 2023 10:24
@dariofaccin dariofaccin merged commit dd0b988 into main Nov 17, 2023
11 checks passed
@dariofaccin dariofaccin deleted the TELCO-873-fix-hook-error-missing-metallb branch November 17, 2023 10:55
@Gmerold
Copy link
Contributor

Gmerold commented Nov 17, 2023

Looks like I'm too late, but I don't we should be mentioning MetalLB specifically, because that's gonna be only valid for MicroK8s. What about other LB services?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hook error when MetalLB is not enabled
4 participants