Unusual Delete Image Behavior in RC14 (5968+5974)
-
Server
- FOG Version: RC14 (5968+5974)
- OS: CentOS 7.2.1511
Client
- Service Version: n/a
- OS: n/a
Description
Upon first attempt to delete an image via the Web GUI, the files within the folder for that image are deleted, but the folder and image definition remain.
Deleting the image a second time will then successfully delete the folder and the image definition as well. -
Confirmed the issue and hopefully have it fully addressed now.
It was a bit of an issue, but ultimately very simple. The files were deleting at least on one node (where possible) but failing to iterate due to return which was meant to be changed to a continue.
After finding that out, the issue was the folder for images would still exist (the data would be removed though).
After some fairly thorough testing (I tested what I could, when and where possible) it appears I’ve finally addressed the problem. Trailing folders get removed as well as the contents of those folders.
I’m solving this, and the other, for now. Feel free to keep us posted though.
-
Any apache errors?
-
From /var/log/httpd/error_log:
PHP Warning: ftp_delete(): Delete operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 243, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=140 PHP Warning: ftp_rmdir(): Remove directory operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 784, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=140 PHP Fatal error: Uncaught Error: Call to a member function close() on null in /var/www/html/fog/lib/fog/image.class.php:194\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogpage.class.php(2774): Image->deleteFile()\n#1 /var/www/html/fog/lib/fog/fogpagemanager.class.php(230): FOGPage->deletePost()\n#2 /var/www/html/fog/management/index.php(45): FOGPageManager->render()\n#3 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 194, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=140 PHP Warning: ftp_delete(): Delete operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 243, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=140
-
The problem exists with RC14v3 (5974) also.
PHP Warning: ftp_delete(): Delete operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 243, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=137 PHP Warning: ftp_rmdir(): Remove directory operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 784, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=137 PHP Fatal error: Uncaught Error: Call to a member function close() on null in /var/www/html/fog/lib/fog/image.class.php:194\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogpage.class.php(2774): Image->deleteFile()\n#1 /var/www/html/fog/lib/fog/fogpagemanager.class.php(232): FOGPage->deletePost()\n#2 /var/www/html/fog/management/index.php(45): FOGPageManager->render()\n#3 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 194, referer: http://devfog/fog/management/index.php?node=image&sub=delete&id=137
-
I remember this happening in an older release, but haven’t seen it since.
-
Also seeing this in RC14 5974.
-
Confirmed the issue and hopefully have it fully addressed now.
It was a bit of an issue, but ultimately very simple. The files were deleting at least on one node (where possible) but failing to iterate due to return which was meant to be changed to a continue.
After finding that out, the issue was the folder for images would still exist (the data would be removed though).
After some fairly thorough testing (I tested what I could, when and where possible) it appears I’ve finally addressed the problem. Trailing folders get removed as well as the contents of those folders.
I’m solving this, and the other, for now. Feel free to keep us posted though.