Bug 671450
Summary: | ISE when satadmin attempts to adjust Software Channel Entitlements for an organization | |||
---|---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Paresh Mutha <pmutha> | |
Component: | Server | Assignee: | Tomas Lestach <tlestach> | |
Status: | CLOSED ERRATA | QA Contact: | Martin Minar <mminar> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 540 | CC: | ahumbe, akarlsso, casmith, cperry, dyordano, jhutar, jpazdziora, jsherril, mkoci, mminar, pgervase, sandro, smithj, xdmoon | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | spacewalk-schema-1.2.21-11 satellite-schema-5.4.0.11-1 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 703377 (view as bug list) | Environment: | ||
Last Closed: | 2011-06-17 02:46:53 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 677501, 703377 |
Description
Paresh Mutha
2011-01-21 15:01:35 UTC
Giving to Tomáš. Paresh, did you investigate why (in which situation) does the setMaxFlex and/or setMaxMembers get called with null? Shouldn't/couldn't we handle this on the caller's side, rather than in the setter? Thanks, Jan Hi Jan, I did try to check the calls made to setMaxMembers but wasn't able to get to the situation where it was passing null. Currently I see that these are the 4 calls to setMaxMembers in ChannelManager.java listChannelFamilySubscriptionsFor 265 ocf.setMaxMembers(new Long(0)); listChannelFamilySubscriptionsFor 271 ocf.setMaxMembers(orgo.getMaxMembers()); makeOrgSoftwareEntitlement 366 seDto.setMaxMembers(co.getMaxMembers()); listEntitlementsForAllOrgsWithEmptyOrgs 429 seDto.setMaxMembers(0L); But these didn't seem like null being passed to setMaxMembers. So I couldn't move ahead on this part. I can try adding few more debug statements at these calls and try to check but I am not sure how much would it help. ..snip from ChannelManager.java .. 251 for (ChannelOverview sato : satEntitlements) { 252 OrgChannelFamily ocf = new OrgChannelFamily(); 253 254 ocf.setSatelliteCurrentMembers(sato.getCurrentMembers()); 255 ocf.setSatelliteMaxMembers(sato.getMaxMembers()); 256 ocf.setSatelliteCurrentFlex(sato.getCurrentFlex()); 257 ocf.setSatelliteMaxFlex(sato.getMaxFlex()); 258 ocf.setId(sato.getId()); 259 ocf.setName(sato.getName()); 260 ocf.setLabel(sato.getLabel()); 261 262 ChannelOverview orgo = orgMap.get(sato.getId()); 263 if (orgo == null) { 264 ocf.setCurrentMembers(new Long(0)); 265 ocf.setMaxMembers(new Long(0)); 266 ocf.setMaxFlex(0L); 267 ocf.setCurrentFlex(0L); 268 } 269 else { 270 ocf.setCurrentMembers(orgo.getCurrentMembers()); 271 ocf.setMaxMembers(orgo.getMaxMembers()); 272 ocf.setMaxFlex(orgo.getMaxFlex()); 273 ocf.setCurrentFlex(orgo.getCurrentFlex()); 274 } 275 if (ocf.getSatelliteMaxMembers() != null) { 276 ret.add(ocf); 277 } 278 } ..snip from ChannelManager.java .. - Paresh Hello Paresh, thank you for your patch. I managed to reproduce the problem. spacewalk.git: 2f08c0d2bce55c42ade13ab6ee4caeb7dd6847c1 I will discuss with Justin, whether we want to make more changes regarding this problem. Hello Paresh, please, ignore my previous comment. We've discussed the patch and found out, it's not correct. I reverted the commit: cffab0bd9315a933d24afc4e8cf9feab7a85929b One note to the reproducer described in Comment#17: Point 4.) I had to change "Regular Proposed Total" for "RHEL AP for SAP" rhel-server-sap to a non-zero number (f.e. 1) and press "Update Organization". Otherwise the reproducer is great and thank Tasos for it! The attached patches aren't ok! They prevent the WebUI from getting the ISE, but they may harm custom channel entitlements under some circumstances. It's highly not recommended to apply/use them! Fix is in the set_family_count stored procedure: spacewalk.git: 31be7a0ff19f81bfddff054677b52a92fc156de0 spacewalk.git: f39492327788288c106b6a8fc7db5000a9b72eee (PG) Verified on Stage with Cert: bucknell-university.cert redhat-cperry-errata-stage-rhel6-flex.cert An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. https://rhn.redhat.com/errata/RHEA-2011-0875.html |