Sorry on the late response. Yes to what @Tom-Elliott said, I went to /var/www/fog/lib/hooks/ and set active = true on the aforementioned hooks.
Posts made by iyoung
-
RE: AddHostModel and AddHostSerial
-
AddHostModel and AddHostSerial
FOG Version: 1.4.0
When I enable these hooks, the values show up on the Host Management page as they should. But one thing that I’ve noticed is that the size of the overall bar/column at the top of the table stays the same size, such that, when you enable one option, everything on a row is pushed closer together. Enabling both hooks removes the ability to do quick tasks from the Host Management page.
My question is: Is there a way to widen the top bar so that everything shows up when both hooks are enabled or is that something that would have to be changed in the code in multiple places?
-
Unable to read Apache log files in web GUI
Server
- FOG Version: 1.3.4
- OS: Ubuntu 16.04.1 LTS
Client
- Service Version:
- OS:
Description
I’m getting ‘Unable to open file for reading’ message when I try to read any of the Apache log files. If I modify /etc/logrotate.d/apache2 to change ‘create 640 root adm’ to ‘create 655 root adm’ should that fix the log issue, unless some other program modifies logrotate? Or should I just schedule ‘chmod 655’ to run every day on /var/log/apache2/*.log?
-
RE: LDAP Plugin
If @george1421’s suggestion doesn’t work, in my setup of the plugin, I left the ‘Bind DN’ and ‘Bind Password’ fields blank, from reading this post. But my AD might be set up wrong.
-
RE: LDAP plugin on 1.3.0
@iyoung Test completed. LDAP plugin added and test login succeeded.
-
RE: Plugin Management on 1.3.0
@Tom-Elliott Thanks, that took care of it. My Google Search-fu clearly needs work.
-
Plugin Management on 1.3.0
Server
- FOG Version: 1.3.0 (Official from SF)
- OS: Ubuntu 16.10 Server
Client
- Service Version:
- OS: Windows 10
Description
After creating a fresh Ubuntu install (again) and installing FOG from SF, I went to enable the plugin system. After checking the box under ‘FOG Settings’, I clicked over to the ‘Plugin Management’ icon and I got a HTTP 500 error. Below is the corresponding entry in the Apache error log. The only change I had made to the server prior was installing ssh-server, molly-guard and aptitude. At the start of the FOG install, I did see a message saying that the installer would have to reinstall apache and php files, which I accepted.
[Thu Dec 29 13:10:20.858079 2016] [php7:error] [pid 31667] [client 192.168.34.119:54638] PHP Fatal error: Uncaught Error: Call to a member function set() on null in /var/www/fog/lib/fog/plugin.class.php:153\nStack trace:\n#0 /var/www/fog/lib/fog/plugin.class.php(195): Plugin->_getDirs()\n#1 /var/www/fog/lib/pages/pluginmanagementpage.class.php(47): Plugin->getPlugins()\n#2 /var/www/fog/lib/fog/fogpagemanager.class.php(394): PluginManagementPage->__construct()\n#3 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#4 /var/www/fog/lib/fog/fogpagemanager.class.php(399): array_map(Object(Closure), Array)\n#5 /var/www/fog/lib/fog/fogpagemanager.class.php(182): FOGPageManager->_loadPageClasses()\n#6 /var/www/fog/management/index.php(49): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/fog/lib/fog/plugin.class.php on line 153, referer: http://192.168.34.28/fog/management/index.php?node=about&sub=settings
-
RE: LDAP plugin on 1.3.0
@Tom-Elliott I looked at the creation date of my main FOG server and it looks like it was created on 09/15/2016, and I know that I went right to trunk when I installed FOG. I skimmed this thread which is, for the most part, newer than that. Was php-ldap added more recently?
-
RE: LDAP plugin on 1.3.0
Just looking at FOG installing now, I can see php7.1-ldap in the “Packages to be installed.” The only things I changed before installing FOG were installing aptitude and ssh-server.
OS: Ubuntu 16.10 Server
FOG: 1.3.0 (SVN 6051) -
RE: LDAP plugin on 1.3.0
@george1421 @tom-elliott I’ll spin up a host to see if it’s an issue on fresh installs of 1.3.0.
-
RE: LDAP plugin on 1.3.0
Success! I was able to login with a domain user, after installing php-ldap, without issue.
-
RE: LDAP plugin on 1.3.0
php-ldap was not installed. I’ll restart and see what happens. I also looked in /opt/fog/.fogsettings and didn’t see php-ldap or a package that depends on it.
-
LDAP plugin on 1.3.0
Server
- FOG Version: 1.3.0 (SVN 6050)
- OS: Ubuntu 16.04
Client
- Service Version:
- OS: Windows 10
Description
I’ve added and setup the LDAP plugin (see picture), following what was shown here . But when I go to login to the web portal I get a http 500 error and the below is the apache error log that coincides with the login attempt. I had had the LDAP plugin installed before, but uninstalled and reinstalled following this post
[Wed Dec 28 11:47:23.003367 2016] [:error] [pid 17602] [client 192.168.34.152:2111] PHP Fatal error: Uncaught Error: Call to undefined function ldap_connect() in /var/www/fog/lib/plugins/ldap/class/ldap.class.php:266\nStack trace:\n#0 /var/www/fog/lib/plugins/ldap/hooks/ldappluginhook.hook.php(98): LDAP->authLDAP('iyoung', 'MYPASSWORD')\n#1 /var/www/fog/lib/fog/hookmanager.class.php(190): LDAPPluginHook->checkAddUser(Array)\n#2 /var/www/fog/lib/fog/user.class.php(229): HookManager->processEvent('USER_LOGGING_IN', Array)\n#3 /var/www/fog/lib/fog/fogcore.class.php(35): User->validatePw('iyoung', 'MYPASSWORD')\n#4 /var/www/fog/lib/fog/processlogin.class.php(241): FOGCore->attemptLogin('iyoung', 'MYPASSWORD')\n#5 /var/www/fog/management/index.php(29): ProcessLogin->processMainLogin()\n#6 {main}\n thrown in /var/www/fog/lib/plugins/ldap/class/ldap.class.php on line 266, referer: http://192.168.34.23/fog/management/index.php?
-
Virtualbox Cloning to make new SNs
I’ve had to do get rid of, change and recreate new SN so many time due to not having dedicated hardware for the SN. I had been using the 6200 pro boxes we had around. Thus, whenever we needed to replace our old dc5700s and dc7700s, instead of buying new hardware, we used the same set of 6200s. And since my project wasn’t business critical (even though it saved us about $100 per month) I was forced to adapt.Just another day in I.T.So I did a little write up on how to make new FOG storage nodes without having to reinstall everything by using the cloning feature in Oracle’s Virtualbox.
Cloning a FOG Storage Node virtual machine (VirtualBox)
This guide assumes you have Ubuntu 16.04 with FOG trunk installed (Currently 1.3.0 RC11).
The best time to do the cloning is after running the installer, but before adding the Node to the main server, so that an images aren’t also cloned.- First step, do a shutdown of the system. Go to the VirtualBox manager window and right click on the VM and click on ‘Clone…’
The dialogue box will ask you for the name, type of clone, how you want any possible snapshots handled and if you want to change the MAC address. The name is just what appears in VirtualBox, so choose whatever you desire there.
In this example, we want the new VM to be as independent from the parent VM as possible, so set Clone type to ‘Full Clone’, Snapshots to ‘Everything’ and check to reinitialize any MAC address. Then click ‘Clone.’ This process can take a while, even though there aren’t any images, depending on disk speed.
- Next we will start up the new VM. The username and password will be the same as the parent VM. After logging in, enter
sudo nano /etc/network/interfaces
This will bring up the configuration file for NICs on the VM, use the arrow keys to navigate. In this example, there is only one interface, though you may have more. The dns-search option will most likely refer to your domain name if you are a Windows environment and dns-nameservers are the IP addresses, not hostnames, of DNS servers. After filling the information in, press Control-X, then y followed by enter. This will save the interface configuration.
- Next up, we will change the hostname to reflect what we made the name in VirtualBox (you can change it to whatever in your own environment.) To edit both of the files we need to change enter:
sudo nano /etc/hosts sudo nano /etc/hostname
In both examples shown, the hostname has already been changed from “FogUbunSN1” to “FogUbunSN3.”
-
IMPORTANT, make sure you now reboot the VM, so that it can apply all of the setting we just modified.
-
Now we will modify the FOG installers settings file to reflect the changes we’ve made. Enter
sudo nano /opt/fog/.fogsettings
On the screen displayed, the only option that we need to change is the first one ‘ipaddress’. For security you can also change the ‘password’ field, though using a password generator is recommended.
- If you used a SSH connection you can leave the SSH keys the same, but if you went to the trouble of being more security with the first storage node, why not with the clone. If you don’t have OpenSSH installed, use
sudo apt-get install openssh-server
- . First off, generate your SSH keys. Putty’s key generator is used in this example. (You can also change the bit amount to 4096, which is what is used in all the keys in this example)
After generating the keys, the public key will be displayed, along with field for ‘Key comment’ and ‘Key passphrase’ both of these field are optional, though the VMs hostname is common in the comment field. You should then have both the public and private keys in a secure location. To get the public key on the VM, this example uses a password secured SSH connection, though you can use other methods. Run the following commands
mkdir ~/.ssh chmod 700 ~/.ssh nano ~/.ssh/authorized_keys
To create the key file. Paste the public key into file by copying the text and then right clicking inside the putty window. This should paste the key as a single line of text. After saving and closing the file, run
chmod 600 ~/.ssh/authorized_keys
- All that’s left to do now is run the installer and add the node to the main FOG server
cd /root/fogproject/bin ./installfog.sh
:EOF
If you notice any tipos, grammatical error, things I did wrong in
STR="bash" echo $str
or things I did wrong in FOG, please don’t be afraid to comment
Sources:
https://help.ubuntu.com/lts/serverguide/network-configuration.html
https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none
https://support.hostgator.com/articles/specialized-help/technical/ssh-keying-through-putty-on-windows-or-linuxAnd of course
-
RE: Replicating the Storage Node itself
Hey @Wayne-Workman I finally have the how-to done. How do you want it, should I upload it in a forum post?
-
RE: Replicating the Storage Node itself
@Wayne-Workman I’m using Ubuntu Server, so I won’t be able to include screen shots of that part, which looks to be RH Linux thing. I’ll just add the text and cite the article.
-
RE: Replicating the Storage Node itself
Hey @Wayne-Workman would you like me to right up a step by step guide on cloning Storage Nodes for the wiki?
-
RE: Replicating the Storage Node itself
Sorry about the last response @Duncan. I clone after installing FOG in SN mode, but before adding it to the main server. I had written a little guide for cloning, that covered everything from Fog setting to SSH logins, but of course I can’t find it.
The biggest things you need to change after cloning are:
1: IP address
2: MAC address
3: Hostname (both /etc/hosts and /etc/hostname)
4: /opt/fog/.fogsettings (change the ip address)
5: SSH configuration (If you are connecting over SSH)after which you can rerun the FOGinstallerfolder/bin/installfog.sh. Then add it the server and your good to go.
-
RE: FOG on Ubuntu 16.04 (php7)?
@Tom-Elliott Sorry, I phrased that wrong. I meant to say that instead of just typing “./installfog.sh”, I typed what you have in the second post.
-
RE: FOG on Ubuntu 16.04 (php7)?
Not sure if this is the post we should be using to talk about testing FOG on 16.04 but anyway…
I was able to install FOG’s latest, as of today, trunk 7468 without issue. I just substituted the regular installfog.sh with Tom’s suggestion and the install ran without issue. It didn’t ask me for a password for MySQL and choose left password blank.
I get to the first time schema setup, I clicked the button on the webpage, the page loads to say the process was successful. I completed the install, however when I go to log into the web portal at host/fog/management it keeps redirecting to the Schema Installation upgrade page. After click the button and getting the complete page a few times, I restarted the server.
After restart, I ran the install/update schema button again and that time I was able to get to the login screen. I’ll spin up another vm to see if that always happens or was just a one time quirk.
P.S. I like the new menu icons