找回密码
 注册
查看: 2743|回复: 0

oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.con

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-3-23 10:57:23 | 显示全部楼层 |阅读模式
同步数据库时报错:
1 l( j' {5 x- ], V$ E5 c' u+ {4 ]( ^, f
oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'% H: j9 A- q  N7 ^3 {% P. r% |

2 x) w3 r* `) t/ b# K/ w9 Fw完整的信息如下:
8 B5 n- y' |9 w4 Q/ u# su -s /bin/sh -c "glance-manage db_sync" glance
3 ?8 `. V+ f& z: L+ p% w$ zTraceback (most recent call last):1 a6 c% r# a7 e0 H5 k
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file
' g! B4 g, [& v/ S    parser.parse()
- P8 e) [4 X* @. I0 h: B# M: J- q  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse; A+ H. p, s# H# ^8 K$ G
    return super(ConfigParser, self).parse(f.readlines())* z) u/ R- w/ J, B$ R
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse
- g! V. u. v" o; f2 }4 b$ S+ C    self.error_unexpected_continuation(line)# ~" Z# y/ r- M" \3 }2 l; m: Z( H' D
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation$ K! M. l; Q: L- P3 J2 U9 {
    self.lineno, line)
5 m. L9 b6 O0 ?1 voslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
( k* g9 s" H$ v" x' v8 m9 B
9 f7 Q' v: A. e+ hDuring handling of the above exception, another exception occurred:) C4 w) h0 C: Z. U$ K  i2 p
# i0 d' a* k9 I% c  Q; y: a
Traceback (most recent call last):" x7 T" C" \4 h6 Y* e: R; R. w5 D
  File "/usr/bin/glance-manage", line 10, in <module>
) v: J% I8 h, Y' j    sys.exit(main())' R$ Q9 [; Q$ A) p0 p0 p
  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main( l& `* y! `8 ]- q
    config.parse_args(default_config_files=cfg_files)( d* ]  s$ ^0 ?
  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args
, v, Z# I7 {9 d" `8 z$ b" B    default_config_files=default_config_files)" t* b, R" S8 g9 o
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__
  c( W0 Q" {) `' z    else sys.argv[1:]): z1 ?% t' S8 A
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts
, k/ N/ Q" N" T! h4 d    return self._parse_config_files()5 l$ }1 O, L4 Q8 Y1 V8 {- F( @
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files" K# a/ L' S5 i- i8 {$ {6 Y
    ConfigParser._parse_file(config_file, namespace)$ _8 g4 E/ k  s' o, c+ k
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file
- k  Y' h6 p$ `2 J" U8 `) p: E6 I1 z; Z7 N    raise ConfigFileParseError(pe.filename, str(pe))$ `+ F- [9 ]. I3 M; T- }
oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
6 i" f" ^' {, z( n# o, k3 z4 B
4 d, N, {& b! @$ D6 |& V' W* Q  Z$ h3 n
su -s /bin/sh -c "glance-manage db_sync" glance
0 _8 w  z. I1 J/ m' d5 J# FTraceback (most recent call last):
4 v2 K6 q; `: A& U. C  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file/ b1 P; D+ D+ K( L) o- q
    parser.parse()3 @  D$ n1 i* J5 h5 K
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse, {7 C7 K' o4 l* I9 D  S
    return super(ConfigParser, self).parse(f.readlines())( Z% Q& w/ W5 _6 U* {* ^
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse3 B' G5 F$ }- x5 C2 p
    self.error_unexpected_continuation(line)" n. J: j, \8 Q/ i+ S; F! R$ ^2 m# b
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation
! \0 Y6 B$ Y2 a    self.lineno, line)2 y3 P: R, o" R) t  ~
oslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'! c. f+ p  j/ [: H

. ^6 Z, X% N/ y* Z; x3 P$ ZDuring handling of the above exception, another exception occurred:7 s' {% U7 x' @0 P7 y6 P

2 [% ^7 y8 z$ \2 s4 t' p5 |Traceback (most recent call last):
8 {* _6 @: ?5 X4 U# \+ w6 y/ y8 g/ a  File "/usr/bin/glance-manage", line 10, in <module>3 V. I3 j7 v8 `9 U6 A
    sys.exit(main())7 c, N) M: M4 D8 ?, G
  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main
1 e) K. X6 V0 L5 L6 q    config.parse_args(default_config_files=cfg_files)/ w) ~, `' ]! f( m
  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args
* H* L& j3 Q7 e7 |/ x# ^3 W& V    default_config_files=default_config_files)# [9 j$ Z/ ]% m7 ~. H9 {
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__) L  [& Y/ S! A/ k9 O. ?) a
    else sys.argv[1:]): w, _6 o' n: ]0 p5 q- }
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts2 u$ u+ I% p( E& F2 R! K4 v
    return self._parse_config_files(). M3 Q- f& d, Q$ G3 |$ {
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files
  f! ?3 u9 F. s8 [; }8 @. x    ConfigParser._parse_file(config_file, namespace)
# {  o1 M) T9 Q  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file( {1 X! V2 b3 s' o$ T
    raise ConfigFileParseError(pe.filename, str(pe))
  y% _) m- U1 }: `' C4 C, w! `oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
2 z( J& a* g5 R; _0 `/ K( Y5 o" H, T$ g# U, M% C
检查glance-api.conf文件,和glance-register.conf文件
/ _8 ]* [9 M9 {* v  z9 F2 `# S/ y$ D0 ~3 a$ g
[root@controller ~]# vim /etc/glance/glance-api.conf
, g- n: g. c) }
2 ~/ t# f8 G0 M9 Uvim /etc/glance/glance-registry.conf
6 X5 h7 T3 r5 [' W
+ z$ o' z3 ?$ [# o" g
7 R& D- T6 \' J* _6 U/ `[root@controller ~]# su -s /bin/sh -c "glance-manage db_sync" glance+ U$ p, o/ j& a( w3 W: R7 ]
INFO  [alembic.runtime.migration] Context impl MySQLImpl.& I3 l# v: u) w1 n$ ^
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
) w9 q" n! @* M! T  N) i4 ]! Q/usr/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1280, "Name 'alembic_version_pkc' ignored for PRIMARY key.")8 O2 O3 D* N: _% j
  result = self._query(query)
  j. V) ~- ?4 J9 UINFO  [alembic.runtime.migration] Running upgrade  -> liberty, liberty initial
7 x! m$ \  Z7 r/ t0 rINFO  [alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table0 x7 ^6 e: P2 n" ]  U9 w; T/ q
INFO  [alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server5 G% S3 g% ]- p5 ]$ V! W
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_expand01, add visibility to images" b2 Y' S( ?9 |/ ^# {7 J2 T
INFO  [alembic.runtime.migration] Running upgrade ocata_expand01 -> pike_expand01, empty expand for symmetry with pike_contract01: V% A" t( r5 e6 b5 l6 a9 c
INFO  [alembic.runtime.migration] Running upgrade pike_expand01 -> queens_expand01# _1 i# w) B3 I6 o% H6 m
INFO  [alembic.runtime.migration] Running upgrade queens_expand01 -> rocky_expand01, add os_hidden column to images table
2 l1 w# G2 i' U* l3 KINFO  [alembic.runtime.migration] Running upgrade rocky_expand01 -> rocky_expand02, add os_hash_algo and os_hash_value columns to images table
+ i  w0 m" ?% c; M* H0 kINFO  [alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01
" E; i4 K; W, bINFO  [alembic.runtime.migration] Running upgrade train_expand01 -> ussuri_expand01, empty expand for symmetry with ussuri_expand01
  S1 l. x0 t% YINFO  [alembic.runtime.migration] Context impl MySQLImpl.
6 w4 n5 w( s! I- ]4 YINFO  [alembic.runtime.migration] Will assume non-transactional DDL.8 j7 i$ U- v3 h. e  c4 o
Upgraded database to: ussuri_expand01, current revision(s): ussuri_expand01
$ R; R; a, n1 P" FINFO  [alembic.runtime.migration] Context impl MySQLImpl.
$ Y" j3 G% t5 w8 _' X9 OINFO  [alembic.runtime.migration] Will assume non-transactional DDL.0 l0 y% a) V& ~# Z
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
' ]' u$ L, r; I5 J, [- KINFO  [alembic.runtime.migration] Will assume non-transactional DDL.
7 G$ u4 W7 _1 h( h' S+ KDatabase migration is up to date. No migration needed.
! R4 V* W1 T% B! C" @& yINFO  [alembic.runtime.migration] Context impl MySQLImpl.
' L8 ?5 Q3 t+ ~: eINFO  [alembic.runtime.migration] Will assume non-transactional DDL.
# n! z" }3 Y& d( h1 s% r) k+ tINFO  [alembic.runtime.migration] Context impl MySQLImpl.
* p' }) m2 i" d) MINFO  [alembic.runtime.migration] Will assume non-transactional DDL.6 b. x( |) s0 i: c; q  {
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_contract01, remove is_public from images
: S/ i; B& y: _' t. I) ZINFO  [alembic.runtime.migration] Running upgrade ocata_contract01 -> pike_contract01, drop glare artifacts tables
! `3 H/ _. b+ \' `* VINFO  [alembic.runtime.migration] Running upgrade pike_contract01 -> queens_contract016 A  ]5 O! ^% e6 ?
INFO  [alembic.runtime.migration] Running upgrade queens_contract01 -> rocky_contract01) X4 t- G4 p9 g/ z3 ~1 V/ O
INFO  [alembic.runtime.migration] Running upgrade rocky_contract01 -> rocky_contract02
) [) t) O3 u- z' R( D& AINFO  [alembic.runtime.migration] Running upgrade rocky_contract02 -> train_contract011 A$ `" a& n. o1 g. Z& T4 X
INFO  [alembic.runtime.migration] Running upgrade train_contract01 -> ussuri_contract01
* m& c& Q1 y# E+ B% HINFO  [alembic.runtime.migration] Context impl MySQLImpl.
/ j: s% p; h3 M- @7 O6 t0 ^INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
# M$ _# w. s  SUpgraded database to: ussuri_contract01, current revision(s): ussuri_contract01
; M# I, O1 ^; B+ K* DINFO  [alembic.runtime.migration] Context impl MySQLImpl.
& ^9 Q0 }0 T2 G1 \& }- G5 Z  R+ GINFO  [alembic.runtime.migration] Will assume non-transactional DDL.6 g2 v5 U, X" D4 g  A
Database is synced successfully.+ ^$ V$ s2 N% p! M& [

1 S4 ]0 |& k4 Z. z( i2 _! K
  W& a5 t5 z  X; d/ R
8 |' E9 T& J4 x9 }" r, B* W  v" N2 e9 x2 k; X
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:24 , Processed in 0.017394 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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