Latest FOG 0.33b
-
Michael,
I don’t think there’s an easy way to go about it, besides manually, though that doesn’t mean it couldn’t happen.
I think you would want to do the INNER JOIN Fields. Are you comfortable performing CSV Exports using SQL Code?
I think the two tables you’re looking at here would be: hosts and hostMAC tables.
The way you’d perform the query would be:
[code]SELECT * FROM hosts INNER JOIN hostMAC ON (hostID=hmHostID)[/code]Getting it into the format you need should be similar. All, I’d imagine, you should need would be:
hostName, hostMAC, hmMAC, imageID, and possibly Description, though you may also want to get he hostID so hostMAC (Primary) and hmMAC (additional) line up properly.
-
[quote=“Tom Elliott, post: 19503, member: 7271”]Your first method, adjusting through the web GUI is correct.
Can you provide a bit of your httpd/apache2 error log. Maybe it’s telling you what the issue is.
I only ask because, I know this works for 0.33, but am nearly certain it does for 0.32 as well. It sounds like some other issue is occuring. Maybe the IMAGE_ID Field needs to be set to the proper ID you want the quick register systems to image with?[/quote]
Hi tom, thanks for sending me to the apache logs, I found the following errors:
[CODE][Thu Oct 31 13:08:54 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with Suhosin-Patch configured – resuming normal operations
[Thu Oct 31 13:17:56 2013] [error] [client 192.168.1.20] PHP Fatal error: Call to a member function createImagePackage() on a non-object in /var/www/fog/service/auto.register.php on line 236
[Thu Oct 31 14:20:11 2013] [error] [client 192.168.1.1] File does not exist: /var/www/favicon.ico
[Thu Oct 31 14:39:32 2013] [error] [client 192.168.1.20] PHP Fatal error: Call to undefined function checkIn() in /var/www/fog/service/mc_checkin.php on line 43
[/CODE]I have removed and re-installed fog 0.32 and 0.33b multiple times now with no success on repairing the issue, where should I go form here? I looked at the code on those lines and it is all mumbo jumbo to me.
-
My best guess is that you still need to set your OS_IMAGE_ID needs to be set still, though I’m not 100% sure.
In 0.33, the line should be:
[php]if( $Host->createImagePackage(1,“AutoRegTask”,true,true,true) )[/php]Basically this references the class file function createImagePackage
This doesn’t need huge explaining, but this is where the image task gets created.
The 1 means deploy task, the “AutoRegTask” just sets the name, and the true, true, true, means, set shutdown after, set debug, and set deploy snapins.
In 0.32 the line should be:
[php]if( createImagePackage($conn, $imageMember, “”, $tmp, false ) )[/php]
This, again, means it’s creating the image package.
The $conn just sends the database information, $imageMember is sending the host information, “” is just setting the task name (as nothing), the $tmp is sending the reason, and the false is just setting the debug information.
I have the sneaky, albeit blind, suspision you still haven’t set the IMAGE_ID that you want this associated with. In 0.33b, you’ll get the non-object error thrown because it can’t send back the class information, so the object doesn’t exist yet. I don’t know which error’s you’re getting with 0.32 as it seems to be the error you provided is from a 0.33b install.
-
Sorry Tom I avoided answering the question about the IMG_ID because I’m almost 100% certain that’s not the problem. The reason I’m so confident is because after the quick registration via PXE menu, the host has the correct image ID assigned to it, which I believe to mean that its working as intended. See the attached images.
If I queue the task through the web UI, the client machine successfully images. I would like to avoid having to use the web ui as much as possible. Should I do another fresh install and try again? I already have an existing fog server running with 0.30 and ubuntu 10.04 LTS that runs fine, but i figured I would update to a newer version.
[url=“/_imported_xf_attachments/0/424_photo 1.JPG?:”]photo 1.JPG[/url][url=“/_imported_xf_attachments/0/425_photo 2.JPG?:”]photo 2.JPG[/url][url=“/_imported_xf_attachments/0/426_photo 3.JPG?:”]photo 3.JPG[/url]
-
Can you do me a favor:
If I’m correct that you’re running FOG 0.33b, then can you please edit the line state (236 I think from the log file)
[code]vi /var/www/fog/service/auto.register.php
:236[/code]Edit the line from:
[php]$Host->createImage…[/php]
to:
[php]$imageMember->createImage…[/php]And try again:
My guess, through looking at the code is that the $Host variable doesn’t exist in this particular part of the code, which is why it’s giving you the error throw in the log file. However, $imageMember is set directly before hand and should return the Host Class information as required.
Thank you,
-
Thanks for all your help Tom, The change didn’t solve the issue. I just did another fresh OS install and a fresh fog install and the problem still happens. I’ll just stick to the old fog server for now. Cheers anyway.
-
DanielR,
Is there anyway I can have you try a few more things?
I’d prefer to get this working fully, at least then we know where the issue is. I can’t be sure for 0.32, but I know we’re close for 0.33b.
Thank you,
-
I’m giving a go with some modifications of the auto.register.php file.
Please download the file attached here and place it on your 0.33b FOG Server in the /var/www/fog/service/ directory.
[url=“/_imported_xf_attachments/0/427_auto.register.php?:”]auto.register.php[/url]
-
Have anyone tested FOG 0.33b multicast function?
I could not get it to work, the clients just sits at “Checking In…Done” and then a lot of *
The job/task is put into the “Active Tasks” menu, and not in the “Active Multicast Tasks” for some reason?I downloaded fog 0.33b last week, from the link on the first page.
Any ideas?
-
Hello!
I have tested snapin deployment in fog 0.33 beta and it doesn’t work properly.
- Creating a single snapin deployment will create a task with all snapins, who are associated to the host.
- If the fog Service client on the host tries to install snapins, the server respons with the error that a image task is running. I looked into the php files and find out that a method named getCountOfActiveTasksForHost from class FOGManagerController counts the active tasks for the hosts and snapin tasks are there counted too.
Hope that this informations will help fixing the snapins deployment and make fog 0.33 beta better.
-
@Albatros,
If you delete the Active Task for the host, but leave the snapin task, for now, it will deploy the snapin’s as expected. I haven’t figured out a good method yet to getting the snapin deployment only to operate. -
Can you attempt multicast task and when this is trying to run, attach a copy of the apache error logs. I can try to see why it’s not working. I haven’t had much time to play with multicast especially as I don’t create multicast jobs where I work. So it’s not something I’m fully aware of yet.
-
[quote=“KyroDK, post: 19566, member: 18077”]Have anyone tested FOG 0.33b multicast function?
I could not get it to work, the clients just sits at “Checking In…Done” and then a lot of *
The job/task is put into the “Active Tasks” menu, and not in the “Active Multicast Tasks” for some reason?I downloaded fog 0.33b last week, from the link on the first page.
Any ideas?[/quote]
I had the same problem.
-
[quote=“Tom Elliott, post: 19544, member: 7271”]I’m giving a go with some modifications of the auto.register.php file.
Please download the file attached here and place it on your 0.33b FOG Server in the /var/www/fog/service/ directory.[/quote]
I replaced the file and tested. Once it gets to the attempting to register host… it just keeps returning blank lines. Now there is no host registered at all.
-
Can you please get your apache logs a go:
[code]/var/log/apache2/error.log[UBUNTU]
/var/log/httpd/error_log[REDHAT][/code]And see what it’s telling you? That way I can make the proper tweaks to the file to help you further.
-
[quote=“Tom Elliott, post: 19574, member: 7271”]@Albatros,
If you delete the Active Task for the host, but leave the snapin task, for now, it will deploy the snapin’s as expected. I haven’t figured out a good method yet to getting the snapin deployment only to operate.[/quote]If I removed the task from the active tasks and let the snapin tasks running, I get an error in the fog service log file, that the file couldn’t be downloaded. Looks like that the parameters aren’t that are given to download the file aren’t correct.
To the tasks, couldn’t be possible to write a method that counts all task that are not snapins tasks?
-
I’m looking into the file download issue, but I think I’ve got the fix for that already.
I don’t know if I uploaded the commit for that yet, but I think this should do the trick:
In file:
[code]{fogwebdir}/service/snapins.file.php[/code]Edit the line that has this: (ON OR AROUND LINE 55)
[php]@readfile($snapinTask->getSnapin()->get(‘file’));[/php]Make it say:
[php]@readfile( $GLOBALS[‘FOGCore’]->getSetting(‘FOG_SNAPINDIR’).‘/’.$snapinTask->getSnapin()->get(‘file’)); [/php]That should get you back to downloading the file and the system should try installing the file after that.
I’ll try to look into this to make sure this works as expected in the next day or two.
As for the methods, the problem isn’t so much the task itself, but because you can Schedule it, it actually creates an Image Task based on the current system. I suppose I could add the method to delete the image task after creating it if it’s the Snapin types, but I have to figure out the best approach first.
-
[quote=“Tom Elliott, post: 19575, member: 7271”]@KyroDK
Can you attempt multicast task and when this is trying to run, attach a copy of the apache error logs. I can try to see why it’s not working. I haven’t had much time to play with multicast especially as I don’t create multicast jobs where I work. So it’s not something I’m fully aware of yet.[/quote]
The log file is from where I tried to multicast to 2 PC’s.
[url=“/_imported_xf_attachments/0/432_error.zip?:”]error.zip[/url]
-
Based on my findings in your log file @KyroDK, it’s because the checkIn Function doesn’t exist in any of the files if found. It’s called, but doesn’t exist which is why you’re seeing this problem.
I’ll add this function and try to get this reposted for you today.
-
r993 is out.
Should contain the function that was missing for Multicast and hopefully allow download of the snapin files from the proper location now.