Wednesday, 20 May 2015

Port Bonding and VLAN - CentOS 6

Create the file /etc/modprobe.d/bonding.conf, add the following lines:
alias bond0 bonding
options bond0 mode=1 miimon=100
Create the bond file /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=1"
TYPE=Unknown
IPV6INIT=no
Create the VLAN bond file /etc/sysconfig/network-scripts/ifcfg-bond0.35
DEVICE=bond0.35
BOOTPROTO=none
TYPE=Ethernet
ONBOOT=yes
VLAN=yes
NM_CONTROLLED=no
IPADDR=x.x.35.13
PREFIX=24
GATEWAY=x.x.35.250
NM_CONTOLLED=no
USERCTL=no
Edit the interface files ifcfg-em1 and ifcfg-em2:
DEVICE="em1"
BOOTPROTO="none"
HWADDR="xx:xx:xx:xx:xx:7A"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="90e968f4-xxxx-xxxx-xxxx-0a188c6cc9e8"
MASTER=bond0
SLAVE=yes
USERCTL=no
--------------------------------------------------------------------------
DEVICE=em2
HWADDR=xx:xx:xx:xx:xx:7C
TYPE=Ethernet
UUID=4bc7043a-xxxx-xxxx-xxxx-cd5f6f04e0f7
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

Thursday, 30 April 2015

Foreman-Proxy SSL Error

Oops, we're sorry but something went wrong
 
×
Warning!

ERF12-5356 [ProxyAPI::ProxyException]: Unable to get PuppetCA certificates ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: tlsv1 alert un...) for proxy https://foreman.domain.net:8443/puppet/ca
If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.

Back

Reset Foreman Admin Login Password

As super-user, on the command line, run:
foreman-rake permissions:reset

Tuesday, 28 April 2015

Add http/https access to iptables - CentOS 6

Edit iptables:
vi /etc/sysconfig/iptables
Add the following lines:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
Restart iptables:
service iptables restart

Tuesday, 10 March 2015

Installing Hyper-V Daemons on CentOS 7

[root@its-webmon ~]# yum search hyperv
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.vorboss.net
 * extras: mirror.ox.ac.uk
 * updates: mirror.ox.ac.uk
============================= N/S matched: hyperv ==============================
hyperv-daemons.x86_64 : HyperV daemons suite
hyperv-daemons-license.noarch : License of the HyperV daemons suite
hypervkvpd.x86_64 : HyperV key value pair (KVP) daemon
hypervvssd.x86_64 : HyperV VSS daemon
perl-Sys-Virt.x86_64 : Represent and manage a libvirt hypervisor connection

  Name and summary matches only, use "search all" for everything.
[root@its-webmon ~]# yum install hyperv-daemons
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.vorboss.net
 * extras: mirrors.coreix.net
 * updates: mirror.sov.uk.goscomb.net
Resolving Dependencies
--> Running transaction check
---> Package hyperv-daemons.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Processing Dependency: hypervvssd = 0-0.24.20130826git.el7 for package: hyperv-daemons-0-0.24.20130826git.el7.x86_64
--> Processing Dependency: hypervkvpd = 0-0.24.20130826git.el7 for package: hyperv-daemons-0-0.24.20130826git.el7.x86_64
--> Running transaction check
---> Package hypervkvpd.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Processing Dependency: hyperv-daemons-license = 0-0.24.20130826git.el7 for package: hypervkvpd-0-0.24.20130826git.el7.x86_64
---> Package hypervvssd.x86_64 0:0-0.24.20130826git.el7 will be installed
--> Running transaction check
---> Package hyperv-daemons-license.noarch 0:0-0.24.20130826git.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch      Version                      Repository
                                                                           Size
================================================================================
Installing:
 hyperv-daemons            x86_64    0-0.24.20130826git.el7       base    3.7 k
Installing for dependencies:
 hyperv-daemons-license    noarch    0-0.24.20130826git.el7       base     11 k
 hypervkvpd                x86_64    0-0.24.20130826git.el7       base     18 k
 hypervvssd                x86_64    0-0.24.20130826git.el7       base    9.9 k

Transaction Summary
================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 43 k
Installed size: 60 k
Is this ok [y/d/N]: y
Downloading packages:
(1/4): hyperv-daemons-0-0.24.20130826git.el7.x86_64.rpm    | 3.7 kB   00:00     
(2/4): hyperv-daemons-license-0-0.24.20130826git.el7.noarc |  11 kB   00:00     
(3/4): hypervvssd-0-0.24.20130826git.el7.x86_64.rpm        | 9.9 kB   00:00     
(4/4): hypervkvpd-0-0.24.20130826git.el7.x86_64.rpm        |  18 kB   00:00     
--------------------------------------------------------------------------------
Total                                              103 kB/s |  43 kB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : hyperv-daemons-license-0-0.24.20130826git.el7.noarch         1/4 
  Installing : hypervkvpd-0-0.24.20130826git.el7.x86_64                     2/4 
  Installing : hypervvssd-0-0.24.20130826git.el7.x86_64                     3/4 
  Installing : hyperv-daemons-0-0.24.20130826git.el7.x86_64                 4/4 
  Verifying  : hyperv-daemons-license-0-0.24.20130826git.el7.noarch         1/4 
  Verifying  : hyperv-daemons-0-0.24.20130826git.el7.x86_64                 2/4 
  Verifying  : hypervkvpd-0-0.24.20130826git.el7.x86_64                     3/4 
  Verifying  : hypervvssd-0-0.24.20130826git.el7.x86_64                     4/4 

Installed:
  hyperv-daemons.x86_64 0:0-0.24.20130826git.el7                                

Dependency Installed:
  hyperv-daemons-license.noarch 0:0-0.24.20130826git.el7                        
  hypervkvpd.x86_64 0:0-0.24.20130826git.el7                                    
  hypervvssd.x86_64 0:0-0.24.20130826git.el7                                    

Complete!

[root@its-webmon init.d]# service hypervkvpd start
Redirecting to /bin/systemctl start  hypervkvpd.service
[root@its-webmon init.d]# service hypervvssd start
Redirecting to /bin/systemctl start  hypervvssd.service
[root@its-webmon init.d]# systemctl|grep hyper
hypervkvpd.service                                                                                                        loaded active running   Hyper-V KVP daemon
hypervvssd.service                                                                                                        loaded active running   Hyper-V VSS daemon

Friday, 6 March 2015

Registering networker ports

echo "Registering networker ports 7937-7999 with backup server"
/usr/bin/nsrports -s backupserver.domain.com -S 7937-7999
/usr/bin/nsrports -S 7937-7999
/usr/bin/nsrports -s backupserver.domain.com -C 10001-30000
/usr/bin/nsrports -C 10001-30000

Thursday, 5 March 2015

Changing a Ganeti node's group

# gnt-group list
Group    Nodes Instances AllocPolicy NDParams
tier1     5        78 last_resort (empty)
tier2     3       118 preferred   (empty)
mvb       4        74 last_resort (empty)
# gnt-group assign-nodes cc-tier2 sever
# gnt-group list
Group    Nodes Instances AllocPolicy NDParams
tier1     5        78 last_resort (empty)
tier2     4       124 preferred   (empty)
mvb       3        68 last_resort (empty)