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

Fix execution of RemoveImage #767

Merged
merged 2 commits into from Dec 6, 2022
Merged

Conversation

ahadas
Copy link
Member

@ahadas ahadas commented Dec 4, 2022

This PR includes two changes:

  1. RemoveImage now attaches the created async task to itself rather than to
    its parent command and its EndProcedure type is changed to COMMAND_MANAGED.
    With these changes, first the execution of RemoveImage is completed and
    then its parent's callback detects it and completes the execution of the
    parent command.

  2. RemoveImage may lack async tasks when:

    1. The image doesn't exist
    2. There's a failure during delete image

    With these changes, the image is removed from the database (rather than
    staying in LOCKED state) and the command would finish successfully in
    the first case, and in the second case the command end with failure and
    the image switches to ILLEGAL state.

@ahadas
Copy link
Member Author

ahadas commented Dec 5, 2022

/ost

@ahadas
Copy link
Member Author

ahadas commented Dec 5, 2022

/ost

ok, something is wrong with the OST action..

Copy link
Member

@mkemel mkemel left a comment

Choose a reason for hiding this comment

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

And it also fixes the NPE issue completely as well. Great!

RemoveImage now attaches the created async task to itself rather than to
its parent command and its EndProcedure type is changed to COMMAND_MANAGED.
With these changes, first the execution of RemoveImage is completed and
then its parent's callback detects it and completes the execution of the
parent command.

Signed-off-by: Arik Hadas <ahadas@redhat.com>
RemoveImage may lack async tasks when:
1. The image doesn't exist
2. There's a failure during delete image

With these changes, the image is removed from the database (rather than
staying in LOCKED state) and the command would finish successfully in
the first case, and in the second case the command end with failure and
the image switches to ILLEGAL state.

Signed-off-by: Arik Hadas <ahadas@redhat.com>
@ahadas
Copy link
Member Author

ahadas commented Dec 6, 2022

/ost

@ahadas ahadas merged commit 5871414 into oVirt:master Dec 6, 2022
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