Bug 645432
Summary: | Add the ability to delete versions of bundles | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | dsteigne |
Component: | Provisioning | Assignee: | John Mazzitelli <mazz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 3.0.0 | CC: | mazz, rrivera |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-02 07:19:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
dsteigne
2010-10-21 13:44:00 UTC
Hi, Is there a workaround for this? Please advise. Thanks. Ronaldo going to mark this as ASSIGNED so we take a look at it in our next prioritization meeting. git commit ebbeac6c225768c858efeb2a6c95037e67ef3d72 we can now delete bundle versions. However, I'm concerned that we should have some protections in place that might not be there. For example, if there is 1 or more deployments of the bundle version, I don't think we should be allowed to delete bundle versions. If we ever need to revert back, an error would occur. So, I'm not sure that this issue can be closed yet. I have to look at it more closely to see if there is more to be done. Here's the code that is relevant to my last comment about deployments - so it looks like we do clean up the DB. However, it means you will be orphaning deployments on the remote agents. for now this is probably good enough. I don't think we want to auto-undeploy these on the agents. We'll have to assume the user will do a full revert if they really don't want the agent machines to have these deployed. We'll have to make sure bug 645412 is also fixed, since that is needed to make sure the agent can be fully cleaned of any bundle deployment. // deployments replace other deployments and have a self-referring FK. The deployments // need to be removed in a way that will ensure that a replaced deployment is not removed // prior to the replacer. To do this we'll just blanket update all the doomed deployments // to break the FK dependency with nulls. Query q = entityManager.createNamedQuery(BundleDeployment.QUERY_UPDATE_FOR_VERSION_REMOVE); q.setParameter("bundleVersionId", bundleVersionId); int rowsUpdated = q.executeUpdate(); entityManager.flush(); // remove the bundle version - cascade remove the deployments which will cascade remove the resource deployments. this.entityManager.remove(bundleVersion); this was verified as part of RHQ 4.0 and 4.0.1 community releases Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago. |