Skip to content

Conversation

@mfencik
Copy link
Contributor

@mfencik mfencik commented Apr 25, 2025

Previously we changed the trunk_created and subports_added subscription event from AFTER_CREATE to PRECOMMIT_CREATE, while that was not a problem for subports, it created a bug for trunk as DBEventPayload is constructed differently for trunk, hence we need this change.
code ref for trunk DBEventPayload on precommit:
https://github.com/openstack/neutron/blob/stable/2024.2/neutron/services/trunk/plugin.py#L263

As we see there, the "desired_state" is used instead of just "state".

If we call payload.latest_state, it will return desired if present, else it will return latest from state. code ref.
https://github.com/openstack/neutron-lib/blob/950f0f3a8a722da115c03f2abb756a732a3ec4c1/neutron_lib/callbacks/events.py#L142

@stevekeay stevekeay added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit e8a48d6 Apr 25, 2025
28 checks passed
@stevekeay stevekeay deleted the PUC-899 branch April 25, 2025 12:21
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.

3 participants