You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by ProjectMoon <gi...@git.apache.org> on 2016/01/27 16:56:51 UTC

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

GitHub user ProjectMoon opened a pull request:

    https://github.com/apache/cloudstack/pull/1372

    Fixes regarding VOLUME_DELETE events resulting from account deletion.

    New version of #924, but on the right branch with the commits squashed.
    
    **Original pull request:**
    Fixes regarding usage event emission.
    
    UsageEventUtils was previously not checking deleted accounts, which meant that if an account was deleted that had some resources running on it, those resources would get destroyed without emitting any events.
    
    Furthermore, the VOLUME_DELETE event of ROOT volumes is the responsibility of the UserVmManager, which gets circumvented when expunging resources following the account deletion. Added a check to the AccountManager which catches the ROOT volumes that need to be deleted and emits events for them.
    
    To test this: Create a new user. As that user, create and destroy an instance. This should cause the VM_CREATE, VM_START, VM_STOP, VM_DESTROY, VOLUME_CREATE, and VOLUME_DELETE events to be emitted. 
    Create a new instance as the same user. Log in as admin, and delete the user. The same set of events should be emitted, and there should be no duplicate DELETE events for the ROOT volume of the previous instance.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/greenqloud/cloudstack pr-volume-usage-events-fixes-4.6

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1372.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1372
    
----
commit 7be46c3ed6fa33e16ee84cda043a6c6e5547914c
Author: nnesic <ne...@greenqloud.com>
Date:   2015-10-07T10:46:41Z

    Fixes regarding VOLUME_DELETE events resulting from account deletion.
    
    The logic about volume deletion was that an event should be emitted
    when the volume delete is requested, not when the deletion
    completes. The VolumeStateListener specifically ignores destroy events
    for ROOT volumes, assuming that the ROOT volume only gets deleted when
    the instance is destroyed and the UserVmManager should take care of
    it.
    
    This was causing problems when deleting accounts which had running
    resources. The resources are stopped and destroyed, but we never get a
    usage event indicating so. When deleting an account, all of its
    resources get destroyed, but the instance expunging circumvents the
    UserVmManager, and thus we miss the VOLUME_DESTROY usage event.
    
    This commits adds a check in the AccountManager to emit the deletion
    event for ROOT volumes belonging to instances which weren't destroyed
    prior to the account deletion. It also adds the volume status to the
    event emitted on the event bus, for distinguishing between pre and
    post state transitions.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the pull request:

    https://github.com/apache/cloudstack/pull/1372#issuecomment-175706330
  
    Which file is missing the license? Still don't see that in the Jenkins build.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/1372#issuecomment-175716111
  
    @ProjectMoon :) Github need to fix this, really annoying 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/1372#issuecomment-175710489
  
    @ProjectMoon do you want to merge this only on master or since 4.6/4.7? Check the target branch of the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon closed the pull request at:

    https://github.com/apache/cloudstack/pull/1372


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Fixes regarding VOLUME_DELETE events resu...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the pull request:

    https://github.com/apache/cloudstack/pull/1372#issuecomment-175712011
  
    Yes.. wrong branch again. GitHub's cross-fork interface tends to be a bit confusing for me due to how it loads when you change repos. Attempt #3 coming up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---