Hi Dan,
Sorry, I missed this email when you sent it. I double checked 4.2 today
and doesn't look like this was applied.
Here is what I currently see on 4.2
in server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java:
if (generateUsageEvent) {
// Generate usage event right after all rules were marked for
revoke
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_DELETE,
lb.getAccountId(), 0, lb.getId(),
null, LoadBalancingRule.class.getName(), lb.getUuid());
}
Whereas the diff was to:
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1235,7 +1235,8 @@ public class LoadBalancingRulesManagerImpl<Type>
extends ManagerBase implements
if (generateUsageEvent) {
// Generate usage event right after all rules were marked
for revoke
-
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_DELETE,
lb.getAccountId(), 0, lb.getId(),
+ Network network = _networkModel.getNetwork(lb.getNetworkId());
+
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_DELETE,
lb.getAccountId(), network.getDataCenterId(), lb.getId(),
null, LoadBalancingRule.class.getName(), lb.getUuid());
}
Thanks
On Thu, Nov 7, 2013 at 4:57 AM, Daan Hoogland <[email protected]>wrote:
> H David,
>
> I think I already applied this on 4.2.
>
> On Wed, Nov 6, 2013 at 8:09 PM, David Grizzanti
> <[email protected]> wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/15280/
> > -----------------------------------------------------------
> >
> > Review request for cloudstack.
> >
> >
> > Bugs: CLOUDSTACK-5062
> > https://issues.apache.org/jira/browse/CLOUDSTACK-5062
> >
> >
> > Repository: cloudstack-git
> >
> >
> > Description
> > -------
> >
> > CLOUDSTACK-5062: Deleting Load Balancing Rule fails when generating
> usage events are enabled
> >
> > Added logic so that a correct zoneID is passed when generating usage
> events while deleting load balancing rules:
> > - Added logic to
> server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java to grab
> zone id and pass to publishUsageEvent
> >
> >
> > Diffs
> > -----
> >
> > server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
> be81a3e
> >
> > Diff: https://reviews.apache.org/r/15280/diff/
> >
> >
> > Testing
> > -------
> >
> > Testing only on 4.2
> >
> >
> > Thanks,
> >
> > David Grizzanti
> >
>
>
--
David Grizzanti
Software Engineer
Sungard Availability Services
e: [email protected]
w: 215.446.1431
c: 570.575.0315