Default Item on PXE boot menu does not work
-
My fog server ignores the default item setting, it always boots to local disk.
I’m using Fog trunk 7380
Thanks! -
Did you uncheck default item for local disk?
-
@Quazz The default item for local disk was unchecked automatically when I selected Quick Image
http://i.imgur.com/ubFGbF7.png -
Confirmed. Need to look into this…
-
Moved to bugs.
-
Found, confirmed, fixed, and pushed. Thanks for reporting.
-
Thanks Tom! I played with that code for an hour or so yesterday but couldn’t get my head around it. The data array in the result was always empty which didn’t make any sense from my point of view. You know all that PHP code heaps better than I do - well you wrote most (if not all) of it!
@dvchuyen Can you please upgrade to the very latest version and let us know if things are working for you as well.
-
@Sebastian-Roth To help, it was the array causing the issue directly.
The FOG Controller tests if the data it’s receiving is numeric or an array. Because the getSubObjectID’s always returns an array, the is_array portion of the FOGController constructor was taking over. This was passing to the setQuery method.
The setQuery method is only meant to work on associative array’s where the left side are the relevant table/key information and the right side is the values that correspond to those keys. The getSubObjectID doesn’t send the keys to work again, just the array of data.
The fix, for what it’s worth, was to simply add
@max(self::getSubObjectIDs('PxeMenuOptions',array('default'=>1)))
to the getter on the bootmenu page.