• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. JGallo
    3. Posts
    J
    • Profile
    • Following 0
    • Followers 1
    • Topics 13
    • Posts 168
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Image replication between nodes keeps restarting

      @tom-elliott

      So today I got a chance to start adding even more storage nodes. The FOG Server is on the working branch as well as the storage node. Once I’m finished installing the storage node, I go to the console and make changes like enable graph and change the storage node name. I also place a value in the Replication Bandwidth because it won’t let me use 0. So when I tail the fogreplicator.log file, it states a

      *Type: 2, File: /var/www/fog/lib/fog/fogftp.class.php, Line: 463, Message: ftp_login(): Login incorrect., Host: 10.225.100.21, Username: fog

      Now when I ran the installer, I did type the storage node password from FOG correctly. I know this because the IP shows up under storage. This is awkward because my first two storage nodes worked but were on RC9. Should I keep the storage nodes at RC9 or put the storage nodes on working branch?

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @tom-elliott

      Added another storage node and replication seems to operate normally. I still have the linux sleeptimer at 10800 seconds so I think we are good for now. My question is do I stay on the working branch or do I go back to RC9? I’m not too familiar when changes are made to RC’s and working branches.

      posted in FOG Problems
      J
      JGallo
    • RE: fog.man.reg in 1.5.0. RC9

      @tom-elliott said in fog.man.reg in 1.5.0. RC9:

      http://${web}… to just ${web}…

      Well I feel dumb. Missed one. Confirmed and that works. Thank you once again.

      posted in FOG Problems
      J
      JGallo
    • RE: fog.man.reg in 1.5.0. RC9

      @tom-elliott

      I thought I did that. I will double check again.

      posted in FOG Problems
      J
      JGallo
    • fog.man.reg in 1.5.0. RC9
      Server
      • FOG Version: 1.5.0 RC9
      • OS:
      Client
      • Service Version:
      • OS:
      Description

      Hello all,

      I’ve been tinkering between 1.5.0 RC7 - RC9 and noticed that my custom fog.man.reg file no longer works on RC9. It works fine on RC7 but after going to RC9 the postinitscript works it’s just my custom fog.man.reg file no longer operates like it use to.

      https://forums.fogproject.org/topic/9851/custom-full-host-registration-menu-for-1-4-0-rc2-and-later

      I posted this some time ago and doesn’t look like it works. Has the fog.man.reg file changed in RC9 vs RC7?

      I suspect it has to do with the following part of the code in fog.man.reg:

      setIDs() {
          local varVar="$1"
          local str="$2"
          local csvstyle="$3"
          local dummy="$4"
          local max="$5"
          local res=""
          local url=""
          local oIFS=$IFS
          local line=""
          while [[ -z ${!varVar} ]]; do
              [[ $csvstyle =~ [Tt][Rr][Uu][Ee] ]] && echo -n "    Enter the $str IDs separated with , to associate with computer (? for listing): " || echo -n "    Enter the $str ID to associate with computer (? for listing): "
              read dummy
              dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
              case $dummy in
                  [?])
                      url="http://${web}service/${str}listing.php"
                      clearScreen
                      res=$(echo -e $(curl -ks $url 2>/dev/null))
                      i=0
                      IFS=$'\n'
                      for line in $res; do
                          let i+=1
                          echo $line
                          if [[ $i -eq $max ]]; then
                              [[ $csvstyle =~ [Tt][Rr][Uu][Ee] ]] && echo -n "    Press [Enter] to proceed or enter the $str IDs separated with , to associate with computer: " || echo -n "    Press [Enter] to proceed or enter the $str ID to associate with computer: "
                              read dummy
                              case $dummy in
                                  [?]|"")
                                      i=0
                                      clearScreen
                                      continue
                                      ;;
                              esac
                              case $csvstyle in
                                  [Tt][Rr][Uu][Ee])
                                      [[ $dummy =~ ^[0-9,]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy) || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                                      break
                                      ;;
                                  *)
                                      [[ $dummy =~ ^[0-9]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy "true") || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                                      break
                                      ;;
                              esac
                              i=0
                              dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
                              clearScreen
                          fi
                      done
                      ;;
                  ""|0)
                      printf -v "$varVar" 0
                      ;;
                  *)
                      dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
                      [[ -z $dummy ]] && setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                      case $csvstyle in
                          [Tt][Rr][Uu][Ee])
                              [[ $dummy =~ ^[0-9,]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy) || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                              ;;
                          *)
                              [[ $dummy =~ ^[0-9]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy "true") || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                              ;;
                      esac
                      ;;
              esac
          done
          IFS=$oIFS
      }
      

      When I go to enter ? to list the image ID’s the response I get is blank with the same question being asked as if nothing exists even though I have images on the server. This also goes for the location plug in where it asks for the location ID. Is there a different way to handle this now? Should I be patching a different file with the postinscripts in RC9 instead of the fog.man.reg? Thank you.

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @tom-elliott

      I uploaded an image and tried to manually start the replication. I did a tail on the fogreplicator.log file and it seemed like it wasn’t working. So I went to lunch and came back. Looks like it eventually worked. I see the image replicated to my only storage node right now. There are some other weird things occurring but I will create separate post as it has to do with my custom fog.man.reg being copied. Thank you for your help.

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @tom-elliott

      I don’t mind at all. I will install working branch once this image that is currently replicating is complete. Once I install working branch, I will upload an image and check if replication i working.

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @tom-elliott

      Thank you Tom. I went ahead and made the changes. Worked as soon as a reboot occurred.

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @wayne-workman

      I increased it to 10800 which is 3 hours just for the hell of it. Seems to work fine on 1.5.0 RC7 unless replication takes longer than that LOL but issue I ran into was when I try to go and upload an image I get some weird DHCP issues. So I went ahead and went to RC9 and then replication does’t work. I came across a post regarding same issue and suggestion was to go back to RC7. So I’m in a bind and not sure what to do. I’m going to start from scratch and add each node and tail the fogreplicator.log file and see if the same errors occur. I’m getting a (storage node) server does not appear to be online. This only occurs in RC9 and as soon as I go back to RC7 replication works fine.

      posted in FOG Problems
      J
      JGallo
    • RE: Image replication between nodes keeps restarting

      @wayne-workman

      I know this is a really old post and I apologize if I should have started a new topic. I’m experiencing the same symptoms after only accidentally discovering the replication keeps deleting my images from the nodes. By increasing the value of the FOG Linux Service Sleep Times - IMAGEREPSLEEPTIME, will this stop the image from being deleted?

      Basically would I need to set the value to a point beyond the time it takes FOG to finish replicating? If the value is less than the time it takes FOG to finish replicating, would this explain why the images keeps being deleted and replication restarting?

      posted in FOG Problems
      J
      JGallo
    • RE: Larger area for the Bandwidth section of FOG GUI for 1.5.x

      @sebastian-roth

      0_1505338885213_FOG bandwidth.JPG

      posted in Feature Request
      J
      JGallo
    • Larger area for the Bandwidth section of FOG GUI for 1.5.x

      Would it be possible to make the Bandwidth area larger? Or if it’s possible already, how can we modify this? I ask because in the 1.5.*'s if I have more than 15 storage nodes, the graph and colored squares become larger than the area that it defaults to.

      posted in Feature Request
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @tom-elliott
      Thank you. I will test later once replication is complete on RC7 server. As for replication on RC9, is there an issue? I did notice someone mentioning to go back to RC7 on a separate post.

      posted in FOG Problems
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @tom-elliott

      Sorry if this looks sloppy. Is there an easy way to copy the code completely and paste it here on the forum?

      posted in FOG Problems
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @jgallo

                    pass64=$(echo $password | tr -d '\012' | base64)
                      ret=$(curl -ks --data "mac=$mac&username=$user64&password=$pass64" http://${web}service/checkcredentials.php 2>/dev/null)
                      case $ret in
                          '#!ok')
                              echo
                              echo " * This host will reboot and deployment will start!"
                              ret=$tmp
                              realdoimage=$(echo -n 1 | base64)
                              break
                              ;;
                          '#!il')
                              echo
                              echo " * Error: Invalid Login! ($retry remaining)"
                              let retry-=1
                              ;;
                      esac
                  done
                  askme="Y"
                  ;;
              *)
                  askme=""
                  echo " * Invalid input, please try again"
                  ;;
          esac
      done
      dots "Attempting to register host"
      res=""
      while [[ -z $res ]]; do
          res=$(curl -ks --data "mac=$mac&advanced=$(echo -n 1 | base64)&host=$host&imageid=$imageid&doimage=$realdoimage&location=$location64&username=$user64" http://${web}service/auto.register.php 2>/dev/null)
          echo "$res"
          usleep 2000000
      done
      . /bin/fog.inventory
      usleep 2000000
      
      
      posted in FOG Problems
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @jgallo

       [?]|"")
                                      i=0
                                      clearScreen
                                      continue
                                      ;;
                              esac
                              case $csvstyle in
                                  [Tt][Rr][Uu][Ee])
                                      [[ $dummy =~ ^[0-9,]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy) || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                                      break
                                      ;;
                                  *)
                                      [[ $dummy =~ ^[0-9]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy "true") || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                                      break
                                      ;;
                              esac
                              i=0
                              dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
                              clearScreen
                          fi
                      done
                      ;;
                  ""|0)
                      printf -v "$varVar" 0
                      ;;
                  *)
                      dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
                      [[ -z $dummy ]] && setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                      case $csvstyle in
                          [Tt][Rr][Uu][Ee])
                              [[ $dummy =~ ^[0-9,]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy) || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                              ;;
                          *)
                              [[ $dummy =~ ^[0-9]+$ ]] && printf -v "$varVar" $(checkAndSet $dummy "true") || setIDs "$varVar" "$str" "$csvstyle" "$dummy" "$max"
                              ;;
                      esac
                      ;;
              esac
          done
          IFS=$oIFS
      }
      [[ $exists != "#!ok" ]] && handleError "Unable to register host: $exists ($0)\n   Args Passed: $*"
      host=""
      imageid=""
      blImage=""
      keyEnter=""
      res=""
      while [[ $res != "#!ok" ]]; do
          echo -n " * Enter hostname for this computer: "
          read host
          if [[ ${#host} -gt 15 ]]; then
              host=${host:0:15}
              echo " | Truncated to 15 characters: $host"
              usleep 2000000
          fi
          host=$(echo $host | base64)
          res=$(curl -ks --data "host=$host" http://${web}service/hostnameloop.php 2>/dev/null)
          [[ $res != "#!ok" ]] && echo "$res"
      done
      imageid=""
      setIDs "imageid" "image" "" "" 20
      if [[ $(curl -ks http://${web}service/locationcheck.php 2>/dev/null) == "##" ]]; then
          while [[ -z $askme ]]; do
              echo -n "    Would you like to assign a location for this host? (y/N) "
              read askme
              case $askme in
                  [Nn]|[Nn][Oo]|"")
                      askme="N"
                      ;;
                  [Yy]|[Yy][Ee][Ss])
                      setIDs "locationid" "location" "" "" 20
                      location64=$locationid
                      ;;
                  *)
                      askme=""
                      echo " * Invalid input, please try again"
                      ;;
              esac
          done
      fi
      echo " * You entered all required information, "
      askme=""
      while [[ -z $askme ]]; do
          echo -n "    Would you like to deploy image to this computer now? (y/N) "
          read askme
          case $askme in
              [Nn]|[Nn][Oo]|"")
                  askme="N"
                  ;;
              [Yy]|[Yy][Ee][Ss])
                  tmp=""
                  ret=""
                  retry=3
                  while [[ $ret != "#!ok" && ! $retry -eq 0 ]]; do
                      echo " * Enter FOG GUI Username and Password"
                      echo -n "    Username: "
                      read username
                      echo -n "    Password: "
                      read -s password
                      user64=$(echo $username | tr -d '\012' | base64)
      
      posted in FOG Problems
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @tom-elliott

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      . /bin/fog.donate
      clearScreen
      displayBanner
      disks=""
      disk=""
      hd=""
      getHardDisk
      sysman=""
      sysman64=""
      sysproduct=""
      sysproduct64=""
      sysversion=""
      sysversion64=""
      sysserial=""
      systype=""
      biosversion=""
      biosvendor=""
      biosdate=""
      mbman=""
      mbproductname=""
      mbversion=""
      mbserial=""
      mbasset=""
      cpuman=""
      cpuversion=""
      cpucurrent=""
      cpumax=""
      mem=""
      hdinfo=""
      caseman=""
      casever=""
      caseserial=""
      casesasset=""
      sysserial64=""
      systype64=""
      biosversion64=""
      biosvendor64=""
      biosdate64=""
      mbman64=""
      mbproductname64=""
      mbversion64=""
      mbserial64=""
      mbasset64=""
      cpuman64=""
      cpuversion64=""
      cpucurrent64=""
      cpumax64=""
      mem64=""
      hdinfo64=""
      caseman64=""
      casever64=""
      caseserial64=""
      casesasset64=""
      dots "Using disk device"
      echo $hd
      echo " * Starting host registration"
      mac=$(getMACAddresses | base64)
      exists=$(curl -ks --data "mac=$mac" http://${web}service/man.hostexists.php 2>/dev/null)
      checkAndSet() {
          local testvar="$1"
          local onlynum="$2"
          [[ -z $testvar ]] && return
          if [[ $onlynum =~ [Tt][Rr][Uu][Ee] && $testvar =~ ^[0-9]+$ ]]; then
              echo $testvar | base64
          elif [[ $testvar =~ ^[0-9,]+$ ]]; then
              echo $testvar | base64
          else
              return
          fi
      }
      setIDs() {
          local varVar="$1"
          local str="$2"
          local csvstyle="$3"
          local dummy="$4"
          local max="$5"
          local res=""
          local url=""
          local oIFS=$IFS
          local line=""
          while [[ -z ${!varVar} ]]; do
              [[ $csvstyle =~ [Tt][Rr][Uu][Ee] ]] && echo -n "    Enter the $str IDs separated with , to associate with computer (? for listing): " || echo -n "    Enter the $str ID to associate with computer (? for listing): "
              read dummy
              dummy=$(echo $dummy | sed -e 's/^,//' -e 's/,$//')
              case $dummy in
                  [?])
                      url="http://${web}service/${str}listing.php"
                      clearScreen
                      res=$(echo -e $(curl -ks $url 2>/dev/null))
                      i=0
                      IFS=$'\n'
                      for line in $res; do
                          let i+=1
                          echo $line
                          if [[ $i -eq $max ]]; then
                              [[ $csvstyle =~ [Tt][Rr][Uu][Ee] ]] && echo -n "    Press [Enter] to proceed or enter the $str IDs separated with , to associate with computer: " || echo -n "    Press [Enter] to proceed or enter the $str ID to associate with computer: "
                              read dummy
                              case $dummy in
      
      posted in FOG Problems
      J
      JGallo
    • RE: Postinitscripts and storage node replications

      @tom-elliott

      Cool. Yes my postinitscript just copies a modified version of fog.man.reg I wasn’t sure so I assumed it could be a bug. Basically I just remove questions I don’t need to answer to make the registration process quicker for the techs. Not sure if all of it will show up because it had issues before trying to post the code. Basically it’s a copy of the fog.man.reg modified to have less questions.

      Which script did you want to see, the modified fog.man.reg or the fog.postinit script? Should I use the same method as before but get a new copy of fog.man.reg from RC9?

      posted in FOG Problems
      J
      JGallo
    • Postinitscripts and storage node replications
      Server
      • FOG Version: 1.5.0 RC9
      • OS:
      Client
      • Service Version:
      • OS:
      Description

      So I went ahead and made the jump to 1.5.0 RC-9 this morning and ran into a couple weird things. First I decided to start from scratch and do a fresh install. Once I setup everything, I went ahead and placed my files for the postinitscripts and went ahead and tried to register a computer. Upon it loading the postinitscript, it detected some error. Stated that it was unable to register host /bin/fog.man.reg and below it had Args Passed:

      0_1505253023804_image_uploaded_from_ios_720.jpg

      So upon several attempts to fix this, I changed the fog.postinit file back to it’s original state. Had to setup the storage nodes and location plug in. Once I did all that, I noticed that replication wasn’t working in RC9. Noticed someone mentioned that in a different post. So eventually read the part to go back to RC7 which I did and replication is definitely working.

      At this point I went ahead and tried to the postinitscripts on RC7 and they work fine. So my observation is the postinitscripts work in RC7 but not in RC9 and possibly in RC8. Any one else having similar issues?

      posted in FOG Problems
      J
      JGallo
    • 1 / 1