-
Notifications
You must be signed in to change notification settings - Fork 12
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
Openstack cloud tests #179
Conversation
67a4af8
to
e7cf77f
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.
Thanks a lot for your work on this, it looks like a great start! I have left a couple of comments in-line and I'll continue to look later today
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.
Hi,
thanks for working on this. I had gone another route (trying to mock some parts of neutron to reuse the actual ML2 driver code) which has proven unfruitful.
I don't see anything about the metadata agent here nor any southbound access to simulate what the ML2 driver does. Is there any plan to do so?
Thanks for the reviews @fnordahl @rjarry.
That's a good point. I focused on the NB because I assumed that that would be the primary database the Neutron would communicate with. I'll take a look at the SB as well. Do you have any pointers to relevant code/docs about this? |
e7cf77f
to
7d9fea0
Compare
There are a two parts to consider:
I am far from being an expert in this code but I know it has significant impact on scale because it multiplies the number of southbound db clients by two (1 ovn-controller + 1 neutron metadata agent per compute node). For performance reasons, openstack deployments usually recommend enabling ovn-controller |
It seems to me we're only interested in how these extra read-only clients increase load on the Southbound. If that's the case, we can simulate DB clients by running ovsdb-server relay instances. Today we already start real SB relays if configured (e.g., |
I think that should give us a fairly accurate measurement of the neutron-ovn-metadata-agent. it currently does not set monitor conditions, so we get a full db dump anyway. |
@dceara: I think the neutron metadata agent is not read-only, it also writes to the southbound db: https://opendev.org/openstack/neutron/src/tag/21.1.2/neutron/agent/ovn/metadata/agent.py#L193-L196 https://opendev.org/openstack/neutron/src/tag/21.1.2/neutron/agent/ovn/metadata/agent.py#L292-L293 |
Yep,
Allthough it seems like there is now some kind of monitor conditions going on here, but only for chassis https://opendev.org/openstack/neutron/src/tag/21.1.2/neutron/agent/ovn/metadata/ovsdb.py#L50-L53 |
7d9fea0
to
2ef1fae
Compare
:return: None | ||
""" | ||
|
||
ext_net = self._create_project_net(f"ext_net_{project.uuid}", 1500) |
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.
From my experience openstack environments have generally a low count of widely used external networks (sometimes just one). So i would here not generate a new external network, but rather randomly choose from a list of existing ones.
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.
These are two very good points thank you. I'll decouple ext_net creation from project creation.
|
||
ext_net = self._create_project_net(f"ext_net_{project.uuid}", 1500) | ||
ext_net_port = self._add_metadata_port(ext_net, project.uuid) | ||
provider_port = self._add_provider_network_port(ext_net) |
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.
as far as i know there will only ever be one provider network port per provider network. Since _add_provider_network_port
sets this statically to physnet1
it should only ever be called once
@felixhuettner I decoupled external network creation from project creation and now the I'm creating these suggested changes as separate commits for easier review. Please let me know if that's OK or if you'd like me to squash them in the end to 53339f9 |
Thanks. Looks good |
774331b
to
83ac126
Compare
I'd say that this change is now almost ready for full review. Two things that are missing and I'd like your opinion on are:
|
From my perspective I think it would be valuable to finalize this PR as-is now and mark it as ready for review once you feel comfortable with it. The items discussed above can be worked on independently, and the work you have done so far would be a dependency. |
I'm not sure what has happend, but we seem to create multiple external networks again (even though they now seem to have no external connectivity)? |
🤦 thank you for noticing @felixhuettner . I lost a commit that decoupled project/ext net creation when I was rebasing/force pushing local copy on a different machine |
Lost change was recovered (thanks @fnordahl) and I think this PR is ready for review. |
Commit 1380bba moved instantiation of CMS Cluster class back to the generic ovn_tester.py. The `create_cluster` function is generic and actually takes almost identical arguments as the `Cluster` class. Let's make it part of the `Cluster` constructor instead! This change also makes it apparent that a separate CMS plugin class is not necessary, so let's roll this into the CMS specifc Cluster class. Co-Authored-by: Dumitru Ceara <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> Signed-off-by: Frode Nordahl <[email protected]>
Signed-off-by: Frode Nordahl <[email protected]>
Added more methods into OvnNbctl class that map to ovsdbapp commands: * Create 'DHCP_Options' * Set 'options' for 'DHCP_Options' * Enable 'Logical_Switch_Port' * Set IPv4 address on 'Logical_Switch_Port' Signed-off-by: Martin Kalcok <[email protected]>
Neutron utilizes 'external_ids' a lot. This change adds ability to set them when creating objects like routers/ports/switches. Additionaly some objects also now accept fields like 'extra_config' and 'enabled'. All these additions are optional and should not alter previous behavior of these methods if they are not supplied. misc: couple type hints for easier work with the code. Signed-off-by: Martin Kalcok <[email protected]>
This implementation of Openstack CMS is capable of getting OVN to the state before first guest VMs are added. It provisions following: * Project Router * Project's internal network * (Optionally) External network and routing from Project's internal network via the external network. Signed-off-by: Martin Kalcok <[email protected]>
Very basic Openstack test scenario that brings up three compute nodes and provisions one Project with internal network and external connectivity. Co-Authored-by: Dumitru Ceara <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> Signed-off-by: Martin Kalcok <[email protected]>
Test config option 'n_projects' allows specifying how many projects will be created during the test. Signed-off-by: Martin Kalcok <[email protected]>
Attempt to evenly distribute load when assigning Gateway Chassis to project routers. Signed-off-by: Martin Kalcok <[email protected]>
New method adds ability to perform full-mesh pings between list of ports. Signed-off-by: Martin Kalcok <[email protected]>
VMs can now be provisioned and assigned to projects. Co-Authored-by: Dumitru Ceara <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> Signed-off-by: Martin Kalcok <[email protected]>
Based on the feedback, Openstack clouds usually contain only one (or few) external networks. This change removes automatic per-project external network creation and allows sharing external network between multiple projects. Signed-off-by: Martin Kalcok <[email protected]>
`n_gws_per_project` renamed to `n_chassis_per_gw_lrp` to better capture effect of the option. Openstack test scenario was also renamed to be more in line with naming convention of other tests. Signed-off-by: Martin Kalcok <[email protected]>
Signed-off-by: Martin Kalcok <[email protected]>
Signed-off-by: Frode Nordahl <[email protected]>
Neutron no longer applies the `mcast_flood_reports=true` option to LSPs [0]. 0: https://review.opendev.org/c/openstack/neutron/+/888127 Signed-off-by: Frode Nordahl <[email protected]>
While Neutron currently adds this, it has been proposed for removal as it is not needed by OVN [0]. 0: https://review.opendev.org/c/openstack/neutron/+/897489 Signed-off-by: Frode Nordahl <[email protected]>
dc2ad04
to
48bd651
Compare
@dceara thanks a lot for the help with the rebase. I put your proposals for adaption into the correct commits and attributed accordingly. I redid the parts of the commits that mainly move code around to ensure no changes were lost. I also arrived at a slightly different solution to calling the Looking forward to your review! |
I just noticed that the rebase is one commit shorter than the previous iteration, and the reason is that I have unintentionally squashed "CMS Openstack: Add ability to simulate VMs" and "OS Test: Spawn VMs and run ping in base scenario". However, the result does look fine to me as both commits kind of addressed the same thing in iterations, so perhaps we should just keep it this way? Thoughts @mkalcok ? |
yeah, I'm fine with them being squashed. I separated them for easier review as one added logic to the |
@@ -5,7 +5,7 @@ | |||
import time |
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 a lot for adding the type hints!
) | ||
|
||
protocol = "ssl" if self.cluster_cfg.enable_ssl else "tcp" | ||
# XXX: To facilitate network nodes we'd have to make bigger change |
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.
We had some discussions internally about potentially removing the ovn-fake-multinode dependency and start OVN components directly from ovn-heater. Whenever (if) we do that it might be a good moment for adding support for network nodes too.
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.
This is awesome work! Thanks a lot @mkalcok @fnordahl @booxter @rjarry @felixhuettner for all the code and reviews!
I agree with @booxter let's get this in and we can address leftovers/known issues/bugs with follow up PRs.
There is one thing I'd like to fix first before merging this but I'll wait for a reply from @mkalcok or @fnordahl on #179 (review)
Thanks,
Dumitru
Signed-off-by: Frode Nordahl <[email protected]>
Signed-off-by: Frode Nordahl <[email protected]>
48bd651
to
799324e
Compare
Please review commit by commit. This branch is based on #175 so the first 7 commits by @fnordahl can be skipped in review.
This change builds on separation of CMS implementations in #175 and it adds Openstack CMS. More info is in commit messages but at current stage it can simulate provisioning of: