View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|1787||RackTables||default||public||2017-09-15 00:24||2018-10-23 04:54|
|Platform||CentOS release 6.9 (Final)||OS||OS Version|
|Target Version||Fixed in Version|
|Summary||1787: Argument 'bypass' of value '(NULL)' is invalid|
|Description||We have upgraded from 0.20.11 to 0.20.14 hoping that this would fix the "Argument 'bypass' of value '(NULL)' is invalid" error but it has not.|
Clicking on Objects gives the following error:
Argument 'bypass' of value '(NULL)' is invalid (must be specified for the given page name).
Looks like a similar issues was reported in 2013 and resolution was fixed (http://bugs.racktables.org/view.php?id=823)
|Steps To Reproduce||Clicking on Objects|
|Tags||No tags attached.|
|Does this installation of RackTables list any issues under reports/data integrity?|
|no issues listed .... "No integrity violations found"|
Could you add the following to the secret.php file and if it prints a stack trace instead of the original error message, copy it here?
$debug_mode = TRUE;
Uncaught exception: InvalidArgException
Argument 'bypass' of value '(NULL)' is invalid (must be specified for the given page name). (0)
at file /var/www/RackTables-0.20.14/wwwroot/inc/functions.php, line 2961
/var/www/RackTables-0.20.14/wwwroot/inc/interface.php:2422 mkA('row#', 'row', NULL)
/var/www/RackTables-0.20.14/wwwroot/index.php:35 call_user_func('renderDepot', NULL)
Thank you for the update. This issue is not a duplicate as far as I can tell. Looks like it is caused by invalid data coming from the function getMountInfo(); that function has not changed for at least 5 years but I don't remember any similar reports.
If the root cause is discrepancies in the database, the fact the integrity report does not detect them is a bug itself. If I have the time to look into this, I will request more debugging information and provide means to retrieve it.
Some objects were listed as being in two racks. I am not sure how this happened (bad csv import?) but I have deleted the incorrect rows (rack_id 29) from the database and now the object view works.
mysql> select * from RackSpace where object_id=2197;
| rack_id | unit_no | atom | state | object_id |
| 29 | 43 | interior | T | 2197 |
| 29 | 43 | rear | T | 2197 |
| 946 | 43 | interior | T | 2197 |
| 946 | 43 | rear | T | 2197 |
I do not think this case should ever happen so a new data integrity check can be created. If the following query returns any rows it means the object is in more then one rack
select object_id, count(*) racks from (select distinct rack_id, object_id from RackSpace) rs group by object_id having racks > 1;
The case of objects being in two racks is useful for planning out migrations between two locations, but it isn't the actual cause of the problem, as this alone doesn't cause the error.
I was mass deleting some objects with commitDeleteObject() on the output of various SQL queries, and ran into the same error message. I've traced it to the case where commitDeleteObject() is passed a rack objectID before every object in that rack might be removed from RackSpace. commitResetObject only removes the objectID from the rack; it doesn't deal with the case where the objectID is the rack. This causes the rack object removal to fail, but the entities linking it to the row do get removed. After the entity links for the row have been removed, mkA() ends up being passed NULL for the row_id, which causes the exception.
When commitResetObject is passed a rack, the delete for RackSpace should probably use array( 'rack_id' => $object_id ) instead of array('object_id' => $object_id). This will let the rack removal complete properly, and not leave the DB in a bad state.
An integrity check to catch this would ensure that every rack_id in RackSpace has a matching EntityLink for row, so that mkA won't later fail.
|2017-09-15 00:24||rdinoff||New Issue|
|2017-10-23 16:22||infrastation||Note Added: 0003747|
|2017-10-23 16:35||rdinoff||Note Added: 0003749|
|2017-10-23 16:45||infrastation||Note Added: 0003751|
|2017-10-23 17:34||rdinoff||Note Added: 0003753|
|2017-10-23 22:47||infrastation||Note Added: 0003755|
|2018-04-09 04:52||rdinoff||Note Added: 0003775|
|2018-10-23 04:54||neuro42||Note Added: 0003827|