找回密码
 注册
查看: 557|回复: 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']
. S6 F. V% }% V% p& I2 {! H: r2 v
( p6 X: p4 F7 R: u7 d0 _6 X. M# G* l' c! @' `& N
应该是ceph中pool池的权限问题
% |) X3 K8 a+ q9 [( O( G

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'; l0 `3 m6 \4 X* Q$ P. M' k
updated caps for client.nova

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-10-20 14:13:36 | 显示全部楼层
0
  X- g! w; H( a( y) D) K9 O! m4 j, n% u+ \0 r- q" d% `5 l

; P6 Q2 v* j( t" ~7 n  IAs noted in Openstack docs [1], rebuild is not supported for volume-based VMs.
8 \$ ~" k5 D6 @. {. W3 R, j( M7 r4 O6 V' Z/ q
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.
! H  x( a/ i1 [/ O. X' U0 C0 _% K' I
0 @3 ?0 x5 N* F, d9 c. U" pFor Ceph based backend, it would be something like7 [) j  |, B4 J3 D) C/ {
, @3 y" A; N. }2 k: l8 ?( l9 L
openstack volume show <...> => Get pool/path from rbd backend
4 J5 z9 e& j2 S) ]) t4 ~openstack image show <...> => Get pool/path from rbd backend
& |# U+ p. L: dopenstack server stop <VM> => Stop the VM# N& ~8 ~5 W) a

3 T  e" x5 o$ Y; irbd -p <POOL NAME> mv <VM VOLUME UUID>  <VM VOLUME UUID>.old
2 K, x2 D7 c4 x& K. k$ U0 f5 vrbd -p <POOL NAME> cp <IMAGE VOLUME UUID> <VM VOLUME UUID> 6 S- v5 ?. m. Y8 T7 \. ?7 g
Once the copy finishes, start the VM
) B' U& c. K: J2 X+ ~2 P
3 j6 c* @7 j' F+ u1 |* W- |) A' f0 wopenstack server start <VM>

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-10-20 14:57:20 | 显示全部楼层
Nova:& y/ w8 f3 q% p9 G9 K# G
List of instances" C5 O& e- U$ K$ u" H0 z$ Y+ X
1
7 y7 G$ W2 t" Z, L, @openstack server list5 N% p% ^1 p( L% \
27 O0 J4 j7 j, I/ \. k
nova list  I$ r( L: K. ^; H! R
Details on a specific instance* {/ ]4 d# [+ R) ^. q
1
/ y3 o, Y% b4 E/ N9 Xopenstack server show <server id>
0 c" z) @2 ]& E23 r5 \1 _4 Z( y/ e+ t7 X  s
nova show <server id>
3 F# L- Y/ c$ F) Z9 YRebuild an instance
2 C9 @' [; z% o' L( p! i1' {% o$ N: g* X. N8 A  c
openstack server rebuild --image <image-id> <server-id>' w/ R% d- e( c* F% W  [* i! c' I
2, s( I& V) \1 [" X( A2 X, n
nova rebuild <server-id> <image-id>* u  \$ K4 Q' R; H
Rebuild an instance with metadata
( T6 _  R# i5 A8 H  x1; k, V: v; ^5 [  K
openstack server set --property <meta> <server-id>+ F& E# ~8 C8 I- F
2: F, {0 ^6 o, |5 Z
nova meta <server-id> set <meta>( |! z- u) g; r7 U! H; G# J5 r) J
33 b  g4 @6 P3 b" K! Z5 u1 u
nova rebuild --meta <meta> <server-id> <image-id>8 m5 l, B5 R7 `, B$ u7 G
Attach a port to an instance
6 i6 p1 B3 c0 }' r# s# H% e1
: `0 V' v( Q+ s: |# i; v; @nova interface-attach --port-id <port id> <instance id>3 }$ \9 w) O# }
Create a instance from a availability zone
& r* J$ m9 [) p  Q! j1
1 S8 O$ }: }3 M5 y( y. mnova boot --availability-zone nova:metal01:<ironic-id> --flavor <flavor-id> --image <img-id> --nic net-id=<network id>,v4-fixed-ip=<ip-address> <name>
4 v* @, ?" e% w) K; T2
: _- C* m! Z. z; D$ w2 O9 a1 mopenstack 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>
0 l  `/ Z/ ^* V- K9 LCreate a instance with meta property, sec group, fixed ip, ssh-key( V+ z4 K8 w: H. e
1: G" r2 ~: L. a' f! e' D) w) C" \
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> vmname6 V: f: E8 f! [# {/ G
Create a instance7 t+ c( x! r; ?8 ~3 K+ Q
15 m1 W- X3 s' P3 }" b0 i6 B
openstack server create --image <image id> --flavor <flavor id> vmname' P2 M% `5 ]& s0 ~+ J$ T
Remove error state from instance : R4 \& G7 H% I: m, M# ]8 f; `
1" v7 z  D; e& R; v, y3 \; s7 w
nova reset-state --active <server-id>. d. A4 \6 _. U9 ?' [5 w7 O. t, ]7 }, A
Change the flavour (resize)2 [1 g7 L2 D0 {7 `
1- p9 H! c  c0 Z& |% J7 c( r
openstack server resize --flavor <flavor> <ID>* ]- V( X; H+ R* ^6 s$ G2 W5 o
Neutron:" K; l; k% h  H  }0 [5 f
List of subnets and network ID6 S" f; V3 e2 s5 ?# W& |
1- C' [% s+ j( g/ e2 D( _
openstack network list
1 c8 H3 E' V# P0 L) \' `- P/ f2
* n) S' |) E: B. ^9 g- dneutron net-list
; z8 Q+ H6 _8 Z' PList of subnets, their IDs and allocation pools:$ @5 h- `- p2 p# d
1
3 n8 I( A# D& L- a, |  nopenstack subnet list1 T- b* T+ t7 d0 S
2
% ]5 I# O) d" f0 e9 i3 @8 S3 kneutron subnet-list( m1 |! U0 V* x; \' u
List ports
9 s/ D  Q; t! N1 y, b1- D, T. P; ]0 U6 A5 H) n
openstack port list+ a& v" J% Z" s, k( B) \
2: s3 A# o7 K# n5 g+ m
neutron port-list
3 b$ D; g5 l/ p2 Q. {( dCreate port& q2 u( d& e$ S, R! F# O' z2 z7 ^
1
* E" H) c9 e+ T3 ]' n( T. Y2 gopenstack port create --network <network id> --fixed-ip subnet=<subnet id>,ip-address=<ip-address>' ]! f, n5 H. O: `5 W
2- m/ V' U: h: l& D; x+ C
neutron port-create --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <network id> <name>
  W, O. w& w9 \6 PUpdate or Set/Unset port/ K% E" z% I4 z% P7 a% l7 L
1. y  F6 p$ a  }1 d8 U" S. P
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>2 o% g8 C0 Y6 s' h! J$ ~
21 S& K9 X, `) S& o7 G6 [
openstack port set --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>6 ^$ ~1 U' n, l4 v, ^1 q0 H
3
- f- h, h, A" z- Gopenstack port unset --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>
" i9 W$ D! p% aGet details on a port* V$ B1 F2 J+ v! |) m7 m
1( r# V* B2 `- X9 S: D# ]: b
openstack port show <port id>
* [2 O) h* ^' g8 s  s3 V2, {5 `7 K( P! ?8 _
neutron port-show <port id>
6 d" r1 T/ n5 j$ d% g% O* J" uAllowed address pairs - (Allows one port to add additional IP/MAC address pairs on that port to allow traffic that matches those specified values.)9 Z' F2 f& g. w  Q: b3 u, S3 m: \) |
1! L& L# ]& z& d  p9 i2 F, y/ d
neutron port-update <port-uuid> --allowed-address-pairs type=dict list=true ip_address='0.0.0.0/0'
& z3 s% w2 O$ B9 M& r' t" bGlance:" ?2 u& l, K, D5 [9 k1 Z5 G. ?* Z6 D9 }" |
List images" W" y) ~  J/ @) [& t0 o* X
1
5 n- `' G* ]5 |+ i: b( o. ^$ Qopenstack image list) `$ \# {* _7 G( Z. M$ s
2
- v5 {3 m+ H: C: o, p4 gglance image-list
. a7 h* N1 X$ |0 _3 b$ GGet details on an image
& ^1 b5 p4 @. b) }4 a9 o8 o- j1
0 l" n4 R1 _1 q) U) f3 Vglance image-show <image id>
) N  A) C% D2 u5 g8 T& r" \( ?Upload a image* n2 m# w! k, S7 v8 ^- l
1
+ j. ]: a* d/ hopenstack image create --disk-format qcow2 --container-format bare --public --file ./centos7.qcow2 centos7-image" a' [) N0 B  E1 y1 P2 G
Delete! U& Z6 r+ u: M  Z% E3 A$ }* J/ T. @
1
7 o' U- b' E, A9 M. v% }5 F  Copenstack image delete <ID>
3 E  T' ^- a! {5 wDownload a image
  q8 y  k  l; L+ t# a1
) A" `9 ~' f( ?6 _5 ~+ Qglance image-download <img-id> --file img.qcow2* v8 e( J* E+ q# |5 L" ]# X
Change state0 n: B9 C: x" S+ f/ [! _1 E2 J( J
18 R! L6 }) i& |/ `
cinder reset-state --state in-use <id>
) N4 j! q$ @6 [6 m. @Other:  Z9 [% M8 z8 `; y5 D
List flavors8 Z) Z$ N6 ~% q
1
9 O) W. \7 j! ?6 d( Ropenstack flavor list
- u  V5 O/ e6 I0 J9 ^List keypairs9 q3 ?7 g7 h& Z1 N. [3 D& i* S
1
/ a/ K) F6 {- x# fopenstack keypair list
! U9 Y/ C% _: S& c" f- F2 E7 ^List Security groups# Y1 h/ T- n, F) |1 S
1
& V6 L% D+ L( s. a+ i: ]: {# |openstack security group list/ l& d" a; d1 u  R& {5 K1 k
Cinder; t- }1 ~4 z: X  L+ b" N
1
4 {2 Y5 W1 b+ e* w9 uopenstack volume set --state error <id>, S/ V. X# |2 |
Stop a migraion' p; u5 }9 L) H- o, o+ x

/ f  ], g8 [/ {/ a7 _, SRemove the active volume from the migration state
! ~$ q  V; H+ f: s$ J2 n2 g5 i. \# c) }+ j8 y7 i
1
+ R# q6 M) A7 f9 a( {8 Mcinder reset-state <id> --reset-migration-status
8 V& }% _) _/ e8 d* i1 yfind the volume in the attaching state and remove it3 l3 x0 i+ ^, P+ h  }
' @  B. @! @: |& s6 I5 u
1
4 D0 M) l/ k9 D* I8 k' c/ S' dopenstack volume list
# `1 w! k" E1 N) z! M1
/ s; |7 d! a' y. [+ R8 }6 j( W1 G0 kcinder reset-state <id> --state error
/ b$ f7 E1 C- B$ ~: m1; a& ], f$ ^& ~1 Y
cinder reset-state <id> --reset-migration-status* K6 t" q" Y/ e: _
openstack volume delete <id>
0 R: M2 Y# F; r: n& B7 E  z1
6 i9 P, s- D+ G; Q& ^openstack volume delete <id>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:14 , Processed in 0.030443 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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