易陆发现互联网技术论坛

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

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

[复制链接]
发表于 2021-3-23 10:57:23 | 显示全部楼层 |阅读模式

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

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

x
同步数据库时报错:# s3 K+ x5 q9 H# ~) E2 v/ h

3 y% r# ~  @- k) Toslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
: _2 V* Y3 X: p9 ~% x* U8 a8 X7 e. \$ U- k  `$ L$ J6 Y2 C
w完整的信息如下:
6 S8 `6 v! c; a0 l( J2 h# su -s /bin/sh -c "glance-manage db_sync" glance
5 U3 l3 l- R5 E& x6 k6 B* \) {7 oTraceback (most recent call last):
) y5 n; D/ [0 M# ?5 y; d- r' H: u+ c$ p  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file- t1 |3 W( d+ ?  c8 w
    parser.parse()
0 ?* a9 q( i9 G$ E# g& {  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse
& Y2 b4 A/ V- Z0 S, y/ g8 z' V9 ^    return super(ConfigParser, self).parse(f.readlines())" v+ W, r% Q1 N( d* q, @
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse8 ^( P* P% B6 x/ D/ R5 R% y) n
    self.error_unexpected_continuation(line)/ s# @$ q% j/ f6 B
  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation& v( o0 {" e9 |& ?
    self.lineno, line): n* k0 h9 i: S( h
oslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
$ x. A0 N- F' y9 _+ f8 p  C- ]$ |6 j" p3 |
During handling of the above exception, another exception occurred:8 S0 o$ t5 s/ y) K
. H" i9 ]5 H. x2 Z5 [
Traceback (most recent call last):
* }1 y" e$ B! `4 g+ M  File "/usr/bin/glance-manage", line 10, in <module>( ~3 _% w& L2 W& u
    sys.exit(main())
$ S! h! a6 Y3 q; K6 x' z8 ?  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main0 u( L( y* y; W3 I/ \0 u. }
    config.parse_args(default_config_files=cfg_files)" A6 f& |( u! S3 L
  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args5 D! k$ P; c( ^. e" R2 b
    default_config_files=default_config_files)* T, p5 M2 q1 @8 A3 m' _6 n
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__' w7 D: M  @+ e/ K. e
    else sys.argv[1:])
( j8 }+ @* C7 G  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts6 c, _4 U6 w# c$ p% ]# M. \: d
    return self._parse_config_files()  G2 N+ ~# M. Y. G$ t0 X
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files+ p! a9 I) p: T, }- p  [% A/ w% {
    ConfigParser._parse_file(config_file, namespace)! Q) t3 N4 l' O3 W7 e' r
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file5 w9 M, d4 O  g6 M% X9 b5 s; h1 S/ g
    raise ConfigFileParseError(pe.filename, str(pe))
" C: F9 Z0 |: e7 b, p' Y$ boslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
( j; ]( f) A) f+ O
2 O+ q. l) y- a8 H1 i
) ]7 k4 B) e1 dsu -s /bin/sh -c "glance-manage db_sync" glance
. m% b- n9 b+ v3 RTraceback (most recent call last):
( v  Q0 _: P  q2 r5 t; ?7 t" l7 F  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file6 P8 {1 }: ~# o) i
    parser.parse()( H/ C% ]3 Z  U, U: G
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse
. @; g! ?3 z+ Y    return super(ConfigParser, self).parse(f.readlines())
" }: r$ z2 o+ a+ l; x- K. ~: h* D  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse
: k3 I$ W6 u& m: s9 w    self.error_unexpected_continuation(line)
( i) _* m! |6 ^, ^3 w1 M% A  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation
9 r/ o% |5 }) A3 O* y    self.lineno, line)2 v2 z- U% M: x5 x6 T6 o% ?5 ^4 n; z( ^
oslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
. w" c, b1 W8 F6 S- G9 v* j8 B  G" Q2 h/ X: U% e
During handling of the above exception, another exception occurred:) i0 S$ X% x) n2 a* h2 a  y

) q4 X2 }  b$ `Traceback (most recent call last):1 c6 E' X) R1 G7 m1 ]; A
  File "/usr/bin/glance-manage", line 10, in <module>3 [3 }$ \' E7 C
    sys.exit(main())3 }( j9 ~# ]+ U/ T, ~
  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main3 H3 ]0 X3 I8 P, j: z2 f4 @. n
    config.parse_args(default_config_files=cfg_files)
, K0 P# _* S, n% x  f2 j  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args
5 t+ @8 ^9 U! g    default_config_files=default_config_files)' g6 A6 Y! i2 m
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__
/ M3 z! U5 g* B9 O/ j( y) [9 I    else sys.argv[1:])9 M. P/ k9 A4 v  }+ w- x
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts
- L+ U1 |5 `1 W4 {; |, a# k9 f    return self._parse_config_files()
" v4 ^; e4 t5 j  L% P% k: P( b! G4 E  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files
  Q& Q6 f) C, s7 Y; P    ConfigParser._parse_file(config_file, namespace)1 [0 r+ B0 z9 U& }) n! ]
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file# F5 c' w5 @! k4 P" x7 ?
    raise ConfigFileParseError(pe.filename, str(pe))) I8 ~6 W/ ?& B4 ]& n& f, r( z
oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
# J, X# Q# |1 e% J+ y; U/ {* T8 q& p* v
检查glance-api.conf文件,和glance-register.conf文件0 z8 Z, x$ k3 [' c
* M& F7 h" N% [& r+ h4 {* K$ G
[root@controller ~]# vim /etc/glance/glance-api.conf* j. E& s8 w& J7 s# a0 t' w2 u
- p5 _$ f+ r7 @3 t% j" V
vim /etc/glance/glance-registry.conf
5 a, J, T: T% z" ]8 o/ M
* j: k3 N8 b9 k1 T
* ^+ m/ y2 L) h2 W: a[root@controller ~]# su -s /bin/sh -c "glance-manage db_sync" glance
; s5 b4 j9 |4 KINFO  [alembic.runtime.migration] Context impl MySQLImpl.
: H; ?5 ]% h# g: n1 e; k' eINFO  [alembic.runtime.migration] Will assume non-transactional DDL.1 w3 b/ P4 j1 D) W/ v8 c' a6 d
/usr/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1280, "Name 'alembic_version_pkc' ignored for PRIMARY key.")5 m+ B, z7 T- H/ k9 \1 I) y9 r/ {
  result = self._query(query)+ e; |, \8 p) C% X  k9 q: }
INFO  [alembic.runtime.migration] Running upgrade  -> liberty, liberty initial: T% C3 l, {  {" G
INFO  [alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table3 E/ t; f7 y- k$ [2 L
INFO  [alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server  @6 q7 J7 Q2 [% `  Y* \& B
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_expand01, add visibility to images# F( `8 y% G/ Y
INFO  [alembic.runtime.migration] Running upgrade ocata_expand01 -> pike_expand01, empty expand for symmetry with pike_contract015 x: M3 G: M0 q
INFO  [alembic.runtime.migration] Running upgrade pike_expand01 -> queens_expand01
+ |9 Q/ l4 e7 B+ ?* o9 N1 e/ y9 {8 ~7 SINFO  [alembic.runtime.migration] Running upgrade queens_expand01 -> rocky_expand01, add os_hidden column to images table, l2 @8 X( ~  g2 g. {- J- C/ i
INFO  [alembic.runtime.migration] Running upgrade rocky_expand01 -> rocky_expand02, add os_hash_algo and os_hash_value columns to images table
( |# {0 x) k8 h4 L  W. m( O( EINFO  [alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01" M+ P) v& v4 E7 n. T1 k5 |4 o
INFO  [alembic.runtime.migration] Running upgrade train_expand01 -> ussuri_expand01, empty expand for symmetry with ussuri_expand01* b; s  G3 b: n' l
INFO  [alembic.runtime.migration] Context impl MySQLImpl.# q2 `7 P. D1 K8 M+ [
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.7 A, H% [, _3 ]+ ~. }7 R" x) _4 g* O
Upgraded database to: ussuri_expand01, current revision(s): ussuri_expand01
/ u3 P+ _! D" z/ N* n  cINFO  [alembic.runtime.migration] Context impl MySQLImpl.
2 X- s; n8 d3 y6 z8 ~- BINFO  [alembic.runtime.migration] Will assume non-transactional DDL.$ c* e8 ~" I3 F- g
INFO  [alembic.runtime.migration] Context impl MySQLImpl.& V  ~: K. j4 }, Q9 n
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.$ B1 N  D5 F/ t
Database migration is up to date. No migration needed.
  _3 ?1 i1 g8 F8 u/ RINFO  [alembic.runtime.migration] Context impl MySQLImpl.
* {; d3 V- I9 C7 J$ A- `  OINFO  [alembic.runtime.migration] Will assume non-transactional DDL.
* u: U0 l% g: P9 AINFO  [alembic.runtime.migration] Context impl MySQLImpl.
8 u% `3 C. l& Q9 h3 o# _! X' oINFO  [alembic.runtime.migration] Will assume non-transactional DDL.
1 U2 p9 }/ d1 d; L' e: }INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_contract01, remove is_public from images4 c, ]! ]( M2 w& p
INFO  [alembic.runtime.migration] Running upgrade ocata_contract01 -> pike_contract01, drop glare artifacts tables
; ^5 T' d& d: J) K" z- B) rINFO  [alembic.runtime.migration] Running upgrade pike_contract01 -> queens_contract01
: |) x+ s+ D. L( A/ @! kINFO  [alembic.runtime.migration] Running upgrade queens_contract01 -> rocky_contract01( y  K( C2 G- ?+ C3 |8 w
INFO  [alembic.runtime.migration] Running upgrade rocky_contract01 -> rocky_contract027 |$ n+ S% h8 R& b
INFO  [alembic.runtime.migration] Running upgrade rocky_contract02 -> train_contract01
7 T5 w8 }/ q: e  lINFO  [alembic.runtime.migration] Running upgrade train_contract01 -> ussuri_contract01: b* C' v5 ~7 b$ X9 \. M
INFO  [alembic.runtime.migration] Context impl MySQLImpl.( m1 _  z/ h6 T9 c' V) n% B
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.# k( a7 T) o3 x7 |6 A: @; H$ C
Upgraded database to: ussuri_contract01, current revision(s): ussuri_contract01
- y# L% j+ s) pINFO  [alembic.runtime.migration] Context impl MySQLImpl.
% S$ B/ J: V! v" b7 L& x2 MINFO  [alembic.runtime.migration] Will assume non-transactional DDL.) |5 u. n! Y; y8 r7 R; v. e3 j
Database is synced successfully.$ w) H+ {2 z! n6 x) R

* U8 K6 C$ `! {/ s6 f6 g# l
- k; b5 m  |) N$ W6 m  k. j7 \, c9 ?8 |9 G4 f8 D

+ ~6 t5 L: O9 n; P$ ~$ l* z: x
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:18 , Processed in 0.077498 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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