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

Add tests for neutron-openvswitch and neutron-gateway charms #523

Conversation

przemeklal
Copy link
Contributor

  • Add support for running NeutronOvsVsctlTest against any charm and not
    only charm-neutron-gateway.
  • Add new test case for charm-neutron-gateway and charm-neutron-openvswitch to
    verify correct handling of conflicting ext-port and data-port configurations.

Signed-off-by: Przemysław Lal przemyslaw.lal@canonical.com

@przemeklal
Copy link
Contributor Author

przemeklal commented Mar 10, 2021

Logs of a successful execution against charm-neutron-openvswitch with this patch included:
http://paste.openstack.org/show/803423/
And against the latest version of charm-neutron-gateway (plus the new test class referenced in tests/tests.yml):
http://paste.openstack.org/show/803425/

After (and if) this is merged I'll be happy to update tests/tests.yaml for both charms or follow up with any other required actions.

Copy link

@coreycb coreycb left a comment

Choose a reason for hiding this comment

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

Looks good, thank you. I'll let Alex review as well as I know he's involved in your charm-neutron-openvswitch review.

@przemeklal
Copy link
Contributor Author

Thanks Corey!

cc @ajkavanagh

Copy link
Contributor

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

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

Please see inline comment as a suggestion. Thanks.

zaza/openstack/charm_tests/neutron/tests.py Outdated Show resolved Hide resolved
@przemeklal przemeklal force-pushed the add-neutron-openvswitch-marking-test branch from 734866b to cf8f8d6 Compare March 15, 2021 10:26
* Add support for running NeutronOvsVsctlTest against any charm and not
only charm-neutron-gateway.
* Add new test case for charm-neutron-gateway and charm-neutron-openvswitch to
verify correct handling of conflicting ext-port and data-port configurations.

Signed-off-by: Przemysław Lal <przemyslaw.lal@canonical.com>
@przemeklal przemeklal force-pushed the add-neutron-openvswitch-marking-test branch from cf8f8d6 to 64fb160 Compare March 15, 2021 10:31
Copy link
Contributor

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

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

LGTM; is there a review that verifies that these work?

@przemeklal
Copy link
Contributor Author

przemeklal commented Mar 15, 2021

Not yet, I only linked output from these tests in the comment above.

For neutron-openvswitch they'll actually fail without this. charm-neutron-gateway should pass right away.

Should I update https://review.opendev.org/c/openstack/charm-neutron-openvswitch/+/778458 and open a new review for charm-neutron-gateway with zaza-openstack-tests in test-requirements.txt pointing to my fork/branch to prove it? Or what's the best approach?

@ajkavanagh
Copy link
Contributor

Not yet, I only linked output from these tests in the comment above.

For neutron-openvswitch they'll actually fail without this. charm-neutron-gateway should pass right away.

Should I update https://review.opendev.org/c/openstack/charm-neutron-openvswitch/+/778458 and open a new review for charm-neutron-gateway with zaza-openstack-tests in test-requirements.txt pointing to my fork/branch to prove it? Or what's the best approach?

It just needs a review (and if an existing one is appropriate, that's great), with:

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/523

in the commit message. The amended commit message will trigger a charm-recheck which will then pull in the tests from the PR and validate them. Thanks.

@przemeklal
Copy link
Contributor Author

Thanks. Here's the updated neutron-openvswitch review:
https://review.opendev.org/c/openstack/charm-neutron-openvswitch/+/778458
And a new neutron-gateway review:
https://review.opendev.org/c/openstack/charm-neutron-gateway/+/780560

@przemeklal
Copy link
Contributor Author

przemeklal commented Mar 17, 2021

So, these tests are passing test_charm_func_full for charm-neutron-gateway, please see the last report from Canonical CI here: https://review.opendev.org/c/openstack/charm-neutron-gateway/+/780560

Called a charm-full-recheck on https://review.opendev.org/c/openstack/charm-neutron-gateway/+/780560 (previously failed on an unrelated error, but the smoke test passed this time).

@ajkavanagh ajkavanagh merged commit e3fab55 into openstack-charmers:master Mar 17, 2021
@ajkavanagh
Copy link
Contributor

Thanks for your work on this @przemeklal ; much appreciated.

openstack-mirroring pushed a commit to openstack/charm-neutron-gateway that referenced this pull request Mar 17, 2021
Add reference to to the new test case that valdiates whether the charm
goes in blocked state when data-port and ext-port are specified at the
same time.

func-test-pr: openstack-charmers/zaza-openstack-tests#523

Signed-off-by: Przemysław Lal <przemyslaw.lal@canonical.com>
Change-Id: I2e1ba8ac4c09ea77c39e0337114f67690de6829c
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Mar 17, 2021
* Update charm-neutron-gateway from branch 'master'
  to b679984b1fec8dce16a3435465e5cfab907906ff
  - Add new functional test case for ext-port config option deprecation
    
    Add reference to to the new test case that valdiates whether the charm
    goes in blocked state when data-port and ext-port are specified at the
    same time.
    
    func-test-pr: openstack-charmers/zaza-openstack-tests#523
    
    Signed-off-by: Przemysław Lal <przemyslaw.lal@canonical.com>
    Change-Id: I2e1ba8ac4c09ea77c39e0337114f67690de6829c
przemeklal added a commit to przemeklal/charm-neutron-openvswitch that referenced this pull request Mar 24, 2021
Enable marking of OVS bridges and ports as managed by
charm-neutron-openvswitch. This enables more advanced use cases like
implmentation of idempotent config changes or cleanup of stale OVS
configuration.

Deprecate ext-port in favour of data-port and bridge-mappings. From now
on ext-port value will be ignored if data-port is specified in the
config. Log an error in the unit's log and display it in the unit's
status so that the user is aware of misconfiguration.

Replace deprecated code that was used for setting up DPDK ports and
bonds with calls to charmhelpers functions.

Sync charmhelpers.

Update and add new unit tests.

Add a new functional test case to tests/tests.yaml.

Note: This patch is largely a reimplementation of corresponding change
for charm-neutron-gateway: https://review.opendev.org/717074

func-test-pr: openstack-charmers/zaza-openstack-tests#523

Closes-Bug: #1917025
Partial-Bug: #1915967

Signed-off-by: Przemysław Lal <przemyslaw.lal@canonical.com>
Change-Id: I343f2c8258b7b8b91417dc6efc5bfe95351392a9
przemeklal added a commit to przemeklal/charm-neutron-openvswitch that referenced this pull request Mar 24, 2021
Enable marking of OVS bridges and ports as managed by
charm-neutron-openvswitch. This enables more advanced use cases like
implmentation of idempotent config changes or cleanup of stale OVS
configuration.

Deprecate ext-port in favour of data-port and bridge-mappings. From now
on ext-port value will be ignored if data-port is specified in the
config. Log an error in the unit's log and display it in the unit's
status so that the user is aware of misconfiguration.

Replace deprecated code that was used for setting up DPDK ports and
bonds with calls to charmhelpers functions.

Sync charmhelpers.

Update and add new unit tests.

Add a new functional test case to tests/tests.yaml.

Note: This patch is largely a reimplementation of corresponding change
for charm-neutron-gateway: https://review.opendev.org/717074

func-test-pr: openstack-charmers/zaza-openstack-tests#523

Closes-Bug: #1917025
Partial-Bug: #1915967

Signed-off-by: Przemysław Lal <przemyslaw.lal@canonical.com>
Change-Id: I343f2c8258b7b8b91417dc6efc5bfe95351392a9
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.

None yet

3 participants