View Issue Details

IDProjectCategoryView StatusLast Update
0001811RackTablesdefaultpublic2018-01-11 16:58
ReporterbcsmithAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001811: object with L2Address set in port produces error when viewing the object
DescriptionUncaught exception: InvalidArgException
Argument 'string' of value '00:50:56:b6:1c:d3' is invalid (invalid format). (0)
at file /var/www/RackTables-0.21.1/wwwroot/inc/functions.php, line 1036

/var/www/RackTables-0.21.1/wwwroot/inc/database.php:878 l2addressFromDatabase('00:50:56:b6:1c:d3')
/var/www/RackTables-0.21.1/wwwroot/inc/database.php:898 fetchPortList('Port.object_id = ?', Array
(
    [0] => 660
)
)
/var/www/RackTables-0.21.1/wwwroot/inc/database.php:728 getObjectPortsAndLinks('660')
/var/www/RackTables-0.21.1/wwwroot/inc/interface.php:1385 amplifyCell(Array
(
    [realm] => object
    [id] => 660
    [name] => wpkfl-lms4-sentry
    [label] =>
    [asset_no] => VPS-wpkfl-lms4-sentry
    [objtype_id] => 1504
    [rack_id] =>
    [container_id] =>
    [container_name] =>
    [container_objtype_id] =>
    [has_problems] => no
    [comment] =>
    [nports] => 1
    [8021q_domain_id] =>
    [8021q_template_id] =>
    [etags] => Array
        (
        )

    [itags] => Array
        (
        )

    [dname] => wpkfl-lms4-sentry
    [atags] => Array
        (
            [0] => Array
                (
                    [tag] => $id_660
                )

            [1] => Array
                (
                    [tag] => $typeid_1504
                )

            [2] => Array
                (
                    [tag] => $any_object
                )

            [3] => Array
                (
                    [tag] => $cn_wpkfl-lms4-sentry
                )

            [4] => Array
                (
                    [tag] => $unmounted
                )

            [5] => Array
                (
                    [tag] => $attr_4_2109
                )

            [6] => Array
                (
                    [tag] => $untagged
                )

        )

)
)
renderObject('660')
/var/www/RackTables-0.21.1/wwwroot/index.php:35 call_user_func('renderObject', '660')
Parameters:
GET
page object
tab default
object_id 660
POST
COOKIE
_ga GA1.2.1515105809.1503406429
PHPSESSID 9s0ueis8p3e7amnnv9789golk1
Additional InformationI was on racktables 0.20.11 and have upgraded to 0.21.01. Any nodes with a mac address set produce the error when viewing the node. Seems it wants it to be a string from the DB but the schema is set to char.
TagsNo tags attached.

Activities

bcsmith

bcsmith

2018-01-11 16:57

reporter   ~0003767

I found the issue, if i select Port in the db:
mysql> select * from Port where object_id = '1055';
+------+-----------+------+--------+------+-------------------+---------------------+-------+
| id | object_id | name | iif_id | type | l2address | reservation_comment | label |
+------+-----------+------+--------+------+-------------------+---------------------+-------+
| 660 | 1504 | eth0 | 1 | 24 | 00:50:56:b6:1c:d3 | NULL | NULL |
+------+-----------+------+--------+------+-------------------+---------------------+-------+

Removing the ":" out of l2address fixed the issue. with the following command

update Port set l2address = '005056B61CD3' where object id = '1504';

Issue History

Date Modified Username Field Change
2018-01-11 16:26 bcsmith New Issue
2018-01-11 16:57 bcsmith Note Added: 0003767
2018-01-11 16:58 bcsmith Status new => closed
2018-01-11 16:58 bcsmith Resolution open => fixed