找回密码
 注册
查看: 559|回复: 3

ERROR nova.scheduler.utils qemu unexpectedly closed the monitor

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-10-20 13:44:30 | 显示全部楼层 |阅读模式
2022-10-20 10:45:08.266 37 ERROR nova.scheduler.utils [req-035fc933-de6b-448a-978e-c15ae171daeb a3cfa6f70675429985132daa6d3b906e 0c915a0d7601493cb1ecfd904b09f54c - default default] [instance: 52baa020-426b-4800-9492-0654b834ef2a] Error from last host: compute07 (node compute07): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1863, in _do_build_and_run_instance\n    filter_properties, request_spec)\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2143, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 52baa020-426b-4800-9492-0654b834ef2a was re-scheduled: internal error: qemu unexpectedly closed the monitor: 2022-10-20 10:44:54.063891 7fded43821c0 -1 Errors while parsing config file!\n2022-10-20 10:44:54.063897 7fded43821c0 -1 parse_file: cannot open /etc/ceph/ceph.conf: (13) Permission denied\n2022-10-20T02:44:54.292119Z qemu-kvm: -drive file=rbd:hdd-8T-volumes/volume-41da2d70-d3bd-4187-9f60-8b262286f292:id=cinder:auth_supported=cephx\\;none:mon_host=192.168.0.75\\:6789\\;192.168.0.77\\:6789\\;192.168.0.79\\:6789\\;192.168.0.86\\:6789\\;192.168.0.89\\:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0,serial=41da2d70-d3bd-4187-9f60-8b262286f292,cache=none,discard=unmap: error reading header from volume-41da2d70-d3bd-4187-9f60-8b262286f292: No such file or directory\n']
( p' G8 d) ^; l4 q; v- }
* ~% D3 j# M3 x1 E1 q2 g: C9 @( P" t  c" b- e( K
应该是ceph中pool池的权限问题
; l4 k  E% v  @. d- F# e/ f

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-10-20 13:45:16 | 显示全部楼层
[root@controller1 src]# ceph auth caps client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children,allow rwx pool=images,allow rwx pool=ssd-volumes,allow rwx pool=hdd-2.4T-volumes,allow rwx pool=hdd-8T-volumes,allow rwx pool=nova-vms,allow rwx pool=backups'
; s" z  p& c* W# {% ]updated caps for client.nova

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-10-20 14:13:36 | 显示全部楼层
0
8 w4 y4 _, [) X7 L; ~4 R0 d1 i6 \# Q, _- R" r' o
' N  F$ ~% i, j; R( z2 m- s. \
As noted in Openstack docs [1], rebuild is not supported for volume-based VMs.
  R: i1 ~- n$ k+ d8 d4 r7 d' j( C$ O2 P: s9 P3 H
Assuming you are trying to rebuild the VM with a fresh image ("factory reset"), a slightly "hacky" solution is to replace the underlying volume with the fresh image while keeping the same pool/path.
6 n. \" h! l# c! |" i* l/ E) ], ^
For Ceph based backend, it would be something like; K5 N" O# @% A2 d5 _

) i$ g& q$ k. Oopenstack volume show <...> => Get pool/path from rbd backend
- n6 Q$ d2 _: x! ^$ \% h! Q# vopenstack image show <...> => Get pool/path from rbd backend
$ n& R: C5 @* a& h8 Y, vopenstack server stop <VM> => Stop the VM- Q! ?  P0 N# _) F( P6 g: h

$ U( `+ S  `6 P8 B: s) P8 Yrbd -p <POOL NAME> mv <VM VOLUME UUID>  <VM VOLUME UUID>.old* H+ ]! j* r; J1 V" ^+ {
rbd -p <POOL NAME> cp <IMAGE VOLUME UUID> <VM VOLUME UUID>
& P. e% I! F) QOnce the copy finishes, start the VM, C% z, }' E7 ]
. |) ~) t1 n( t, o: a4 @
openstack server start <VM>

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-10-20 14:57:20 | 显示全部楼层
Nova:
. c, _, k/ i1 D9 OList of instances
! F, `0 U  u' [: B10 k3 @$ |, @( F! G# R% m
openstack server list- X. I( D; y% E2 Q6 v' M
2
$ @: ^! U( E$ o- _  `+ C) [' hnova list3 R# x) N* E! o" o
Details on a specific instance
# ?5 A7 O$ @8 J- I/ Q; I8 W/ y1* O7 k3 f5 k6 S* j( d2 O
openstack server show <server id>$ F- f/ \$ L7 R+ P
2( P; s& D$ `# h
nova show <server id>
7 j+ T$ I7 P7 }/ v6 WRebuild an instance! s, a9 ~* {9 B: p! c# x! j
1! X* y4 K8 H) u( z1 j- W. R
openstack server rebuild --image <image-id> <server-id>
' o" \+ F! E" D# H2, Y5 P. Q, v  P: k
nova rebuild <server-id> <image-id>
! J9 O: _6 n7 lRebuild an instance with metadata6 ]( K. Q$ A" v+ a3 U1 }7 j- a
1- s/ g- v+ u/ H$ R( f
openstack server set --property <meta> <server-id>' X8 S1 w) C$ s# o( @
2
5 ?. Z* d# e: F' Bnova meta <server-id> set <meta>7 J8 j6 t4 z, _* V
3: n. R( j# G9 M! ]
nova rebuild --meta <meta> <server-id> <image-id>8 r' T; G, R( [: z8 n
Attach a port to an instance. s5 u- o; |! e- \3 P; ]
1
- N0 F1 W, t! O) \3 T# y  Unova interface-attach --port-id <port id> <instance id>  ^$ m) r) _. K& ~4 {
Create a instance from a availability zone/ Z  W3 v& p7 P5 ^5 k; J/ Z
1
1 u$ A5 F1 }* E2 t, x  A  q2 }nova boot --availability-zone nova:metal01:<ironic-id> --flavor <flavor-id> --image <img-id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> <name>
0 O* c) V; k9 {2, J5 {( x/ _0 L
openstack server create --availability-zone nova:metal01:<ironic-id> --flavor <flavor-id> --image <img-id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> <name>
, j5 h0 ?0 v6 m" qCreate a instance with meta property, sec group, fixed ip, ssh-key, k, Q& y6 G. a) I" E
1
, W5 f" J1 s8 T) ]openstack server create --image <image id> --flavor <flavor id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> --property <meta-data> --security-group <security group id> --key-name <keypair name> vmname
8 v" x& Q/ M8 I9 j3 Y. {Create a instance
& q+ M* H, H& p6 e4 P; A  u1  e+ K) T( H0 S# a0 E
openstack server create --image <image id> --flavor <flavor id> vmname$ o% ]! N, _5 h2 P$ _
Remove error state from instance " F$ g/ |5 o2 a( v1 o) w' t
1
; p4 B) k3 y1 V( N" Gnova reset-state --active <server-id>
" y: K; S+ Y- G! ]" Z& G' lChange the flavour (resize)* B1 }6 w" F! U: _( u, }
16 t) r) j4 H( A, ^! U- [
openstack server resize --flavor <flavor> <ID>( j+ E! m8 F: T' `  t. R
Neutron:
2 J- e; u' R+ A$ m5 m" w/ i6 RList of subnets and network ID
7 l. z2 L! a9 \1
% s; s0 V- v+ N- Yopenstack network list
8 ?/ a6 [( E  @' w1 v2
! ]3 p  o! P' f7 U4 t$ Dneutron net-list
* r1 ]+ Y6 l9 j1 }8 T9 kList of subnets, their IDs and allocation pools:
7 l+ }2 z: D7 Y$ _& B( i' Y1
1 c0 H2 d# n6 C: X' q3 R+ G! A" @/ dopenstack subnet list
9 d- }$ M2 h6 z7 S, }- w5 L' t9 i/ t2/ _: W  w8 U" c! @+ B# B1 _0 q
neutron subnet-list
. ~) Z* J8 g' ~$ T" K6 W: _0 K$ C8 ]List ports
+ U, F5 a6 ]4 r, z4 [. I4 x; G. _1
8 g( I/ |' |5 H( Q6 t! a7 ^openstack port list! r0 i  f! U* U# ]- f# z' t, |
2" Z! m! d) N, o* \. M
neutron port-list
) J* `! z# X( m2 s- P+ yCreate port
2 i% c. m6 b. m! X1
$ s, b: L9 F" {openstack port create --network <network id> --fixed-ip subnet=<subnet id>,ip-address=<ip-address>
( s1 C9 R/ C: z# C) r5 C0 n- G2
+ e& f0 X+ a0 |1 O7 X& |( G6 dneutron port-create --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <network id> <name>
. z- V7 t' `* x7 WUpdate or Set/Unset port
' ^4 r* E; q, u* Q18 n' V; l2 K; w9 f
neutron port-update --fixed-ip subnet_id=<subnet id>,ip_address=<ip-address> --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <port id>6 ^- v1 L( d8 Q6 `( h, E% ]
2
+ L& j' i7 w0 Q0 C. Ropenstack port set --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>' {+ F, U! T# X7 _  ?) j7 n
3
( r3 K  @' z) w+ `9 A) o% Z9 Bopenstack port unset --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>
) O% [2 f5 K- G* wGet details on a port
! w/ F! [- p  N6 r2 h2 Y" K1
. t$ e6 k& w0 L7 K" |4 Aopenstack port show <port id>  B$ K- a4 ^/ v2 Z% q+ B9 N3 N) O8 }
2$ R( @/ T- m' O9 i
neutron port-show <port id>
- _: X9 M8 \6 [Allowed address pairs - (Allows one port to add additional IP/MAC address pairs on that port to allow traffic that matches those specified values.)1 f) @) {8 i7 ]8 f
1& ^: {" X2 m+ \
neutron port-update <port-uuid> --allowed-address-pairs type=dict list=true ip_address='0.0.0.0/0'5 p0 X/ u, ], E# \' s
Glance:5 |/ {6 q  |( x, v$ \
List images
4 N- c. C1 [. @$ H# W1% q; L; U! E% }9 _$ O: P# W8 H
openstack image list: b/ ^% a0 Z$ ]7 O" x: g5 {* u
2, ~# v0 ?4 d( B
glance image-list
, d9 u( L/ z! O) i7 I. Y+ tGet details on an image2 G0 P2 N; H9 U" A. v( M1 g
12 u4 H* N* |' X7 s% W" ]# I  `! K
glance image-show <image id>& O6 ?( b& e( U, X
Upload a image
( ]# {0 \' _; E& \! c3 _& L18 O2 `0 B5 w7 f( z$ Z
openstack image create --disk-format qcow2 --container-format bare --public --file ./centos7.qcow2 centos7-image. L! K2 {1 p8 Z
Delete
! L& m% r9 g1 S) N$ Z0 n. d  j1! O9 x7 e" @- U5 q
openstack image delete <ID>: T- Q  C) t3 O8 q6 d
Download a image7 a: w5 \# O# p0 @
1
/ i) f! o2 O' n: s, s9 ~/ Uglance image-download <img-id> --file img.qcow2
6 r- W8 s1 [4 C3 ^Change state
, P2 D5 j0 z4 N$ n7 S) g4 j% d1
8 f3 i' l' S* d" C9 ^cinder reset-state --state in-use <id>& M; }3 h' b1 t( _
Other:
$ _. I# c0 e3 N0 L" g9 Y6 X$ S% _List flavors
7 M/ H/ j2 T$ W6 P, e: A7 K' b12 [5 K+ m/ ?1 J3 f3 _
openstack flavor list
4 B2 M) P% l! NList keypairs& p8 S1 t3 X6 Q+ z' V7 _+ R
1+ F9 z. F9 Y1 Y% @( M) y' S' |
openstack keypair list
* q' }& y8 N7 q. E7 x9 YList Security groups
- N  G5 @5 s. F. t: X1
+ j  A& o  L& k' D! n0 W- v7 q$ @openstack security group list! X8 p2 q" J0 P! p) u
Cinder0 U! @$ w4 Y9 v% s
1, e6 ~: j; W: b
openstack volume set --state error <id>
- h7 E7 Y5 R  @$ u- f+ e3 R" NStop a migraion
* u3 X( d$ C, H% p6 ?' n, F. M0 v# _, b+ G# m
Remove the active volume from the migration state
8 q( q% p6 B) k  s3 I
# L4 _: |& S+ h1. j+ ?& o0 ~1 W0 U- ^: n9 u
cinder reset-state <id> --reset-migration-status
9 d0 Q4 Z' G6 g4 m4 \4 _find the volume in the attaching state and remove it
& x3 F* c( t8 N( `4 a2 K9 _0 J# @, h3 K# X, l% V+ W8 }! T
1
7 J8 \8 C; F8 S0 Iopenstack volume list
4 H4 k- V% M, n( }1
, P2 b* o1 u& H8 N  Q  t$ h0 O8 Xcinder reset-state <id> --state error1 W, k# F) d! G. c4 j7 J3 Q4 V
1
5 e% S1 ]& L- a* V( ^% \cinder reset-state <id> --reset-migration-status
7 G3 c; X% H, Vopenstack volume delete <id>
9 O: z7 w9 e, ~* k8 B1
& }, z: a4 m( }  K3 w8 [openstack volume delete <id>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:20 , Processed in 0.016711 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表