git clone https://github.com/SumonPaul18/adding-computenode-openstack.git
cd adding-computenode-openstack
chmod +x adding-compute-node.sh
. adding-compute-node.sh
hostnamectl
grep -E ' svm | vmx' /proc/cpuinfo
lsmod | grep kvm
lscpu
free -h
lsblk
hostnamectl set-hostname cloud1
ip a
yum install nano -y
ls /etc/sysconfig/network-scripts/
dnf config-manager --set-enabled crb
dnf install epel-release -y
dnf install centos-release-openstack-yoga -y
yum clean all
yum install network-scripts -y
systemctl status network
systemctl start network
systemctl enable network
systemctl restart network
ls /etc/sysconfig/network-scripts/
ip a
nano /etc/sysconfig/network-scripts/ifcfg-enp1s0
HWADRR=1c:1b:0d:8b:c6:ba
NM_CONTROLLED=no
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.150
PREFIX=24
GATEWAY=192.168.0.1
DNS1=8.8.8.8
DNS2=8.8.4.4
DEVICE=enp1s0
nmcli connection up enp1s0
ip a s enp1s0
systemctl restart NetworkManager
ping google.com
cp /etc/sysconfig/network-scripts/ifcfg-enp1s0 /etc/sysconfig/network-scripts/ifcfg-enp1s0.bak
cat /etc/sysconfig/network-scripts/ifcfg-enp1s0
echo "192.168.0.50 cloud.paulco.xyz cloud" >> /etc/hosts
echo "192.168.0.51 cloud1.paulco.xyz cloud1" >> /etc/hosts
getenforce
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
systemctl stop firewalld
systemctl status NetworkManager
systemctl disable NetworkManager
systemctl stop NetworkManager
ifup enp0s3
yum autoremove epel-release
yum autoremove openstack-packstack
yum clean all
yum repolist
yum update -y && yum upgrade -y
reboot
systemctl status iptables
echo "192.168.0.50 cloud.paulco.xyz cloud" >> /etc/hosts
echo "192.168.0.51 cloud1.paulco.xyz cloud1" >> /etc/hosts
ssh-keygen
cat ~/.ssh/id_rsa.pub
ssh-copy-id root@192.168.0.95
ssh root@192.168.0.95
vi /etc/sysconfig/iptables
iptables -L
iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
iptables -I INPUT -p tcp --dport 15672 -j ACCEPT
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
iptables -I INPUT -p udp --dport 53 -j ACCEPT
iptables -I INPUT -p udp --dport 67 -j ACCEPT
iptables -I INPUT -p tcp --dport 3260 -j ACCEPT
#iptables -A INPUT -p tcp --dport 22 -s 0/0 -j ACCEPT
service iptables save
systemctl restart iptables
cp answers.txt answers.txt.orginal
vi answers.txt
EXCLUDE_SERVERS= 192.168.0.50
CONFIG_COMPUTE_HOSTS= 192.168.0.95
0.asia.pool.ntp.org,1.asia.pool.ntp.org,2.asia.pool.ntp.org,3.asia.pool.ntp.org
packstack --answer-file #/root/answers.txt | tee adding-Node-log.txt
If You Get Error
Error: Pre installing Puppet and discovering hosts' details[ ERROR ] Error: GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Almalinux 8 Update & Upgrade related problem. we need to changes AlmaLinux 8 GPG key.
Reference: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
dnf clean packages
dnf upgrade almalinux-release
rpm -qa | grep -i openstack
tail -f /var/log/nova/nova-compute.log
yum install -y openstack-utils
openstack-service status
openstack-service start
openstack-service restart
openstack-status
ovs-vsctl show
nova hypervisor-list
Source the admin credentials to enable admin-only CLI commands
. admin-openrc
openstack compute service list --service nova-compute
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
vi /etc/nova/nova.conf
[scheduler]
discover_hosts_in_cells_interval = 300
openstack compute service list
nova-status upgrade check
virsh list --all
nova hypervisor-servers cloud1
systemctl restart openvswitch libvirtd neutron-openvswitch-agent openstack-nova-compute
Error: IPtables OR IP Can't Access Related Errror
Allow Your IP Block/CIDR in IPtables file
sed -i.bak -e 's/\/32/\/16/' /etc/sysconfig/iptables
Verifying IPtables lists
ls -l /etc/sysconfig/iptables*
Restart IPtables Service
systemctl restart iptables
Verifying IPtables, Another Approach
iptables -L
Error: Host is not mapped to any cell
Error: OpenStack error: Host is not mapped to any cell > Reference: > https://cloud.tencent.com/developer/article/1501368Go to Controler Node
. keysourcerc_admin
nova-manage cell_v2 discover_hosts --verbose
We can identify this using the openstack compute service list command:
openstack compute service list --service nova-compute
Once that has happened, you can scan and add it to the cell using the nova-manage cell_v2 discover_hosts command:
nova-manage cell_v2 discover_hosts
Error: Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance
Restart Some OpenStack Services
systemctl restart openstack* neutron* libvirtd
Verifying Status
systemctl status openstack* neutron* libvirtd
Restart Neutron Services
systemctl restart neutron*
Restart Nova-Computer Service
service openstack-nova-compute restart
Restart Nova-Computer Service, Another Approach
systemctl restart openstack-nova-compute.service
Error: When Adding compute Node
Job for neutron-ovs-cleanup.service failed because a fatal signal was delivered causing the control process to dump core.
Go to Controler Node
. keysourcerc_admin
Cleanup LinuxBridge
neutron-linuxbridge-cleanup