Unable to Capture Image - Invalid Storage Group
-
Hi,
I’m having issues capturing an image in FOG. The capture process captures all of the partitions and then at the very end, it gives an error - “Could not complete tasking (/bin/fog.upload)” and it has “Error returned: Invalid Storage Group” listed many times above. I’m running FOG version 1.5.6
Any help would be appreciated.
Thanks!
-
@jramos76 I would think this issue is solved in the current version of FOG - 1.5.8. Though you might give manually fixing this in the code a quick try before you head into an update.
Edit
/var/www/html/fog/lib/fog/task.class.php
on your FOG server, go to line 251 and change the code frompublic function getStorageGroup() { return $this->get('storagegroup'); }
to
public function getStorageGroup() { return new StorageGroup($this->get('storagenode')->get('storagegroupID')); }
For reference, here is the commit that should fix the issue: https://github.com/FOGProject/fogproject/commit/3c28f7bf862662a790ac2876db79f0c80bd0d89a#diff-8f1eb4dac68b90b06624e0fefdbfe47c
-
@Sebastian-Roth Thanks for the code edit. I made the changes and my GUI stopped working so I couldn’t test if the capture works now. I restarted the server, but I still get “The page isn’t working” HTTP ERROR 500.
-
@jramos76 Sorry for that. I am very sure there must be something you got wrong when editing. Please copy and paste the code you have in that file now (line 240 to 260 for example) and post that here.
-
@Sebastian-Roth Here is the code:
public function getHost()
{
return $this->get(‘host’);
}
/**
* Returns the storage group object.
*
* @return object
/
public function getStorageGroup()
{
return new StorageGroup($this->get(‘storagenode’)->get('storagegroupID));
}
/*
* Returns the storage node object.
*
* @return object
/
public function getStorageNode()
{
return $this->get(‘storagenode’);
}
/*
* Returns the image object. -
@jramos76 Sorry for the late reply. Just saw this now. Too much other work…
Take a close look at the code you posted. There is the last
'
(single quote) missing close to the end of the line. This would be causing the HTTP 500 I think. Better you copy&paste that code from the forums… -
@Sebastian-Roth Yes, my mistake. Thank you for noticing the missing quote. I now have the GUI back. I’ll post back here how the capture goes. Thanks again and have a nice day!
-
@Sebastian-Roth - I tried to do the capture again and still receive the same error message (Unable to capture image). Do you have other suggestions or are we at the point of upgrading to FOG 1.5.8? If so, do you have a link to instructions for upgrading? Thank you for your help with this.
-
@jramos76 I suggest you first take a picture of the error on screen, upload that to an image share and post a link here. Unless we see the exact error we cannot be sure.
-
@Sebastian-Roth Here is the error: https://ibb.co/gzWYsfQ
-
@jramos76 Hmmm, still not sure if this is caused by an issue in the old FOG 1.5.6 version. Do you use any plugins (like Location plugin)?
Please check the task list in the FOG web UI when you have a task scheduled. What does it show in the column “Working with node”?
-
@Sebastian-Roth - It says “DefaultMember”
-
@Sebastian-Roth Also, I don’t use any plugins.
-
@jramos76 Ok. I think it’s best you update to the latest version and if you still get the error we can take another look at the code. I am almost certain it doesn’t happen anymore.
We just pushed out a version called 1.5.9-RC1 as a release candidate for the new to come 1.5.9 version. It’s close to final. I recommend you to use that because there were a few issues in 1.5.8 which is the last official release currently. 1.5.9-RC1 has those all fixed!
-
@Sebastian-Roth Ok, thank you. Do you have a link with instructions on how to get 1.5.9-RC1?
-
@jramos76 Using the following commands:
sudo -i cd /opt git clone https://github.com/FOGProject/fogproject/ cd fogproject/bin/ ./installfog.sh
-
@Sebastian-Roth Thank you for the instructions. Updating FOG to 1.5.9-RC1 resolved the issue. I am now able to capture and restore an image without issue.
-
@jramos76 Good to hear things are working for you with 1.5.9-RC1.