将设为首页浏览此站
开启辅助访问 天气与日历 收藏本站联系我们切换到窄版

易陆发现论坛

 找回密码
 开始注册
查看: 56|回复: 3
收起左侧

ERROR nova.scheduler.utils qemu unexpectedly closed the monitor

[复制链接]
发表于 2022-10-20 13:44:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?开始注册

x
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']
7 C- h' r, E' d; l
/ f& o8 [, U& @- D+ `! p6 b. W5 K7 _3 H, _% I* i& R
应该是ceph中pool池的权限问题
. {/ ]3 K/ x" h/ X9 {
 楼主| 发表于 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'
4 _& G: i+ s7 n2 Z% q8 _# Rupdated caps for client.nova
 楼主| 发表于 2022-10-20 14:13:36 | 显示全部楼层
0/ }4 a! A* G$ x8 u+ J( u
5 [. U% A/ c+ d+ k

. Q7 l! j( B1 \0 a7 h4 kAs noted in Openstack docs [1], rebuild is not supported for volume-based VMs.( D& J% [+ k9 h8 g
$ V' V: u: l4 M# o& ^) R
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.
& q  _5 H/ c3 b7 N$ @) S, v1 O# W* d7 e0 H- G; m' c, f
For Ceph based backend, it would be something like5 y, g5 e3 r8 }" a# ^9 {) a
0 E2 m) f" r+ y0 }
openstack volume show <...> => Get pool/path from rbd backend* V3 u$ ~) s4 N' }& t
openstack image show <...> => Get pool/path from rbd backend
) b) |) \% r1 v0 R) wopenstack server stop <VM> => Stop the VM: W4 |6 t1 u- V$ K: E, |

% u$ G/ t# b7 N5 U0 srbd -p <POOL NAME> mv <VM VOLUME UUID>  <VM VOLUME UUID>.old  m2 L& M; l8 z/ A& T9 ?& d
rbd -p <POOL NAME> cp <IMAGE VOLUME UUID> <VM VOLUME UUID>
4 Y3 B4 e1 H# o7 w" `+ q! S0 HOnce the copy finishes, start the VM- {0 L4 G6 b) G

/ A5 b: Z) U  t* }2 O, \8 [# yopenstack server start <VM>
 楼主| 发表于 2022-10-20 14:57:20 | 显示全部楼层
Nova:. i# z) ?$ E! }
List of instances
% q* `6 {) l+ V; y0 f7 G( M' p0 \' B1
& n3 t; f- p, j) v, I+ i0 N' jopenstack server list. p, x) s  f* z. N3 F. O7 b, {  j' k
2: d8 d, @( j% x% ]8 h: v: i5 [7 D
nova list  I; K5 }3 k: v/ C. y% t: E3 s- V$ {
Details on a specific instance
7 v7 p: l3 h6 O7 h1% Z0 l  n; P. T( A
openstack server show <server id>
9 F( s2 L, p" A8 T0 @0 [+ Z2
: ~( T& X& n) m* O' T2 i; W! }! y6 \nova show <server id>- g9 l4 H' I' j0 Y* F
Rebuild an instance* J7 R! l9 P' E6 Y" T$ F9 ?
1  c# ^! w4 R- Y) h1 X
openstack server rebuild --image <image-id> <server-id>
1 R; D  V  A. H2
( ]" g6 H% V, Q+ Anova rebuild <server-id> <image-id>, F" n9 E$ e6 N0 w# N7 g, x% l. j+ K" k
Rebuild an instance with metadata
0 u' J# [9 ~  R1 |9 |8 ~5 D! n8 ]  e. ]15 V4 k6 n3 O, h  S' c
openstack server set --property <meta> <server-id>4 f; g6 T) }+ i" j
23 ^6 ^3 p5 l: u: o
nova meta <server-id> set <meta>
: h" a, I: }& Z1 ^3
3 L# d6 A. Q* p, bnova rebuild --meta <meta> <server-id> <image-id>% K7 K- X" {* y0 k% D- O& |
Attach a port to an instance5 `5 u+ \9 X  W$ d0 c
10 p0 D$ H  _% n
nova interface-attach --port-id <port id> <instance id>: F7 K! u* y8 L& L8 Y
Create a instance from a availability zone
% _& `3 V: v% m16 F; |4 q4 B: q0 O  f8 I6 m) M( V
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>
. i/ P. y3 r, G& ~. Q; D8 e2# W- U1 ^" {% i/ Q( u. H1 \
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>; w  O2 |- o# A# m) R
Create a instance with meta property, sec group, fixed ip, ssh-key
3 j; f( a" c$ _1 P, P! ?1" d) }3 P( f2 l3 g
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$ ~( o( W8 g3 ~: o9 H/ x0 X& U3 }
Create a instance
% }' m! J* w) W5 H- R3 J19 c4 c/ @# D+ g5 K! z$ d1 D$ }
openstack server create --image <image id> --flavor <flavor id> vmname$ r( F' o6 B9 R# _/ q' f; y6 a
Remove error state from instance % v" b8 }6 z* U% P2 o" t' c
1
; y2 m; w1 u% w# V) b/ jnova reset-state --active <server-id>
8 I8 x- b. A. p9 }6 Z; wChange the flavour (resize)" g: C5 |* o) T2 x; u
1
, ?  S: L6 j+ _; R# _; Topenstack server resize --flavor <flavor> <ID>
0 ]4 Y+ w- v+ dNeutron:
  ?" l% y. f9 OList of subnets and network ID
$ ~% d9 M0 }" M- D# C& [1
  \( h1 j& D- _  U  Iopenstack network list
- ?& s; ^" {+ Y0 `; u6 s2
. H" I- I# B3 ^neutron net-list
; L6 f& E9 E1 l" l5 M7 \$ r! nList of subnets, their IDs and allocation pools:$ ~  ]: l0 U: s9 G+ y
1& g5 C- q3 k/ Z8 V$ i% m% u' M
openstack subnet list
6 t& X/ N, H5 x9 L; S2( K. r8 L& g& k8 ]/ R- G# n# u& g
neutron subnet-list. i0 q3 M6 e; W$ m$ ?1 g* e6 |& k
List ports
, m% @: B' C8 B5 S/ S5 N1. V/ l5 `4 ~  D  d* V: M
openstack port list
* `6 y* {5 {2 H+ l% ^. p! g2, v- a& E1 _# W* O% g  Z' ^
neutron port-list
4 ], i$ h- J% x* C7 H5 O( DCreate port
& |4 n# v) F7 q) ?+ g4 }16 i, h- c6 d1 V& N& {  @+ r" k. B
openstack port create --network <network id> --fixed-ip subnet=<subnet id>,ip-address=<ip-address>" X( _# C& m9 K& c
2
: m3 u) b2 T  {neutron port-create --fixed-ip subnet_id=<subnet id>,ip_address=<X.X.X.X> <network id> <name>
& G+ r  L' }$ h$ |  G6 vUpdate or Set/Unset port
7 f5 {  t4 T8 @8 W. l18 c6 B6 u. L! d4 f- H2 O! Q
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>
  c+ s$ d, K  W0 L' P/ ~  @& }1 W2
- Z) ~- b! ]# I; P6 ], b3 O2 a( dopenstack port set --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>
/ U8 |: W" Q: X* X  l9 e3
, }/ D. x# H4 W; H( Lopenstack port unset --fixed-ip subnet=<subnet>,ip-address=<ip-address> <port id>) G/ ?3 ?) h- S9 c/ _0 t% c
Get details on a port
  R$ @# v+ ~/ B1
3 s2 i& g  X+ q9 |" }9 H) S0 Nopenstack port show <port id>; d# C; @1 X- x/ e3 A' ]
2
9 Y% C  M: i2 zneutron port-show <port id>
' N/ h8 o+ }$ @) u( p% PAllowed address pairs - (Allows one port to add additional IP/MAC address pairs on that port to allow traffic that matches those specified values.)# _6 A( R% A& v7 M( f* c
1: Q2 c: g5 D+ P) U- \; P$ r: |
neutron port-update <port-uuid> --allowed-address-pairs type=dict list=true ip_address='0.0.0.0/0'
' T$ {5 b8 i' Z5 ~' {% H8 |. CGlance:9 i6 [( m# m  M& e
List images6 f* S+ i9 Y* k
1& Y$ d' b1 v8 S, ~! D- R- E
openstack image list
! V: V, O9 w. p  i2
) U+ V: P+ s( a  a, ]# P2 Wglance image-list0 J  e7 y' |& L& A
Get details on an image; U/ `0 g& B* T+ ^6 r: S
1
: f4 Y1 i! H( D1 w; U$ C! ^glance image-show <image id>
! G$ u. B1 B, NUpload a image& b/ C0 d; f. ~8 u4 R% j
1  [% ^4 {3 X4 N1 a9 g8 I
openstack image create --disk-format qcow2 --container-format bare --public --file ./centos7.qcow2 centos7-image+ |" U' C/ {1 H, V& v& r
Delete
' X) d, n0 p& F  {2 Q13 S& E8 o) }  E1 I9 m" k
openstack image delete <ID>
/ o" _2 ^  D( g/ S( |! f( oDownload a image
7 l$ @! x. X2 Z11 l$ U; _! ^! e/ Y6 P
glance image-download <img-id> --file img.qcow2
: l' l& L5 |/ ?! ~2 c  _, S% hChange state% N0 W8 F" o3 k& t
10 Q6 ~% G7 A& T% x" }( G- A
cinder reset-state --state in-use <id>5 |9 A1 y. z! n: \/ `4 g
Other:
& t, e3 ]0 p9 |" r5 R1 n" Q% q+ yList flavors% z$ U5 R9 ^# H) y5 E2 T
1
: T4 I" V) l6 M+ dopenstack flavor list
, K$ k/ d4 Y' p$ d3 sList keypairs
# ^: ?  M1 O* G3 s" c5 n: I1
9 N% b( A+ T; ^openstack keypair list% _& V7 U6 e2 `
List Security groups4 B3 K9 g; C2 V' q" q6 H
1; s3 P9 k6 ?8 y; S9 _3 T
openstack security group list! _0 t5 h/ L& E% X
Cinder! O. O' y3 r$ G) `- S4 Z' T
1
( ~, D( f+ `- A" R; g* topenstack volume set --state error <id>
; W# }" s; x5 X7 ?Stop a migraion, R$ }% s0 s$ V7 l9 c

3 J" ?" ^4 k  ~5 h# O2 ~Remove the active volume from the migration state( |1 m5 A: q4 S% _6 H, `
5 b; Z& {* n- @- |! \
1
( ~4 K  r# t+ E/ ^, h& `cinder reset-state <id> --reset-migration-status6 d( O7 L% C8 d  a3 C/ z
find the volume in the attaching state and remove it
+ N, y8 P7 M* V5 V4 ?0 f
5 S+ T2 E, u9 j% p7 ?1
. D! d; j% k9 N0 B; Z) ]openstack volume list
9 `' ^0 H9 C! g12 M) q7 }! \# ^& ^
cinder reset-state <id> --state error
! D, ^) s2 j5 H9 J/ X14 r$ ]7 \0 Y. Z2 w9 L7 f% i
cinder reset-state <id> --reset-migration-status5 L% ?# M, n7 `) Z/ e
openstack volume delete <id>
( {' I8 o4 q3 v2 L1 ~1
8 R( ~! v. ?9 F" e/ C" k, n* t9 ^$ oopenstack volume delete <id>
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

如有购买积分卡请联系497906712

QQ|返回首页|Archiver|手机版|小黑屋|易陆发现 点击这里给我发消息

GMT+8, 2022-12-10 11:02 , Processed in 0.043555 second(s), 22 queries .

Powered by LR.LINUX.cloud bbs168x X3.2 Licensed

© 2012-2022 Comsenz Inc.

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