merge with fuel-777 (22053e4e5f
) branch
This commit is contained in:
commit
29af293817
|
@ -22,7 +22,10 @@ class cinder::params {
|
|||
}
|
||||
|
||||
'RedHat': {
|
||||
$qemuimg_package_name = 'qemu-img'
|
||||
$qemuimg_package_name = $::operatingsystem ? {
|
||||
redhat => 'qemu-img-rhev',
|
||||
default => 'qemu-img',
|
||||
}
|
||||
$package_name = 'openstack-cinder'
|
||||
$api_package = false
|
||||
$scheduler_package = false
|
||||
|
|
|
@ -32,6 +32,7 @@ class cobbler::snippets {
|
|||
cobbler_snippet {"puppet_install_if_enabled":}
|
||||
cobbler_snippet {"puppet_conf":}
|
||||
cobbler_snippet {"puppet_register_if_enabled":}
|
||||
cobbler_snippet {"red_hat_register_rhsm:"}
|
||||
cobbler_snippet {'ntp_register_if_enabled':}
|
||||
cobbler_snippet {"mcollective_install_if_enabled":}
|
||||
cobbler_snippet {"mcollective_conf":}
|
||||
|
|
|
@ -115,8 +115,11 @@ ntp
|
|||
openssh
|
||||
openssh-clients
|
||||
openssh-server
|
||||
rhn-setup
|
||||
ruby-augeas
|
||||
ruby-devel
|
||||
rubygem-openstack
|
||||
rubygem-netaddr
|
||||
system-config-firewall-base
|
||||
wget
|
||||
yum
|
||||
|
@ -131,6 +134,11 @@ $SNIPPET('puppet_install_if_enabled')
|
|||
# LISTS mcollective PACKAGE IF mco_auto_setup VARIABLE IS SET TO 1
|
||||
$SNIPPET('mcollective_install_if_enabled')
|
||||
|
||||
# POST INSTALLATION PARTITIONING
|
||||
# THERE ARE SOME COMMANDS TO CREATE LARGE (>1TB) VOLUMES
|
||||
# AND INSTALL GRUB BOOTLOADER TO MAKE NODES ABLE TO BOOT FROM ANY HARDDRIVE
|
||||
%include /tmp/post_partition.ks
|
||||
|
||||
# POSTINSTALL SECTION
|
||||
# HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
|
||||
# INSTALLATION ITSELF COMPLETED
|
||||
|
@ -157,6 +165,10 @@ EOA
|
|||
# CONFIGURES %post LOGGING
|
||||
$SNIPPET('log_ks_post')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'redhat_register'
|
||||
# REGISTER AT REDHAT WITH ACTIVATION KEY
|
||||
$SNIPPET('redhat_register')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'post_install_kernel_options'
|
||||
# CONFIGURES KERNEL PARAMETERS ON INSTALLED SYSTEM
|
||||
$SNIPPET('post_install_kernel_options')
|
||||
|
|
|
@ -99,6 +99,8 @@ cronie
|
|||
ruby-augeas
|
||||
yum-plugin-versionlock
|
||||
yum-utils
|
||||
rubygem-openstack
|
||||
rubygem-netaddr
|
||||
# COBBLER EMBEDDED SNIPPET: 'puppet_install_if_enabled'
|
||||
# LISTS puppet PACKAGE IF puppet_auto_setup VARIABLE IS SET TO 1
|
||||
$SNIPPET('puppet_install_if_enabled')
|
||||
|
@ -146,10 +148,10 @@ $SNIPPET('puppet_register_if_enabled_fuel')
|
|||
$SNIPPET('mcollective_conf')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'redhat_register'
|
||||
# REGISTER AT REDHAT WITH ACTIVATION KEY
|
||||
# REGISTER TO RED HAT RHN SATELLITE WITH ACTIVATION KEY
|
||||
$SNIPPET('redhat_register')
|
||||
# REGISTER AT REDHAT WITH lOGIN/PASSWORD
|
||||
$SNIPPET('rhn_certificate_based_register')
|
||||
# REGISTER TO RED HAT SUBSCRIPTION MANAGER WITH lOGIN/PASSWORD
|
||||
$SNIPPET('red_hat_register_rhsm')
|
||||
|
||||
# COBBLER EMBEDDED SNIPPET: 'kickstart_done'
|
||||
# DISABLES PXE BOOTING
|
||||
|
|
|
@ -9,6 +9,7 @@ echo > /tmp/partition.ks
|
|||
#set $clearpart_drives = []
|
||||
#set $physical_volumes = []
|
||||
#set $grub_drives = []
|
||||
#set $custom_grub_drives = []
|
||||
#set $partitions = []
|
||||
#set $volume_groups = {}
|
||||
#set $raid_volumes = {}
|
||||
|
@ -48,19 +49,22 @@ echo > /tmp/partition.ks
|
|||
## embed its code later, useable for legacy boot.
|
||||
## May be way smaller, but be aware that the parted may
|
||||
## shrink 1M partition to zero at some disks and versions.
|
||||
$parted_commands.append("parted -a minimal -s /dev/%s unit MB mkpart primary 0 24M" % $space_id)
|
||||
$parted_commands.append("parted -s /dev/%s set 1 bios_grub on" % $space_id)
|
||||
## The following two lines are for future.
|
||||
## $parted_commands.append("parted -a minimal -s /dev/%s unit MB mkpart primary 0 24M" % $space_id)
|
||||
## $parted_commands.append("parted -s /dev/%s set 1 bios_grub on" % $space_id)
|
||||
## Create partition for the EFI boot, minimum size is 100M,
|
||||
## recommended is 200M, with fat32 and future mountpoint in
|
||||
## the /boot/efi
|
||||
## There is also '/usr/sbin/parted -s /dev/sda set 2 boot on'
|
||||
## which is strictly needed for EFI boot itself.
|
||||
$parted_commands.append("parted -a minimal -s /dev/%s unit MB mkpart primary fat32 24M 300M" % $space_id)
|
||||
$parted_commands.append("parted -s /dev/%s set 2 boot on" % $space_id)
|
||||
## The following two lines are for future.
|
||||
## $parted_commands.append("parted -a minimal -s /dev/%s unit MB mkpart primary fat32 24M 300M" % $space_id)
|
||||
## $parted_commands.append("parted -s /dev/%s set 2 boot on" % $space_id)
|
||||
#######################################
|
||||
## Installing bootloader
|
||||
#######################################
|
||||
$grub_drives.append("\$(basename `readlink -f /dev/%s`)" % $space_id)
|
||||
$custom_grub_drives.append("`readlink -f /dev/%s`" % $space_id)
|
||||
#end if
|
||||
#######################################
|
||||
## Configuring plain partitions
|
||||
|
@ -172,11 +176,11 @@ echo "partition $p['name'] --size=$p['size'] --ondisk=$p['ondisk']" >> /tmp/part
|
|||
#end for
|
||||
#set $num_spares = $len($raid_volumes[$raid_mount]) - 2
|
||||
#set $md_name = "md%d" % $mdnum
|
||||
#if $num_spares > 0
|
||||
echo "raid $raid_mount --device $md_name --spares=$num_spares --fstype ext3 --level=RAID1 $ks_raids" >> /tmp/partition.ks
|
||||
#else
|
||||
echo "raid $raid_mount --device $md_name --fstype ext3 --level=RAID1 $ks_raids" >> /tmp/partition.ks
|
||||
#end if
|
||||
## #if $num_spares > 0
|
||||
##echo "raid $raid_mount --device $md_name --spares=$num_spares --fstype ext2 --level=RAID1 $ks_raids" >> /tmp/partition.ks
|
||||
## #else
|
||||
echo "raid $raid_mount --device $md_name --fstype ext2 --level=RAID1 $ks_raids" >> /tmp/partition.ks
|
||||
## #end if
|
||||
#end if
|
||||
#set $mdnum += 1
|
||||
#end for
|
||||
|
@ -203,6 +207,8 @@ echo "$lv" >> /tmp/partition.ks
|
|||
## Actual creating logical volumes in %post section
|
||||
#######################################
|
||||
echo "%post --nochroot" > /tmp/post_partition.ks
|
||||
echo "set -x -v" >> /tmp/post_partition.ks
|
||||
echo "exec 1>/mnt/sysimage/root/post_partition.log 2>&1" >> /tmp/post_partition.ks
|
||||
#for $lv in $post_logical_volumes
|
||||
echo "$lv" >> /tmp/post_partition.ks
|
||||
#end for
|
||||
|
@ -212,4 +218,21 @@ echo "$lv" >> /tmp/post_partition.ks
|
|||
#set $drives = ",".join($grub_drives)
|
||||
echo "bootloader --location=mbr --driveorder=$drives --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
|
||||
##
|
||||
#######################################
|
||||
## Actual custom bootloader installing
|
||||
#######################################
|
||||
#set $num = 0
|
||||
#for $drive in $custom_grub_drives
|
||||
echo "stage2_devnum=\\$((\\$(fdisk -l $drive | grep -E '^\/.+\*' | awk '{print \\$1}' | sed s/[^0-9]//g) - 1))" >> /tmp/post_partition.ks
|
||||
echo "chroot /mnt/sysimage /bin/cp /boot/grub/grub.conf /boot/grub/grub${num}.conf" >> /tmp/post_partition.ks
|
||||
echo "chroot /mnt/sysimage /bin/sed -i -re \"s/\(hd[0-9]+\,[0-9]+\)/\(hd0\,\\${stage2_devnum}\)/g\" /boot/grub/grub${num}.conf" >> /tmp/post_partition.ks
|
||||
echo "echo -n > /tmp/grub.script" >> /tmp/post_partition.ks
|
||||
echo "echo \"device (hd0) $drive\" >> /tmp/grub.script" >> /tmp/post_partition.ks
|
||||
echo "echo \"root (hd0,\\${stage2_devnum})\" >> /tmp/grub.script" >> /tmp/post_partition.ks
|
||||
echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub${num}.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
|
||||
echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
|
||||
echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --batch" >> /tmp/post_partition.ks
|
||||
#set $num += 1
|
||||
#end for
|
||||
echo "cp /tmp/post_partition.ks /mnt/sysimage/root/post_partition.ks" >> /tmp/post_partition.ks
|
||||
#end if
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# begin Red Hat Network certificate-based server registration
|
||||
|
||||
#if $redhat_management_type == "cert" and $redhat_register_user != "" and $redhat_register_password != ""
|
||||
# Necessary packages
|
||||
if ! rpm -q subscription-manager &>/dev/null; then
|
||||
yum -y install subscription-manager
|
||||
fi
|
||||
if ! rpm -q virt-what &>/dev/null; then
|
||||
yum -y install virt-what
|
||||
fi
|
||||
|
||||
# Subscribe (register) the system, but don't attach
|
||||
subscription-manager register --username=$redhat_register_user --password=$redhat_register_password
|
||||
# Get Red Hat OpenStack profile
|
||||
|
||||
if [ $(virt-what | wc -c) -gt 2 ]; then
|
||||
system_type="Virtual"
|
||||
else
|
||||
system_type="Physical"
|
||||
fi
|
||||
# Capture Pool ID and register
|
||||
poolid=$(subscription-manager list --available | awk "BEGIN {RS=\"\\n\\n\";} /$system_type/ { print; exit; }" | grep "Pool Id:" | awk '{ print $3;}')
|
||||
subscription-manager attach --pool="$poolid"
|
||||
# Add what used to be called channels
|
||||
yum -y install yum-utils
|
||||
yum-config-manager --enable rhel-6-server-optional-rpms &> /dev/null
|
||||
yum-config-manager --enable rhel-6-server-supplementary &> /dev/null
|
||||
#else
|
||||
# not configured to use Certificate-based RHN (ok)
|
||||
#end if
|
||||
# end Red Hat Network certificate-based server registration
|
||||
|
|
@ -61,6 +61,16 @@ class horizon(
|
|||
require => Package[$::horizon::params::http_service],
|
||||
}
|
||||
|
||||
define horizon_safe_package(){
|
||||
if ! defined(Package[$name]){
|
||||
@package { $name : }
|
||||
}
|
||||
}
|
||||
if $::operatingsystem == 'redhat' {
|
||||
horizon_safe_package { $horizon_additional_packages : }
|
||||
}
|
||||
|
||||
|
||||
File {
|
||||
require => Package['dashboard'],
|
||||
owner => $wsgi_user,
|
||||
|
|
|
@ -10,6 +10,7 @@ class horizon::params {
|
|||
$vhosts_file = '/etc/httpd/conf.d/ssl.conf'
|
||||
$http_modwsgi = 'mod_wsgi'
|
||||
$package_name = 'openstack-dashboard'
|
||||
$horizon_additional_packages = ['nodejs', 'nodejs-less']
|
||||
$httpd_listen_config_file = '/etc/httpd/conf.d/ports.conf'
|
||||
$local_settings_path = '/etc/openstack-dashboard/local_settings'
|
||||
$root_url = '/dashboard'
|
||||
|
|
|
@ -98,9 +98,15 @@ class mysql::server (
|
|||
|
||||
package { 'mysql-server':
|
||||
name => $package_name,
|
||||
} ->
|
||||
exec { "create-mysql-table-if-missing":
|
||||
command => "/usr/bin/mysql_install_db --datadir=$mysql::params::datadir --user=mysql && chown -R mysql:mysql $mysql::params::datadir",
|
||||
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||
unless => 'test -d $mysl::params::datadir',
|
||||
}
|
||||
|
||||
|
||||
|
||||
Class['openstack::corosync'] -> Cs_resource['p_mysql']
|
||||
|
||||
# #cs_rsc_defaults { "resource-stickiness":
|
||||
|
|
|
@ -57,7 +57,7 @@ class nailgun(
|
|||
Class["nailgun::nginx-nailgun"] ->
|
||||
Class["nailgun::cobbler"] ->
|
||||
Class["nailgun::pm"] ->
|
||||
Class["nailgun::rsyslog"] ->
|
||||
Class["openstack::logging"] ->
|
||||
Class["nailgun::supervisor"] ->
|
||||
Anchor<| title == "nailgun-end" |>
|
||||
|
||||
|
@ -79,7 +79,20 @@ class nailgun(
|
|||
],
|
||||
}
|
||||
|
||||
class { "nailgun::rsyslog": }
|
||||
class {openstack::logging:
|
||||
role => 'server',
|
||||
log_remote => false,
|
||||
log_local => true,
|
||||
log_auth_local => true,
|
||||
rotation => 'weekly',
|
||||
keep => '4',
|
||||
# should be > 30M
|
||||
limitsize => '100M',
|
||||
port => '514',
|
||||
proto => 'udp',
|
||||
show_timezone => false,
|
||||
virtual => true,
|
||||
}
|
||||
|
||||
class { "nailgun::user":
|
||||
nailgun_group => $nailgun_group,
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
require 'openstack'
|
||||
require 'netaddr'
|
||||
|
||||
Puppet::Type.type(:nova_floating_range).provide :nova_manage do
|
||||
desc 'Create nova floating range'
|
||||
|
||||
commands :nova_manage => 'nova-manage'
|
||||
|
||||
def exists?
|
||||
@resource[:ensure] = 'present' unless @resource[:ensure]
|
||||
|
||||
if @resource[:ensure] == :absent
|
||||
operate_range.any?
|
||||
else
|
||||
operate_range.empty?
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
mixed_range.each do |ip|
|
||||
connect.create_floating_ips_bulk :ip_range => ip, :pool => @resource[:pool]
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
mixed_range.each do |ip|
|
||||
nova_manage("floating", "delete", ip )
|
||||
end
|
||||
end
|
||||
|
||||
# Create range in cidr, including first and last ip
|
||||
# Nova will create this range, excluding network and broadcast IPs
|
||||
def mixed_range
|
||||
range = []
|
||||
NetAddr.merge(operate_range).each do |cidr|
|
||||
tmp_range = NetAddr::CIDR.create(cidr).enumerate
|
||||
range << tmp_range.first.to_s
|
||||
range << tmp_range.last.to_s
|
||||
end
|
||||
|
||||
range.uniq!
|
||||
|
||||
range += NetAddr.merge(operate_range).delete_if{ |part| part =~ /\/3[12]/}
|
||||
end
|
||||
|
||||
# Calculate exist IP and current range
|
||||
def operate_range
|
||||
exist_range = []
|
||||
connect.get_floating_ips_bulk.each do |element|
|
||||
exist_range << element.address
|
||||
end
|
||||
if @resource[:ensure] == :absent
|
||||
ip_range & exist_range
|
||||
else
|
||||
ip_range - exist_range
|
||||
end
|
||||
end
|
||||
|
||||
# Create array of IPs from range
|
||||
def ip_range
|
||||
ip = @resource[:name].split('-')
|
||||
ip_range = NetAddr.range NetAddr::CIDR.create(ip.first), NetAddr::CIDR.create(ip.last)
|
||||
ip_range.unshift(ip.first).push(ip.last)
|
||||
end
|
||||
|
||||
# Connect to OpenStack
|
||||
def connect
|
||||
@connect ||= OpenStack::Connection.create :username => @resource[:username],
|
||||
:api_key => @resource[:api_key],
|
||||
:auth_method => @resource[:auth_method],
|
||||
:auth_url => @resource[:auth_url],
|
||||
:authtenant_name => @resource[:authtenant_name],
|
||||
:service_type => @resource[:service_type]
|
||||
end
|
||||
end
|
|
@ -0,0 +1,76 @@
|
|||
Puppet::Type.newtype(:nova_floating_range) do
|
||||
|
||||
@doc = 'Manage creation/deletion of nova floating ip ranges.'
|
||||
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'IP range ("192.168.1.1-192.168.1.55")'
|
||||
|
||||
validate do |value|
|
||||
raise Puppet::Error, " #{value} does not look like IP range" unless value =~ /^(\d{1,3}\.){3}\d{1,3}-(\d{1,3}\.){3}\d{1,3}$/
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:pool) do
|
||||
desc 'Pool ranges'
|
||||
|
||||
defaultto 'nova'
|
||||
end
|
||||
|
||||
newparam(:interface) do
|
||||
# I don't know how use it
|
||||
desc 'Interface for floating IP'
|
||||
end
|
||||
|
||||
newparam(:username) do
|
||||
desc 'authorization user'
|
||||
|
||||
munge do |value|
|
||||
String value
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:api_key) do
|
||||
desc 'authorization key'
|
||||
|
||||
munge do |value|
|
||||
String value
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:auth_method) do
|
||||
desc 'authorization password'
|
||||
|
||||
munge do |value|
|
||||
String value
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:auth_url) do
|
||||
desc 'URL to keystone authorization http://192.168.1.1:5000/v2.0/'
|
||||
|
||||
validate do |value|
|
||||
raise Puppet::Error, "#{value} does not look like URL" unless value =~ /^https?:\/\/\S+:\d{1,5}\/v[\d\.]{1,5}\//
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:authtenant_name) do
|
||||
desc 'Tenant name'
|
||||
|
||||
munge do |value|
|
||||
String value
|
||||
end
|
||||
end
|
||||
|
||||
newparam(:service_type) do
|
||||
desc 'Connection type :service_type parameter to "compute", "object-store", "volume" or "network" (defaults to "compute")'
|
||||
|
||||
defaultto 'compute'
|
||||
|
||||
munge do |value|
|
||||
String value
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -1,3 +1,4 @@
|
|||
# This class nova::manage::floating has been deprecated in favor of nova::manage::floating_range
|
||||
define nova::manage::floating (
|
||||
$network = $name
|
||||
) {
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Class for creating floating ip range
|
||||
# - ip_range = ['192.168.1.1-192.168.1.55','192.168.2.1-192.168.2.66']
|
||||
class nova::manage::floating_range (
|
||||
$ip_range,
|
||||
$pool = 'nova',
|
||||
$username = 'admin',
|
||||
$api_key = 'nova',
|
||||
$password = 'nova',
|
||||
$auth_url = undef,
|
||||
$authtenant_name = 'admin',
|
||||
){
|
||||
nova_floating_range{$ip_range:
|
||||
ensure => 'present',
|
||||
pool => $pool,
|
||||
username => $username,
|
||||
api_key => $api_key,
|
||||
auth_method => $password,
|
||||
auth_url => $auth_url,
|
||||
authtenant_name => $authtenant_name,
|
||||
}
|
||||
}
|
|
@ -400,7 +400,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -438,7 +438,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -461,7 +461,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -401,7 +401,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -341,7 +341,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -306,7 +306,7 @@ if $use_syslog {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => false,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
|
|
@ -23,14 +23,15 @@ class puppetmaster::master (
|
|||
notify => Service["puppetmaster"],
|
||||
}
|
||||
|
||||
if $puppet_master_log == "syslog" {
|
||||
file { "/etc/rsyslog.d/40-puppet-master.conf":
|
||||
content => "if \$programname == 'puppet-master' then /var/log/puppet/master.log",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
}->Service["rsyslog"]->Service["puppetmaster"]
|
||||
}
|
||||
# Already declared @ rsyslog::server class
|
||||
# if $puppet_master_log == "syslog" {
|
||||
# file { "/etc/rsyslog.d/40-puppet-master.conf":
|
||||
# content => "if \$programname == 'puppet-master' then /var/log/puppet/master.log",
|
||||
# owner => "root",
|
||||
# group => "root",
|
||||
# mode => 0644,
|
||||
# }->Service["rsyslog"]->Service["puppetmaster"]
|
||||
#}
|
||||
|
||||
file { "/etc/puppet/puppet.conf":
|
||||
content => template("puppetmaster/puppet.conf.erb"),
|
||||
|
|
|
@ -137,8 +137,9 @@ def main():
|
|||
my.doConfigSetup(fn=opts.config,init_plugins=True) # init yum, WITH plugins
|
||||
|
||||
if opts.arch:
|
||||
archlist = []
|
||||
archlist.extend(rpmUtils.arch.getArchList(opts.arch))
|
||||
#archlist = []
|
||||
#archlist.extend(rpmUtils.arch.getArchList(opts.arch))
|
||||
archlist = opts.arch.split(',') # Change to this
|
||||
else:
|
||||
archlist = rpmUtils.arch.getArchList()
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
GeoIP-1.4.8-1.el6.x86_64.rpm
|
||||
MySQL-client-5.5.28-7.x86_64.rpm
|
||||
MySQL-client-wsrep-5.5.28_wsrep_23.7-12.x86_64.rpm
|
||||
MySQL-python-1.2.3-0.3.c1.2.el6.x86_64.rpm
|
||||
MySQL-server-5.5.28-7.x86_64.rpm
|
||||
MySQL-server-wsrep-5.5.28_wsrep_23.7-12.x86_64.rpm
|
||||
MySQL-shared-5.5.28-7.x86_64.rpm
|
||||
MySQL-shared-wsrep-5.5.28_wsrep_23.7-12.x86_64.rpm
|
||||
cirros-testvm-0.3.0-3.x86_64.rpm
|
||||
crmsh-1.2.5-55.2.x86_64.rpm
|
||||
|
@ -69,10 +66,10 @@ erlang-wx-R14B-04.8.el6.x86_64.rpm
|
|||
erlang-xmerl-R14B-04.8.el6.x86_64.rpm
|
||||
euca2ools-2.1.1-2.el6.noarch.rpm
|
||||
galera-23.2.2-1.rhel5.x86_64.rpm
|
||||
http-parser-2.0-4.20121128gitcd01361.el6.x86_64.rpm
|
||||
libicu-4.2.1-9.1.el6_2.x86_64.rpm
|
||||
libuv-0.10.4-1.el6.x86_64.rpm
|
||||
mcollective-2.3.1-2.el6.noarch.rpm
|
||||
mcollective-2.3.1-2.el6.src.rpm
|
||||
mcollective-client-2.3.1-2.el6.noarch.rpm
|
||||
mcollective-common-2.3.1-2.el6.noarch.rpm
|
||||
nailgun-agent-0.1.0-1.x86_64.rpm
|
||||
|
@ -98,12 +95,15 @@ rubygem-daemons-1.0.10-2.el6.noarch.rpm
|
|||
rubygem-fastthread-1.0.7-2.el6.x86_64.rpm
|
||||
rubygem-gem_plugin-0.2.3-3.el6.noarch.rpm
|
||||
rubygem-mongrel-1.1.5-3.el6.x86_64.rpm
|
||||
rubygem-netaddr-1.5.0-2.el6.noarch.rpm
|
||||
rubygem-openstack-1.1.1-2.el6.noarch.rpm
|
||||
rubygem-rake-0.8.7-2.1.el6.noarch.rpm
|
||||
rubygem-stomp-1.2.8-1.el6.noarch.rpm
|
||||
rubygems-1.3.7-1.el6.noarch.rpm
|
||||
scapy-2.0.0.10-5.el6.noarch.rpm
|
||||
socat-1.7.2.1-1.el6.x86_64.rpm
|
||||
supervisor-3.0a12-0.12.el6.noarch.rpm
|
||||
tinyproxy-1.8.2-1.el6.x86_64.rpm
|
||||
v8-3.14.5.7-3.el6.x86_64.rpm
|
||||
wxBase-2.8.12-2.el6.x86_64.rpm
|
||||
wxGTK-2.8.12-2.el6.x86_64.rpm
|
||||
|
|
|
@ -129,7 +129,7 @@ redhat-release-server
|
|||
redhat-rpm-config
|
||||
resource-agents
|
||||
rhel-boot-image
|
||||
rhn_register
|
||||
rhn-setup
|
||||
rsyslog-relp
|
||||
ruby
|
||||
ruby-devel
|
||||
|
|
|
@ -4,6 +4,11 @@ $use_satellite = false, $sat_hostname = false, $activation_key = false,
|
|||
$sat_base_channels, $sat_openstack_channel, $numtries = 3) {
|
||||
|
||||
Exec {path => '/usr/bin:/bin:/usr/sbin:/sbin'}
|
||||
$redhat_management_type = $use_satellite ?
|
||||
True => "site",
|
||||
False => "cert",
|
||||
default => undef,
|
||||
}
|
||||
package { "yum-utils":
|
||||
ensure => "latest"
|
||||
} ->
|
||||
|
@ -58,10 +63,10 @@ $sat_base_channels, $sat_openstack_channel, $numtries = 3) {
|
|||
mode => 0644,
|
||||
require => File['/etc/nailgun/']
|
||||
} ->
|
||||
|
||||
file { '/usr/local/bin':
|
||||
ensure => directory,
|
||||
} ->
|
||||
|
||||
file { '/usr/local/bin/repotrack':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/rpmcache/repotrack',
|
||||
|
@ -95,17 +100,12 @@ $sat_base_channels, $sat_openstack_channel, $numtries = 3) {
|
|||
kickstart => "/var/lib/cobbler/kickstarts/centos-x86_64.ks",
|
||||
kopts => "",
|
||||
distro => "rhel-x86_64",
|
||||
ksmeta => "redhat_register_user=${rh_username} redhat_register_password=${rh_password} redhat_management_type=cert",
|
||||
ksmeta => "redhat_register_user=${rh_username} redhat_register_password=${rh_password} redhat_management_type=$redhat_management_type redhat_management_server=$sat_hostname activationkey=$activation_key",
|
||||
menu => true,
|
||||
require => Cobbler_distro["rhel-x86_64"],
|
||||
} ->
|
||||
exec {'rebuild-fuel-repo':
|
||||
command => "/bin/cp /var/www/nailgun/centos/fuelweb/x86_64/repodata/comps.xml ${pkgdir}/repodata/comps.xml; /usr/bin/createrepo -g ${pkgdir}/repodata/comps.xml ${pkgdir}",
|
||||
}->
|
||||
exec {'check-rpm':
|
||||
command => "/bin/find ${pkgdir} -name '*.rpm' | /usr/bin/xargs /bin/rpm --checksig | grep 'MD5 NOT OK'",
|
||||
logoutput => true,
|
||||
returns => 1,
|
||||
command => "/bin/cp -f /var/www/nailgun/centos/fuelweb/x86_64/repodata/comps.xml ${pkgdir}/repodata/comps.xml; /usr/bin/createrepo --simple-md-filenames -g ${pkgdir}/repodata/comps.xml ${pkgdir}",
|
||||
}
|
||||
|
||||
file { '/etc/nailgun/req-fuel-rhel.txt':
|
||||
|
|
|
@ -8,7 +8,7 @@ subscription-manager attach "--pool=$poolid"
|
|||
|
||||
#Enable channels
|
||||
for channel in <%= rh_base_channels %> <%= rh_openstack_channel %>; do
|
||||
yum-config-manager --enable "$channel"
|
||||
yum-config-manager --enable "$channel" &> /dev/null
|
||||
done
|
||||
|
||||
#Tell RHSM to let CentOS accept packages from Red Hat
|
||||
|
@ -25,10 +25,14 @@ if ! [ -f /root/centos-release/centos-release*.rpm ]; then
|
|||
exit 1
|
||||
fi
|
||||
#Download RHN packages needed for RHN Satellite registration
|
||||
rhnpackages="m2crypto rhn-check rhn-client-tools rhnlib rhnsd rhn-setup yum-rhn-plugin redhat-release-sever"
|
||||
rhnpackages="m2crypto rhn-check rhn-client-tools rhnlib rhnsd rhn-setup yum-rhn-plugin redhat-release-server"
|
||||
rm -rf /root/rhnpackages
|
||||
mkdir -p /root/rhnpackages
|
||||
yum-config-manager --enable rhel-6-server-rpms
|
||||
yumdownloader --releasever=<%= releasever %> --disablerepo='*' --enablerepo='*rhel*' --resolve --destdir /root/rhnpackages $rhnpackages
|
||||
#Delete in case yumdownloader gets extra packages
|
||||
repomanage -o /root/rhnpackages | xargs rm -f
|
||||
|
||||
rpm -ivh --force /root/rhnpackages/*.rpm
|
||||
|
||||
|
||||
|
@ -45,6 +49,7 @@ subscription-manager unregister
|
|||
rm -rf /etc/yum.repos.d/redhat.repo
|
||||
|
||||
#Run registration
|
||||
|
||||
rhnreg_ks "--serverUrl=http://<%= sat_hostname %>/XMLRPC" --profilename=fuelweb "--activationkey=<%= activation_key %>" --sslCACert=/etc/sysconfig/rhn/RHNS-CA-CERT --nopackages --nohardware --novirtinfo --norhnsd --force
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -53,8 +58,9 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
#Ensure channels are enabled:
|
||||
errors=0
|
||||
rhnchanneloutput="$(rhn-channel -l)"
|
||||
for channel in <%= sat_base_channels %> <%= sat_openstack_channel %>; do
|
||||
if rhn-channel -l | grep -q "$channel"; then
|
||||
if grep -q "$channel" <<< "$rhnchanneloutput"; then
|
||||
echo "Found $channel."
|
||||
else
|
||||
echo "ERROR: $channel not found. Fix this in RHN Satellite manually or run the following command:"
|
||||
|
@ -71,26 +77,26 @@ fi
|
|||
|
||||
#Download packages
|
||||
mkdir -p <%= pkgdir %>/repodata <%= pkgdir %>/Packages
|
||||
#yumdownloader --releasever=<%= releasever %> --disablerepo='*' --enablerepo='rhel*' --resolve --destdir "<%= pkgdir %>/Packages" $(cat /etc/nailgun/required-rpms.txt | xargs echo -en)
|
||||
|
||||
rm -f /etc/yum/vars/releasever
|
||||
yum-config-manager --disable 'nailgun' &> /dev/null
|
||||
yum-config-manager --disable 'centos' &> /dev/null
|
||||
yum-config-manager --disable 'centos' --disable 'extras' --disable 'updates' &> /dev/null
|
||||
yum-config-manager --disable 'base' &> /dev/null
|
||||
echo 6Server > /etc/yum/vars/releasever
|
||||
echo "Building initial cache. This may take several minutes."
|
||||
yum --releasever=<%= releasever %> makecache
|
||||
|
||||
for tries in $(seq 1 <%= numtries %>); do
|
||||
/usr/local/bin/repotrack -a x86_64 -p "<%= pkgdir %>/Packages" $(cat /etc/nailgun/required-rpms.txt | xargs echo -en)
|
||||
/usr/local/bin/repotrack -a x86_64,noarch -p "<%= pkgdir %>/Packages" $(cat /etc/nailgun/required-rpms.txt | xargs echo -en)
|
||||
status=$?
|
||||
#Purge any corrupt downloaded RPMs
|
||||
# FIXME: There is a error with a path substitution
|
||||
# At least hide path if there is no packages.
|
||||
shopt -s nullglob
|
||||
before=`ls -1 "<%= pkgdir %>/Packages/|wc -l`
|
||||
before=`ls -1 "<%= pkgdir %>/Packages/" |wc -l`
|
||||
echo Packages in local repo: $before
|
||||
env LANG=C rpm --checksig <%= pkgdir %>/Packages/* | grep 'md5 NOT OK' | cut -d':' -f1| xargs rm -f
|
||||
after=`ls -1 "<%= pkgdir %>/Packages/|wc -l`
|
||||
after=`ls -1 "<%= pkgdir %>/Packages/" |wc -l`
|
||||
echo Correct packages in local repo: $after
|
||||
[ $before -eq $after ] || status=1
|
||||
done
|
||||
|
|
|
@ -10,6 +10,7 @@ Known Issues and Workarounds
|
|||
|
||||
.. include:: /pages/frequently-asked-questions/0010-rabbitmq.rst
|
||||
.. include:: /pages/frequently-asked-questions/0020-galera.rst
|
||||
.. include:: /pages/frequently-asked-questions/0030-mysql-pacemaker.rst
|
||||
.. include:: /pages/frequently-asked-questions/0070-common-technical-issues.rst
|
||||
.. include:: /pages/frequently-asked-questions/0080-other-questions.rst
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
Corosync crashes without network
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Issue:**
|
||||
TOTEM, the network protocol used by Corosync exceeds its timeout. Corosync sometimes crashes when networking is unavailable for a length of time. Additionally, MySQL has stopped working.
|
||||
|
||||
**Workaround:**
|
||||
|
||||
#. Verify that corosync is really broken ``service corosync status``.
|
||||
* You should see next error: ``corosync dead but pid file exists``
|
||||
|
||||
#. Start corosync manually ``service corosync start``.
|
||||
|
||||
#. Run ``ps -ef | grep mysql`` and kill ALL(!) **mysqld** and **mysqld_safe** processes.
|
||||
|
||||
#. Wait while pacemaker starts mysql processes again.
|
||||
* You can check it with ``ps -ef | grep mysql`` command.
|
||||
* If it doesn't start, run crm resource p_mysql start
|
||||
|
||||
#. Check with ``crm status`` command that this host is part of the cluster and p_mysql is not within "Failed actions".
|
Loading…
Reference in New Issue