Protected snapin unable to be deleted
-
hey folks
running version 4582 based on the fog icon and had set a snapin to be protected and linked to a second storage group.Now when I check that snapin the general tab and storage group tab respectively are blank.
So I cannot remove that definition or edit it.
I can remove the file itself from with the FOG server file system at /opt/fog/snapins.
I think from memory there is a way to manually edit the database to bypass this but search function on the forum seems limited at best at the moment.
regards, Kiweegie.
-
Yes, that’s the idea of protected status.
Protected means that no deletion can happen at all. Can you unset the protected status?
-
@Tom-Elliott Hi Tom, no that’s the point. I would have expected the general page of the snapin to let me deselect the “protect this snapin” checkbox but the whole page (same for storage groups page) is completely blank.
Does protecting a snapin prevent any editing thereafter?
Regards, Kiweegie
-
No, but are you on an old revision?
-
@Tom-Elliott Likely yes, last updated FOG some months (3-4?) ago - revision number in the Fog icon on web GUI shows as 4582.
git log -l
shows version 3971. Should I upgrade to bypass the issue? Is a specific revision recommended?
Cheers, Kiweegie.
-
I say update as I’m fairly sure I default a “primary group/node” for snapins and images if there is not one associated with it.
This should be fixed in current. -
@Tom-Elliott hmmm thats not really improved things
Now on git revision 4324 and all looking hunky dory apart from this one snapin. Now when clicking on the snapin the entire page is blank. Not just the general page and storage group pages being blank (but still showing Snapin Menu on the left and subheadings etc, now I get nothing, nada, rien, zip diddly squat. You get the idea.
URL goes to <fog IP address>/fog/management/index.php?node=snapin&sub=edit&id=3
Its only this one snapin and I don’t really care what happens to it - is there a way to nuke it from orbit?
-
@Kiweegie can you get the blank and then get me some of the trailing Apache error logs.
-
@Tom-Elliott HI Tom
accessing that page then tailing /var/log/httpd/error.log shows this
[Tue Nov 10 19:57:44 2015] [error] [client 10.***.***.***] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.***.***.***, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog IP address>/fog/management/index.php?node=snapin&sub=list [Tue Nov 10 20:01:44 2015] [error] [client 10.***.***.***] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.***.***.***, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog IP address>/fog/management/index.php?node=snapin&sub=list [Tue Nov 10 20:03:55 2015] [error] [client 10.***.***.***] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.***.***.***, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog IP address>/fog/management/index.php?node=snapin&sub=list [Tue Nov 10 21:12:02 2015] [error] [client 10.***.***.***] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.***.***.***, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog FQDN>/fog/management/index.php?node=snapin&sub=list
Can grab more if you need it. Accessing the snapin page with Chrome (I use Firefox as preferred browser) shows this error.
Server error
500
ReloadHide details
The website encountered an error while retrieving http://<fqdn of FOG Server>/fog/management/index.php?node=snapin&sub=edit&id=3. It may be down for maintenance or configured incorrectly.Not sure if that helps or not.
Regards Kiweegie.
-
I’ve confirmed the issue, but have not found a fix yet. I don’t consider it overly bearing, but rather a nuisance at this point. I assure you I will get it, but it may take a minute or two.
-
@Tom-Elliott Cheers Tom, appreciate the effort.
-
@Tom-Elliott Hi Tom just wanted to add some other issues found since upgrading to latest release (4324).
Clicking the Create New Host button results in a page which resolves to http://FQDN_of_FOGServer/fog/management/index.php?node=host&sub=add and just states
“Add new host definition”
List hosts and edit existing hosts works as expected. Create new User and Create new Group also working so looks like its limited to the Hosts entry.
Similarly if I try and export Hosts list to csv using Export Hosts button I get a Server 500 error in Chrome, a blank page in Firefox. Presume this is linked to the Snapins issue?
Happy to test other things, provide logs etc just let me know what you need from me.
regards Kiweegie.
-
@Kiweegie I’m not seeing any issues with creating a new host on my end. Is there any information in your apache error logs? Is it possible you have the location plugin and I messed something up there?
-
Found the create new host issue was related to the location plugin.
I have pushed a fix for this now. Thanks.
-
@Tom-Elliott HI Tom
Pulled down latest git version and the host element is resolved, thanks. Snapin deletion remains an issue though, is that expected?
regards Kiweegie.
-
@Kiweegie said:
@Tom-Elliott HI Tom
Pulled down latest git version and the host element is resolved, thanks. Snapin deletion remains an issue though, is that expected?
regards Kiweegie.
Additionally the Host Export function is still returning server error. Apache log below.
tail /var/log/httpd/error_log
[Fri Nov 13 13:44:05 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.6.15 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations [Fri Nov 13 13:46:24 2015] [error] [client 10.166.137.20] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.166.141.32, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog IP address>/fog/management/index.php?node=snapin&sub=list [Fri Nov 13 13:47:45 2015] [error] [client 10.166.137.20] PHP Fatal error: Call to undefined method AddLocationHost::subObjectIDs() in /var/www/html/fog/lib/plugins/location/hooks/AddLocationHost.hook.php on line 59, referer: http://<fog IP address>/fog/management/index.php?node=host&sub=import [Fri Nov 13 13:47:56 2015] [error] [client 10.166.137.20] PHP Fatal error: Call to undefined method AddLocationHost::subObjectIDs() in /var/www/html/fog/lib/plugins/location/hooks/AddLocationHost.hook.php on line 59, referer: http://<fog IP address>/fog/management/index.php?node=host&sub=import [Fri Nov 13 13:50:14 2015] [error] [client 10.166.137.20] PHP Fatal error: Call to undefined method AddLocationHost::subObjectIDs() in /var/www/html/fog/lib/plugins/location/hooks/AddLocationHost.hook.php on line 59, referer: http://<fog IP address>/fog/management/?node=host [Fri Nov 13 13:50:30 2015] [error] [client 10.166.137.20] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: 10.166.141.32, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://<fog IP address>/fog/management/index.php?node=snapin&sub=list
-
@Kiweegie I am still aware of the snapins being an issue as well as images and I have fixed the deletion of them on my side and just working out a couple other bugs.
-
@Kiweegie said:
Pulled down latest git version and the host element is resolved, thanks. Snapin deletion remains an issue though, is that expected?
Hopefully all of the errors you presented are now properly fixed. Thanks.
-
@Tom-Elliott Hi Tom, really appreciate the effort you’v put in to resolve this. I can confirm that the Host Export button now works as expected. Everything bar one is now functional as far as I can tell.
Edit of the snapin i wish to remove/mark as unprotected shows blank page. Log file element below will hopefully help you pinpoint issue.
[Fri Nov 13 15:50:17 2015] [error] [client 10.166.137.20] PHP Fatal error: Uncaught exception 'Exception' with message 'FOGFTP: Failed to connect. Host: <storage_server_IP>, Error: Undefined variable: whereArrayAnd' in /var/www/html/fog/lib/fog/FOGFTP.class.php:26\nStack trace:\n#0 /var/www/html/fog/lib/pages/SnapinManagementPage.class.php(224): FOGFTP->connect()\n#1 [internal function]: SnapinManagementPage->edit()\n#2 /var/www/html/fog/lib/fog/FOGPageManager.class.php(67): call_user_func(Array)\n#3 /var/www/html/fog/management/index.php(24): FOGPageManager->render()\n#4 {main}\n thrown in /var/www/html/fog/lib/fog/FOGFTP.class.php on line 26, referer: http://10.166.141.31/fog/management/index.php?node=snapin&sub=list
Line it refers to reads as
throw new Exception(sprintf('%s: Failed to connect. Host: %s, Error: %s', get_class($this), $this->get('host'), $error['message']));
cheers, Kiweegie
-
@Kiweegie I believe you may happen to just have a bad snapin.
Can you actually remove it yourself from the information? It’s looking for a variable that hit should not ever be able to see.