View Issue Details

IDProjectCategoryView StatusLast Update
602RackTablesIPv4/IPv6/SLBpublic2012-09-28 19:10
ReportermmcrillAssigned Toandriyanov  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.20.0 
Target Version0.20.1Fixed in Version0.20.1 
Summary602: IP Network Capacity not displaying
DescriptionWhen browsing IPv4 and IPv6 spaces, the network capacity doesn't display anything, just 5 gray boxes with no indication of how full the network is. This is a fresh upgrade form 19.14 to 20
Steps To ReproduceView IPv4 and IPv6 space
Additional InformationCan provide screenshots and other configs as requested
TagsNo tags attached.

Activities

infrastation

infrastation

2012-09-12 20:21

administrator   ~0000782

A screenshot would help Alexey troubleshooting, yes.
andriyanov

andriyanov

2012-09-13 11:47

reporter   ~0000786

Does it reproduce on the demo installation?
http://demo.racktables.org/index.php?page=ipv4space
mmcrill

mmcrill

2012-09-13 15:21

reporter   ~0000787

Yes, the demo shows the capacity. I even reset my user interface and it didn't fix it.

Attached is a screenshot.
mmcrill

mmcrill

2012-09-13 15:21

reporter  

Capture.PNG (1,577 bytes)   
Capture.PNG (1,577 bytes)   
dm0

dm0

2012-09-14 04:55

reporter   ~0000788

We're having this issue with an upgrade as well. I think the previous version was 19.14.

I tested the database using clean code on my local Ubuntu 12.04 machine and it shows the capacity without issue. The production Debian Squeeze machine however, has the issue reported above. We're think the issue lies in ip4_mask_size($mask) in functions.php and 64-bit vs. 32-bit machines.

A bit of sample code to illustrate the problem:

<?php
echo 0xffffffff;
echo "\n";
echo (0xffffffff >> 24);
echo "\n";
echo PHP_INT_MAX;
echo "\n";
?>

Running this on the affected 32-bit Debian box results in:
4294967295
-1
2147483647

On my 64-bit Ubuntu box the results are:

4294967295
255
9223372036854775807

Something like this might be the ticket:

function ip4_mask_size ($mask)
{
        return bcdiv(0xffffffff , bcpow('2', $mask)) + 1;
        //return (0xffffffff >> $mask) + 1;
}

All credit goes to my workmate - hopefully this helps out a bit.
andriyanov

andriyanov

2012-09-15 23:23

reporter   ~0000790

Thank you for reporting. The fix is committed to 0.20.1.

dm0, thanks for your valuable help!
mmcrill

mmcrill

2012-09-17 17:14

reporter   ~0000799

This fix breaks my IPv4 view. I did a git clone and and I can't pull up the IPv4 view at all, it shows 1 network without any background or page layout.
andriyanov

andriyanov

2012-09-17 17:47

reporter   ~0000800

Please examine your http server error log
mmcrill

mmcrill

2012-09-17 17:51

reporter   ~0000801

PHP Fatal error: Call to undefined function bcsub() in racktables/inc/interface-lib.php on line 608, referer: https://MYSERVER/racktables/index.php?page=index&tab=default
mmcrill

mmcrill

2012-09-18 17:43

reporter   ~0000802

I awas missing the php-bcmath module! My bad, this has been resolved.
mmcrill

mmcrill

2012-09-18 17:43

reporter   ~0000803

Needed php-bcmath module
infrastation

infrastation

2012-09-18 18:16

administrator   ~0000804

This should be listed in the dependencies.
andriyanov

andriyanov

2012-09-28 19:10

reporter   ~0000823

added BC Math requirement

Issue History

Date Modified Username Field Change
2012-09-12 16:38 mmcrill New Issue
2012-09-12 20:19 infrastation Assigned To => andriyanov
2012-09-12 20:19 infrastation Status new => assigned
2012-09-12 20:21 infrastation Note Added: 0000782
2012-09-12 20:21 infrastation Category default => IPv4/IPv6/SLB
2012-09-13 11:47 andriyanov Note Added: 0000786
2012-09-13 15:21 mmcrill Note Added: 0000787
2012-09-13 15:21 mmcrill File Added: Capture.PNG
2012-09-14 04:55 dm0 Note Added: 0000788
2012-09-15 23:23 andriyanov Note Added: 0000790
2012-09-15 23:23 andriyanov Status assigned => closed
2012-09-15 23:23 andriyanov Resolution open => fixed
2012-09-15 23:23 andriyanov Fixed in Version => 0.20.1
2012-09-15 23:23 andriyanov Target Version => 0.20.1
2012-09-17 17:14 mmcrill Note Added: 0000799
2012-09-17 17:14 mmcrill Status closed => feedback
2012-09-17 17:14 mmcrill Resolution fixed => reopened
2012-09-17 17:47 andriyanov Note Added: 0000800
2012-09-17 17:51 mmcrill Note Added: 0000801
2012-09-17 17:51 mmcrill Status feedback => assigned
2012-09-18 17:43 mmcrill Note Added: 0000802
2012-09-18 17:43 mmcrill Note Added: 0000803
2012-09-18 17:43 mmcrill Status assigned => closed
2012-09-18 17:43 mmcrill Resolution reopened => fixed
2012-09-18 18:16 infrastation Note Added: 0000804
2012-09-18 18:16 infrastation Status closed => assigned
2012-09-28 19:10 andriyanov Note Added: 0000823
2012-09-28 19:10 andriyanov Status assigned => closed