-
Notifications
You must be signed in to change notification settings - Fork 17
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
microovn/ovn: support OVS ovn-encap-ip
configuration from external initConfig
#113
microovn/ovn: support OVS ovn-encap-ip
configuration from external initConfig
#113
Conversation
c519796
to
7951125
Compare
@fnordahl can you give a feedback on this when you have time please? Thanks. |
Hi @gabrielmougard. I left some comments at your specification proposal which I think should be incorporated. |
@mkalcok thanks a lot for the feedback! Working on it. |
@mkalcok I've been thinking about a potential issue: is there some kind of API extension system within MicroOVN that can be queryable by MicroCloud ? I'm just asking this because I wouldn't like to send a key-value config to a version of a deployed MicroOVN that does not support custom encapsulation IP.. I'm obviously new to the MicroOVN codebase so it is maybe a dumb question. Sorry for that in advance. |
@masnax maybe be able to offer some advice here too. |
Thanks for looping in Max, @tomponline . I was just about to say that MicroOVN does have an API that can be extended, but this "feature/version checking" should be probably handled uniformly across all microcloud components. |
@mkalcok Microcloud requires LXD, MicroCeph and MicroOVN. LXD has its own API to get API extensions ( package database
type ConfigItem struct {
ID int
Key string `db:"primary=yes"`
Value string
} It is said to be used for tracking OVN configuration but could it be also used to keep track of currently used MicroOVN features ? |
7951125
to
0066c79
Compare
@mkalcok I don't understand why this gh runner fails for me.. Is there something I need to write in my commits for them to be accepted? |
0066c79
to
4a0e6f1
Compare
It's not your fault @gabrielmougard , PRs coming users that don't have write permissions on the repository need to be manually authorised. /canonical/self-hosted-runners/run-workflows 4a0e6f1 |
@gabrielmougard regarding errors in the CI, I see similar issues popping up intermittently in my local environment as well . It does not look like a code issue to me, I'll look into it |
09bb538
to
d87cc34
Compare
/canonical/self-hosted-runners/run-workflows d87cc34 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks fine,thank you for this feature. I have two small nit picks that I mentioned in the comments.
Other than that, could you please add a separate test suite that would initialize the cluster with custom IP encapsulation and then test that it was properly set?
a1b78ee
to
fbdd661
Compare
@mkalcok is it possible to re-run the CI tests? |
/canonical/self-hosted-runners/run-workflows fbdd661 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @gabrielmougard. I think we need just few more touch-ups and we are done with this one. Aside from linting errors in tests, there's a way to cut down on repetition in tests themselves.
BATS doesn't really have a "native" way to load/import test suits, but we did come up with a way to do that in order to not copy/paste tests between different test suites. Example of how to do this would be scaleup_cluster.bats
tests. There we execute bats
from within the tests to "include" tests from other test suits.
What you'll need:
- custom setup/teardown (which you already have)
- way to "load"
cluster.bats
test suite as ipv4 or ipv6 variant- we don't have this yet but since the
cluster.bats
is already written in a way that handles ipv6, you can just create link in thetest_helper/bats/cluster_ipv6.bats -> test_helper/bats/cluster.bats
- we don't have this yet but since the
- your test implementation (
tests/init_cluster_custom_encap.bats
) that will:- use your custom setup/teardown
- tests that encapsulation is properly set in the OVN
- loads
test_helper/bats/cluster.bats
(orcluster_ipv6.bats
) as seen in the example above. - link
tests/init_cluster_custom_encap_ipv6.bats -> test/init_cluster_custom_encap.bats
to get ipv6 variant of the test suite.
543bca5
to
16090be
Compare
@gabrielmougard I haven't been keeping up with this too much, but I don't think the Unless I'm missing something, I think all microcluster-backend projects will have API extensions and that grow over time and will need to be tracked like this, so I don't think it makes sense to re-implement this per project. In fact microcluster itself might eventually need to keep track of feature compatibility, and projects like MicroOVN would then need to manage two different implementations of this. I think this should be an endpoint internal to microcluster, and similar to how MicroOVN passes schema extensions to microcluster, it should pass API extensions as well, which are checked when joining a cluster or upgrading an existing one. I think this way, it keeps MicroOVN focused on OVN and microcluster focused on management of the REST API and database. |
3142496
to
3df3147
Compare
@mkalcok is it possible to re-run the CI manually (the snap build seems to have randomly failed..) ? |
450010d
to
ad66247
Compare
@gabrielmougard Yes, we seems to be hitting some issue when building snap with |
@gabrielmougard A temporary fix for the build issue has been merged to the main #150 you can rebase your PR and the CI should start to work again. |
…m Geneve encapsulation IP Signed-off-by: Gabriel Mougard <[email protected]>
…n IP for its Geneve tunnel Signed-off-by: Gabriel Mougard <[email protected]>
2efeb71
to
70f1494
Compare
…or its Geneve tunnel Signed-off-by: Gabriel Mougard <[email protected]>
…P (default) Signed-off-by: Gabriel Mougard <[email protected]>
Signed-off-by: Gabriel Mougard <[email protected]>
…t the cluster state is healthy Signed-off-by: Gabriel Mougard <[email protected]>
08b0ca4
to
a09e45b
Compare
@mkalcok rebased |
Implementation LGTM, thank you @gabrielmougard. One last think though (and sorry for not mentioning this earlier), user facing feature like this requires also a documentation, probably a |
@mkalcok I added the howto's . Let me know if this is correct ;) |
aa84332
to
1ebf9b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall great job on explaining underlay networks, however I think this page is slightly misleading. Reading it at face value, I'd assume that unless I use microovn init
and set "custom encapsulation IP address", there won't be any underlay networking, which is not the case. MicroOVN, by default uses, hostname of the machine as Geneve endpoint.
Could you please add information about the default behavior and highlight that the custom encapsulation IP
feature of microovn init
is useful if user wants more control over which IP/interface is used for underlay, or if hostname resolution does not work between the hosts.
Signed-off-by: Gabriel Mougard <[email protected]>
1ebf9b2
to
68d5c11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the update and all your hard work on this one.
This is needed by: canonical/microcloud#245