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

Truncate hostname

Scheduled Pinned Locked Moved Solved
Feature Request
3
4
2.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.
  • F
    Frazer
    last edited by Sep 13, 2013, 8:08 AM

    Hi,
    I know some people have had problems with this in the past and have written their own fixes/hacks but would be nice to have the following in 0.33.

    On full host registration, ask for OS selection before the hostname.
    When windows based host is selected, truncate/limit the hostname to 15 characters as per windows naming convention.

    When windows is selected for a host, limit the hostname box on the web interface to 15 characters.

    [url]http://support.microsoft.com/kb/909264[/url]
    Maybe warn about unsupported characters?

    Thanks

    EDIT:
    Just looking at this post:
    [url]http://fogproject.org/forum/threads/host-os-should-be-linked-to-the-image-and-not-the-host-computer.4452/[/url]
    Perhaps my suggestion should be changed slightly.
    Ask for the Image first on Full host registration first and then limit the following hostname box accordingly.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Sep 13, 2013, 10:57 AM

      Asking for hostname, and/or, image ID first isn’t a hard task to accomplish, however it is still a script that’s reading the data. There are checks and balances however within the auto.register.php file that check if the hostname is longer than a certain number of characters. If it is, it stores the system’s MAC as the hostname without Colons.

      Checking for Special characters may be slightly more difficult, but I’ll look into it.

      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

      1 Reply Last reply Reply Quote 0
      • F
        Frazer
        last edited by Sep 13, 2013, 12:51 PM

        Hi Tom,
        I realise the web page already has a limit, but that limit is 16.

        From the Microsoft support documentation “Note The 16th character is reserved to identify the functionality that is installed on the registered network device.”

        The limit needs to be 15 for the hostname.

        The reason for having the image/os first on registration, is so that the script can then limit the hostname entry to 15 when a windows image/OS is selected.

        I’ve no idea if linux/other OS’s have the same restrictions or not, but you could then apply each OS’s hostname restriction after choosing the relevant image/OS.

        1 Reply Last reply Reply Quote 0
        • C
          chad-bisd Moderator
          last edited by Sep 13, 2013, 6:35 PM

          In FOG 0.33, the host no longer has an OS. The OS is tied to the image.

          I have modified the script in the init.gz to truncate to 15 characters and warn if truncation was necessary. I still have not modified the webUI to limit the field in html, or to truncate the value in the processing of the form data.

          I agree this would be nice, and for the most part, I never need over 15 characters. Maybe this could be configurable through the FOG settings for a max host name length in case there was some need to have it longer than 15. There is a limit due to the field size in the datastore also, but that can be queried to make sure the UI or registration scripts are not exceeding that.


          If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

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

          209

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project