Images won't be deleted in filesystem when using the webui delete option



  • Hi,

    I’m using FOG server 1.5.5 on ubunbtu 16.04.
    My storage is made of iSCSI LUNS.

    I can create image without any issue but deleting them via the webUI won’t delete them on the filesystem.

    I found this in the apache log, but not sure it’ll help :

    [Thu May 23 09:13:45.814151 2019] [proxy_fcgi:error] [pid 29322] [client 10.33.0.63:32884] AH01071: Got error 'PHP message: PHP Warning:  trim() expects parameter 1 to be string, array given in /var/www/html/fog/lib/fog/fogbase.class.php on line 1382\n', referer: http://10.33.0.11/fog/management/index.php?node=image&sub=deletemulti
    

    Another strange thing :

    the images folder are sometimes own by fog:root, 1002:root or root:root.
    The folder containing all other images folder belong to 1002:root.

    I suppose my problem is a owner issue, so what should be the right owner.



  • @Sebastian-Roth

    it worked ! Many thanks I did not even noticed this tab!


  • Developer

    @processor said in Images won't be deleted in filesystem when using the webui delete option:

    To be sure I tried again with one image only and strangely the result is exactly the same.

    Ahhh, here we go! It’s still a “multidelete” if you do it the checkbox delete way. The other way to delete an image is by going into the image settings as if you’d like to edit things. Then at the top there are four tabs: Info, General, Storage Group, Membership and Delete. Take this route and you should see the image files being removed as well if you select the checkbox “Delete files”…

    Edit: As well I cannot replicate the PHP warning “trim() expects parameter 1 to be string, array given”, so not sure what to do about it. It’s not causing the issue I am sure.



  • @Sebastian-Roth
    no worries.

    I already tried what you suggested and it did not helped unfortunately.
    I did not noticed the “deletemulti” in the url. To be sure I tried again with one
    image only and strangely the result is exactly the same :

    [Wed Jun 26 17:03:26.511411 2019] [proxy_fcgi:error] [pid 28204] [client 10.33.0.200:39938] AH01071: Got error 'PHP message: PHP Warning:  trim() expects parameter 1 to be string, array given in /var/www/html/fog/lib/fog/fogbase.class.php on line 1386\n', referer: http://10.33.0.11/fog/management/index.php?node=image&sub=deletemulti
    

    whereas this time I’m sure I did not check more than one image.

    for info my images are not stored in /images but in /mnt/FOG_iSCSI (mounted iSCSI LUN) so of course I adapted the chown to my configuration.


  • Developer

    @processor I have not had enough time to look into this. Thanks for upping the topic.

    I would suggest you run chown -R fogproject:root /images to have it all set properly for now.

    In the URL you posted I see “sub=deletemulti”. I think that this is intended behavior that files won’t be deleted from disk if you delete multiple images in one go. See here: https://forums.fogproject.org/topic/12714/option-to-delete-files-when-deleting-multiple-images-snapins



  • A little up for this remaining issue.



  • @Quazz
    My setup is now updated from 1.5.5 to 1.5.6.
    It’s very strange, once created, some are now belonging to fogproject:root and other to root:root.
    And no matter whom they belong to, a delete through the webui does not remove them from the drive.

    Any Idea?


  • Moderator

    Versions before 1.5.6 : folders should be owned by fog:root

    1.5.6 and newer: folders should be owned by fogproject:root



  • I noticed the same thing some time ago, but wasnt sure it always happened so never reported it. Didnt try for some time to delete an image though.


Log in to reply
 

539
Online

6.3k
Users

13.7k
Topics

129.2k
Posts