Remove bug that causes stop events to create sessions #1344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in the CloudStateReconstructorTransformer that allowed end events such as Stop, Power Off or Shelve to start a new session. This is fixed by adding an if statement that prevents an end event from creating a new session.
A new openstack log file has been added for the regression tests. It is ingested separately to ensure we create a situation where sessions would have been incorrectly made before this change. This change means this data should not cause any new sessions to be made.
The migration script will look for sessions with end events, display the list of sessions to the user and ask if they want to remove the session. Re-aggregation of the cloud data is already necessary for upgrading to 9.0. Below is a screenshot of how this is displayed when running the upgrade.
Tests performed
Tested manually in docker and also added data to docker that would have created sessions before his issue was fixed.
Types of changes
Checklist: