Surface Go 2 (microsoft surface usb-c ethernet adapter) won't boot bzImage on fog 1.5.9.2 and Getting database update errors
-
@Sebastian-Roth @george1421
Ran the debug task.
It gets through everything normal all the way up toTask Complete
then it says
Updating Database.........................Failed
Then it repeats theError Returned: Machine Details:-
repeatedly. (It’s hard to count them with shift+ page up/page down but I believe it’s about 10 retries for updating the database if that helps to find where this is happening in the code) -
@Tom-Elliott @Sebastian-Roth @george1421
I gave something else a try. I looked at the commits included in the dev_branch since 1.5.9 and found that Tom had added the machine details array in the
taskqueue.class.php
file.First thing I tried was adding a primary user to the host, in case that being empty was somehow a problem. No dice.
Looking at it, it’s just a prettier more informative email array. But the parameters in that object must be used somewhere else, because I reverted the file to its last commit (made a .old version of it on my server, made a new version of it with the previous version’s contents) just to see if that change maybe broke something.
My debug task was waiting for me to hit enter at another updating database attempt, so I hit enter, and viola!
So now we gotta figure out why in the world that change in the email sent would break the database update to say the task is completed.
edit:
I debugged it a bit further. Restored the newer version of the file and started commenting things out one at a time to confirm the problem.The code here is where the problem lies (line 293-315 of
taskqueue.class.php
found at https://github.com/FOGProject/fogproject/blob/99bb17b168e929796a8d76526f73bcfdac11bb4b/packages/web/lib/reg-task/taskqueue.class.php)$Inventory = self::$Host->get('inventory'); $mac = self::$Host->get('mac')->__toString(); $ImageName = $this->Task->getImage()->get('name'); $ImageStartTime = self::niceDate($this->Task->get('checkInTime')); $ImageEndTime = self::niceDate(); $duration = self::diff($ImageStartTime, $ImageEndTime); $Snapins = implode(',', (array)$SnapinNames); $email = array( sprintf("%s:-\n", _('Machine Details')) => '', sprintf("\n%s: ", _('Host Name')) => self::$Host->get('name'), sprintf("\n%s: ", _('Computer Model')) => $Inventory->get('sysproduct'), sprintf("\n%s: ", _('Serial Number')) => $Inventory->get('sysserial'), sprintf("\n%s: ", _('MAC Address')) => $mac, "\n" => '', sprintf("\n%s: ", _('Image Used')) => $ImageName, sprintf("\n%s: ", _('Snapin Used')) => $Snapins, "\n" => '', sprintf("\n%s: ", _('Imaged By')) => $engineer, sprintf("\n%s: ", _('Imaged For')) => $primaryUser, sprintf("\n%s: ", _('Imaging Started')) => $ImageStartTime, sprintf("\n%s: ", _('Imaging Completed')) => $ImageEndTime, sprintf("\n%s: ", _('Imaging Duration')) => $duration );
If I comment out the last 3 pieces of the array and try again, the database updates and all is well again
$Inventory = self::$Host->get('inventory'); $mac = self::$Host->get('mac')->__toString(); $ImageName = $this->Task->getImage()->get('name'); $ImageStartTime = self::niceDate($this->Task->get('checkInTime')); $ImageEndTime = self::niceDate(); $duration = self::diff($ImageStartTime, $ImageEndTime); $Snapins = implode(',', (array)$SnapinNames); $email = array( sprintf("%s:-\n", _('Machine Details')) => '', sprintf("\n%s: ", _('Host Name')) => self::$Host->get('name'), sprintf("\n%s: ", _('Computer Model')) => $Inventory->get('sysproduct'), sprintf("\n%s: ", _('Serial Number')) => $Inventory->get('sysserial'), sprintf("\n%s: ", _('MAC Address')) => $mac, "\n" => '', sprintf("\n%s: ", _('Image Used')) => $ImageName, sprintf("\n%s: ", _('Snapin Used')) => $Snapins, "\n" => '', sprintf("\n%s: ", _('Imaged By')) => $engineer, sprintf("\n%s: ", _('Imaged For')) => $primaryUser //sprintf("\n%s: ", _('Imaging Started')) => $ImageStartTime, //sprintf("\n%s: ", _('Imaging Completed')) => $ImageEndTime, //sprintf("\n%s: ", _('Imaging Duration')) => $duration );
-
Mod Note: Moving this over to the Bug Reports forum.
I know that was a late add-in feature just before 1.5.9 was released. Its strange how/why it is impacting imaging through.
@Developers thoughts?
ref: https://forums.fogproject.org/topic/14749/feature-modification-request-image-task-email-addition
-
@JJ-Fullmer Thanks heaps. Somehow must have missed that one in the last days. I am onto this and will get back to you soon.
@george1421 It’s no in 1.5.9 but was added just after he release.
-
@JJ-Fullmer Please try the following: Add back the three lines you commented and add some
->format(...)
code to lines 296 and 297 to make them look like this:... $ImageStartTime = self::niceDate($this->Task->get('checkInTime'))->format('Y-m-d H:i:s'); $ImageEndTime = self::niceDate()->format('Y-m-d H:i:s'); ...
I will push a fix soon!
-
@Sebastian-Roth I’ve added the change just to keep it up to snuff. Sorry I missed that part. @JJ-Fullmer and @Sebastian-Roth
-
@Sebastian-Roth said in Surface Go 2 (microsoft surface usb-c ethernet adapter) won't boot bzImage on fog 1.5.9.2 and Getting database update errors:
I will push a fix soon!
So for fog admins that have this issue would the instructions be to do a
git pull
on the local fog repo and then rerun the installer? -
@george1421 said in Surface Go 2 (microsoft surface usb-c ethernet adapter) won't boot bzImage on fog 1.5.9.2 and Getting database update errors:
So for fog admins that have this issue would the instructions be to do a git pull on the local fog repo and then rerun the installer?
Yes but as I said, this is only in the latest
dev-branch
but not if you use the last official release 1.5.9… -
@Tom-Elliott no worries, a mistake anyone could make.
@Sebastian-Roth I will update my install shortly and re-image one of the machines. Will this also change my kernel? Will I need to remake that change for the surface ethernet adapter?
-
@JJ-Fullmer said in Surface Go 2 (microsoft surface usb-c ethernet adapter) won't boot bzImage on fog 1.5.9.2 and Getting database update errors:
I will update my install shortly and re-image one of the machines. Will this also change my kernel? Will I need to remake that change for the surface ethernet adapter?
You will need to re-download the 5.6.18 kernel.