• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Unable to change Image Path

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    12
    3.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aparker
      last edited by

      Server
      • FOG Version: 1.4.3
      • OS: Ubuntu Server 16.10
      Client
      • Service Version: N/A
      • OS: N/A
      Description

      I’m trying to cleanup our image names and paths a bit. When trying to change the image path for a particular image I receive the error “Please choose a different path, this one is already in use by another image.” We only have seven images on this FOG server and I’ve verified with all other images that this path is not being used by any of the others. I’ve done this same process for several other images without any issues.

      I thought perhaps there might be an image that got orphaned in the images table. Running the query “select imagePath from images;” returns a list of all image paths, none of which match the path I’m trying to change this image to. The number of returned rows also matches the number of images we currently have visible in the GUI as well, so no orphaned image definitions.

      Any other ideas on what might be going on here and how I can get this image path changed? I supposed I could update directly in the database, but thought I’d check here before I went that route.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        Mind trying this?

        wget -O /var/www/fog/lib/pages/imagemanagementpage.class.php https://raw.githubusercontent.com/FOGProject/fogproject/0d1f0899460b40b069eeb17df1cb9fdd1f081e10/packages/web/lib/pages/imagemanagementpage.class.php
        

        It should fix the issue you are seeing.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        A 1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          We would need to see the command you’re using.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          A 1 Reply Last reply Reply Quote 0
          • A
            aparker @Wayne Workman
            last edited by

            @Wayne-Workman I’m sorry, I’m not sure I’m following. Which command? I’m trying to change the path via the GUI. The SQL query I ran to verify the path didn’t already exist was “Select imagePath from images”.

            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman @aparker
              last edited by Wayne Workman

              @aparker Oh, ok. We need to back up. So, changes in the GUI for certain things don’t actually change the settings that need changed in the OS. So if you wanted to change the image path, you’d need to make those paths first in the OS manually.

              For example, let’s say you wanted your new path to be /newimages the structure would look like this:

              /newimages
              /newimages/dev
              Needed files:
              /newimages/.mntcheck
              /newimages/dev/.mntcheck
              Make those files with the touch command, like touch /newimages/.mntcheck

              Next, for the images to actually be in the new path, you’d have to move them over. In this example, the command would be this:
              mv /images/* /newimages

              Permissions should be set as 777 recursively:
              chmod -R 777 /newimages
              Ownership should be set to fog:root
              chown -R fog:root /newimages

              More information on that stuff:
              https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_NFS#Creating_.26_verifying_.mntcheck_files

              Next, you’d need to modify /etc/exports to reflect the new (or additional) paths.

              Then, when you make those changes to a node in the GUI, they will work.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              A 1 Reply Last reply Reply Quote 0
              • A
                aparker @Wayne Workman
                last edited by

                @Wayne-Workman
                Let me clarify further. I’m aware of the process you’ve outlined here, but that’s not what I’m trying to do. We’re not moving our /images folder, I’m just trying to rename a folder for an image that’s in our /images folder. I’ll walk through exactly what I’m doing:

                1.) Rename folder in /images in the OS. In this case I’m renaming “/images/Lenovo_T450” to “/images/Lenovo_T450_W10ENT” .
                2.) Log into the FOG web GUI and browse to Image Management–>List All Images–>(Image indicated above).
                3.) Change the Image Path field from “Lenovo_T450” to “Lenovo_T450_W10ENT”. Click Update.
                4.) After clicking update, I get the error message “Please choose a different path, this one is already in use by another image.”

                My point is that that image path is not in use by another image. I’ve verified that with the SQL query I mentioned in my original post. The web GUI seems to think that image path is already in use though.

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @aparker
                  last edited by

                  @aparker Can you update to 1.4.4, I believe I saw this issue and fixed it between these releases. (It happened rather quickly so I may have missed it in the commits list. If it’s still not fixed, that’s okay I know what to do to fix it anyway).

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  A 2 Replies Last reply Reply Quote 0
                  • A
                    aparker @Tom Elliott
                    last edited by

                    @Tom-Elliott Shouldn’t be a problem, I’ll update by end of the day today.

                    1 Reply Last reply Reply Quote 0
                    • A
                      aparker @Tom Elliott
                      last edited by

                      @Tom-Elliott
                      Finally got a chance to give this a go. Upgraded to 1.4.4, but with no change–I’m still unable to save the image with the new image path.

                      On a perhaps related note, I never did get prompted to update the database when I navigated to http://<IPAddress>/fog/management as instructed by the installer. Not sure if this is expected behavior with this release, but that’s the first time I’ve seen that.

                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott @aparker
                        last edited by

                        @aparker Schema updates don’t always happen, we just don’t know when they will which is why that message is present on the installer.

                        Can you show a picture of the error you’re seeing? I’m unable to replicate the problem on my side.

                        How am I testing:

                        Open Images, find an image, edit the image path and save. Goto another page, hard refresh, go back to the same image and look at the setting. (The other page, hard refresh is to ensure the browser isn’t caching past information). The setting remains.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          aparker @Tom Elliott
                          last edited by

                          @Tom-Elliott
                          Sure thing. Here’s the error message I’m getting when attempting to save the new path:
                          http://i.imgur.com/UEiMOQ3.png

                          Here you can see I’ve changed the folder name at the file system level:
                          http://i.imgur.com/yenv9eH.png

                          And here you can see that there are no other images in the database using that path:
                          http://i.imgur.com/L2kW3dk.png

                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            Mind trying this?

                            wget -O /var/www/fog/lib/pages/imagemanagementpage.class.php https://raw.githubusercontent.com/FOGProject/fogproject/0d1f0899460b40b069eeb17df1cb9fdd1f081e10/packages/web/lib/pages/imagemanagementpage.class.php
                            

                            It should fix the issue you are seeing.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              aparker @Tom Elliott
                              last edited by

                              @Tom-Elliott
                              That did the trick, thanks!

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post

                              214

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project