-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdding-NewServer-OpenStack-AlmaLinux9.txt
More file actions
395 lines (224 loc) · 7.87 KB
/
Adding-NewServer-OpenStack-AlmaLinux9.txt
File metadata and controls
395 lines (224 loc) · 7.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ How to Add a New Compute Node with OpenStack Cloud +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++
+ Ready for Adding as Compute Node With OpenStack +
+++++++++++++++++++++++++++++++++++++++++++++++++++
#This Configuration do on Compute Node
#Checking System Informations
hostnamectl
cat /etc/redhat-release
grep -E ' svm | vmx' /proc/cpuinfo
lsmod | grep kvm
lscpu
free -h
lsblk
#Configure Common Setup
hostnamectl set-hostname cloud
ip a
yum install nano -y
#Need to Configure Static IP
#Check Network Card Info file
ls /etc/sysconfig/network-scripts/
#Note: If OS are Almalinux 9 may be couldn't find NIC file in network-scripts folder.
#This problem for solutions:
#Enable CRB Repository
dnf config-manager --set-enabled crb
#Install Epel and Epel Next on Almalinux 9
dnf install epel-release -y
#Working On AlmaLinux 9
dnf install centos-release-openstack-yoga -y
yum clean all
# Install network-scripts package
yum install network-scripts -y
# Enable/Start Network Service
systemctl status network
systemctl start network
systemctl enable network
systemctl restart network
#### Check Network Card Info file
ls /etc/sysconfig/network-scripts/
#### Remember the IP and MAC Addresses
ip a
#### Edit Network Interface File
nano /etc/sysconfig/network-scripts/ifcfg-enp1s0
#Paste bellow in ifcfg-enp1s0 file
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
#Edit Hosts file:
#For OpenStack Controller Node
echo "192.168.0.50 cloud.paulco.xyz cloud" >> /etc/hosts
#For OpenStack Compute Node
echo "192.168.0.51 cloud1.paulco.xyz cloud1" >> /etc/hosts
#Checking SELinux
getenforce
#Disable SELinux
#setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
# Disable Firewalld
systemctl disable firewalld
systemctl stop firewalld
# Disable/Stop NetworkManager
systemctl status NetworkManager
systemctl disable NetworkManager
systemctl stop NetworkManager
#systemctl restart NetworkManager
ifup enp0s3
#ifdown enp0s3
#systemctl mask NetworkManager.service
#systemctl stop NetworkManager.service
#systemctl disable NetworkManager.service
#systemctl list-unit-files | grep NetworkManager
++++++++++++++++++++++++++++++++++++
yum autoremove epel-release
yum autoremove openstack-packstack
yum clean all
yum repolist
yum update -y && yum upgrade -y
reboot
#After Reboot check iptables status
systemctl status iptables
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Now Working On OpenStack Controller Node +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Go to OpenStack Controller node
+++++++++++++++++++++
#Edit Hosts file:
#For OpenStack Controller Node
echo "192.168.0.50 cloud.paulco.xyz cloud" >> /etc/hosts
#For OpenStack Compute Node
echo "192.168.0.51 cloud1.paulco.xyz cloud1" >> /etc/hosts
+++++++++++++++++++++
#SSH passwordless connection
ssh-keygen
cat ~/.ssh/id_rsa.pub
ssh-copy-id root@192.168.101.231
ssh root@192.168.101.231
+++++++++++++++++++++
#From OpenStack Controller Node
#vi /etc/sysconfig/iptables
iptables -L
#Allow bellow mentioned Port in iptables roles
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
++++++++++++++++++++++++++++++
#From OpenStack Controller Node
#Edit the answer file
cp answers.txt answers.txt.orginal
vi answers.txt
EXCLUDE_SERVERS= [Given Existing Nodes IP]
CONFIG_COMPUTE_HOSTS= [Given New Compute Nodes IP]
NTP=0.asia.pool.ntp.org,1.asia.pool.ntp.org,2.asia.pool.ntp.org,3.asia.pool.ntp.org
#Before run bellow command, '#' will be removed.
packstack --answer-file #/root/answers.txt | tee adding-Node-log.txt
+++++++++++++++++++++ If Get Error +++++++++++++++++++++
#If we get this Error When run avobe command
#Error 1: Pre installing Puppet and discovering hosts' details[ ERROR ].
#Error 2: GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux.
#Cause:
Almalinux 8 Update & Upgrade related problem. we need to changes AlmaLinux 8 GPG key.
#Solution:
Ref: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
#Import the the GPG key in almalinux8
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
dnf clean packages
dnf upgrade almalinux-release
++++++++++++++++++++++++++++
##Installation is Completed Check Compute Node
rpm -qa | grep -i openstack
#Check nova-compute log From Compute Node
tail -f /var/log/nova/nova-compute.log
tail -n 20 /var/log/nova/nova-compute.log
yum install -y openstack-utils
openstack-service status
openstack-service restart
openstack-service start
openstack-status
ovs-vsctl show
##Check on Controller Node
nova hypervisor-list
#Add the compute node to the cell database
#Important
#Run the following commands on the controller node.
#Source the admin credentials to enable admin-only CLI commands
. admin-openrc
#Then confirm there are compute hosts in the database
openstack compute service list --service nova-compute
#Discover compute hosts:
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
#Alternatively, you can set an appropriate interval in /etc/nova/nova.conf:
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 compute2
------------------------------------------------------
systemctl restart openvswitch libvirtd neutron-openvswitch-agent openstack-nova-compute
------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++
Ways 2: Add Node
+++++++++++++++++++++++++++++++++++++++++++++++
yum install openstack-nova-compute openstack-neutron openstack-neutron-openvswitch -y
sed -i.bak -e 's/\/32/\/16/' /etc/sysconfig/iptables
ls -l /etc/sysconfig/iptables*
systemctl restart iptables
iptables -L
+++++++++++++++++++++++++++++++++++++++++++++
Error: OpenStack error: Host is not mapped to any cell
Ref:
https://cloud.tencent.com/developer/article/1501368
Solution:
nova-manage cell_v2 discover_hosts --verbose
++++++++++++++++++++++++++++++++++++++++++++
3.
Error: Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance
Solution:
systemctl restart openstack* neutron* libvirtd
systemctl status openstack* neutron* libvirtd
systemctl restart neutron*
+++++++++++++++++
service openstack-nova-compute restart
systemctl restart openstack-nova-compute.service
+++++++++++++++++++++++++++++++++++++++
+ Error: When Adding compute Node +
+++++++++++++++++++++++++++++++++++++++
1.
Job for neutron-ovs-cleanup.service failed because a fatal signal was delivered causing the control process to dump core.
Solution:
#Go to Controler Node
. keysourcerc_admin
neutron-linuxbridge-cleanup
2.
OpenStack error: Host is not mapped to any cell
Solution:
#Go to Controler Node
. keysourcerc_admin
nova-manage cell_v2 discover_hosts --verbose
#You 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
++++++++++++++++++++++++=