-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 event UUIDS missing on event bus #1111
Conversation
To test, remote debug an in-memory event bus with a command like disable or enable static NAT. Check event description property before and after. If this commit is applied, it will have the UUIDs of the first class entities involved in the API call. I think I will write a unit test for this to make sure this method is working. What file should I put it in? |
@ProjectMoon server/test/com/cloud/event/ActionEventUtilsTest.java and if you can maybe an integration test? |
Integration tests use Marvin, right? |
Yes, preferably but not necessarily. you can create your own if you want, based on scripts and cloudmonkey for instance or a similar tool. |
Currently unable to build the branch due to #1110. What's the status of that request being merged in? |
It is missing a review and LGTM, (with proper motivation) |
For now I will cherry-pick that commit and use it locally to build my tests. It will not become part of this pull request of course. |
The fixing of CLOUDSTACK-8816 introduced a regression that removed the first class entities in the event bus description property. This is because everything was changed to use the Class as a key... Everything but the populateFirstClassEntities method in ActionEventUtils.
The commit has been updated with a unit test. I also rebased this branch to latest master since my apparent accidental review of #1110 got the syntax error fix into the master branch. |
Hi @ProjectMoon Thanks for taking this up. If possible, can you put in a sample event before and after the fix? |
Example with the fix:
Without the fix:
The first class entities found in the case of static NAT operations are VM ID and IP ID. This is the eventDescription property of the event sent over the event bus. |
manually tested it with rabbitmq integration Here are the events before and after the fix Before: After: 👍 |
@remibergsma @DaanHoogland can you take a look at this please? Its a good fix to have in 4.6.1 |
@karuturi I don't think there is a test for this in the suites we use. I'll them anyway to at least see about regression in some other places. |
@ProjectMoon there was one failure in the network tests for the password server. I am rerunning that one to make sure. |
So it was a fluke |
LGTM |
I just realised the target branch should be 4.6 meaning the PR should be for 4.6 and fwd-merged to master. Can you take care of that please @ProjectMoon |
Well, the target branch for this is master so it will be put in 4.7-SNAPSHOT, but it's also intended to be cherry-picked back into 4.6 (which I obviously do not have the access to do). I can create a second pull request on the 4.6 branch as well if you want. What is the proper procedure for this? |
No cherry-picking. The PR should be only for 4.6 which will be fwd-merged to master(and hence will be available in 4.7 and up) |
Since the branches are different, I will create a new branch off of 4.6, cherry-pick my commit to it, and then submit that as a new PR, which can then be forward merged. |
Closed in favor of #1127. |
Fix event UUIDS missing on event busSame as pull request #1111, but this time on the 4.6 branch for forward merging in accordance with [the wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up#ReleaseprinciplesforApacheCloudStack4.6andup-HowtomergeaPullRequest?). The fixing of CLOUDSTACK-8816 introduced a regression that removed the first class entities in the event bus description property. This is because everything was changed to use the Class as a key... Everything but the populateFirstClassEntities method in ActionEventUtils. This commit tries to load the class key instead of the String key, which re-enables the populateFirstClassEntities method. Likely this was not caught because of the trace exception handling... maybe some better logging/unit tests would be good for this PR. * pr/1127: Fix event UUIDS missing on event bus Signed-off-by: Daan Hoogland <daan@onecht.net>
The fixing of CLOUDSTACK-8816 introduced a regression that removed the first class entities in the event bus description property. This is because everything was changed to use the Class as a key... Everything but the populateFirstClassEntities method in ActionEventUtils.
This commit tries to load the class key instead of the String key, which re-enables the populateFirstClassEntities method.
Likely this was not caught because of the trace exception handling... maybe some better logging/unit tests would be good for this PR.