易陆发现互联网技术论坛

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

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

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

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

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

x
同步数据库时报错:
( o: q- m' {" \$ D7 Z  `0 @7 u
oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
7 ~  x( X, B8 ^8 y$ p+ e2 i- w8 L+ w8 N' j
w完整的信息如下:' s- C, K7 f' Z9 t8 Z
# su -s /bin/sh -c "glance-manage db_sync" glance' L3 G& p! }) N- D9 c
Traceback (most recent call last):
, }1 {1 j: `6 j: N0 }$ o. e  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file
5 v5 v+ v5 W" w; |: V: U    parser.parse()# c9 y" K+ @+ d! C0 J6 X* H
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse3 s0 X0 m% h. G' Q
    return super(ConfigParser, self).parse(f.readlines())
# _4 y% s; i; O  |2 V" g3 e8 J  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse
0 Y: w4 u8 O9 A    self.error_unexpected_continuation(line)
: a: {8 Z% y3 p6 E. c9 y3 r7 H  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation4 x% c2 v' z# u! \) d9 P
    self.lineno, line)5 t3 l) ]6 y1 z3 c0 {7 f
oslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'6 x9 Y+ O0 A5 v# {, Q

3 t) E% N" H' H8 L# d6 R5 B) H1 PDuring handling of the above exception, another exception occurred:
' g5 t9 B# @+ x! }' ?+ c8 P( g& X5 g& c
Traceback (most recent call last):. H1 B% m* r/ ?( \% L
  File "/usr/bin/glance-manage", line 10, in <module>  H# j7 ]0 n5 W/ T; l
    sys.exit(main())
0 k; L0 y" T7 H* j3 p9 K' ^- Q  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main
& e. M. V3 ~9 K    config.parse_args(default_config_files=cfg_files)! y! T' X$ H$ p, Q
  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args
1 l5 i  Y# a$ D' J$ b: S    default_config_files=default_config_files)
6 ~3 V+ o" k+ N- y9 U5 _! L  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__- C* _  X8 u5 v# _! `7 G# f6 _
    else sys.argv[1:])" v' x: Z0 |9 w. J% ]; k( x0 ]
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts
, q0 l9 a3 p8 W- m0 P( j& E9 }    return self._parse_config_files(); N2 \1 r9 l( h! q) L6 ?
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files. K: ?- A  C' k) Q, B! T
    ConfigParser._parse_file(config_file, namespace)' K5 q/ H* g7 s% a# f" c
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file
9 [' V0 y; A( m2 c3 u, {! _6 @    raise ConfigFileParseError(pe.filename, str(pe))
2 u0 w3 O: X/ |  _oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'
8 i" x. p/ g8 x) T! T0 \+ z. q
: M: B+ W: h$ w5 F! `; G, a" Y2 j3 A5 l+ f4 B2 N7 A
su -s /bin/sh -c "glance-manage db_sync" glance
! i+ z. W; l; VTraceback (most recent call last):
7 q6 a2 i$ N& H0 _6 y1 p  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1608, in _parse_file
* {. Z- L% J& ~% L6 n: O% _    parser.parse()$ O" @* ?* z* h! d" n
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1563, in parse
+ d# L9 W2 ~! `# H    return super(ConfigParser, self).parse(f.readlines())
$ R2 s: \) P% f9 i) H  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 74, in parse2 r) [/ E9 V! F+ B; h
    self.error_unexpected_continuation(line)
5 p, j6 L* U2 U% m9 T# j5 J/ s4 n  File "/usr/lib/python3.6/site-packages/oslo_config/iniparser.py", line 120, in error_unexpected_continuation4 Y3 I7 F' V1 n5 u
    self.lineno, line)- B$ x1 W& s9 K- G+ a; S! O
oslo_config.cfg.ParseError: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'4 G8 H% u- z! K" k5 N7 `
2 p7 @* j- [% y' G0 p1 I
During handling of the above exception, another exception occurred:
/ a3 k4 K; _/ n+ ]$ M, ~% P* O  \
Traceback (most recent call last):
& G7 j! O* g8 d: k  File "/usr/bin/glance-manage", line 10, in <module>
5 F8 z2 _- W$ v& Z6 l* K3 C" B    sys.exit(main())
; j- R* Y* b9 W+ ]5 q7 P) h  File "/usr/lib/python3.6/site-packages/glance/cmd/manage.py", line 555, in main
; `6 F- f- ?4 Z. `+ `    config.parse_args(default_config_files=cfg_files)0 P: v4 ?" G- U0 C# B  ?, M3 v2 `
  File "/usr/lib/python3.6/site-packages/glance/common/config.py", line 718, in parse_args6 L5 a; M, `- U( ?8 |: W1 X
    default_config_files=default_config_files)8 A  u+ Z( c( \" V8 s% d/ K
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2136, in __call__
% n* A: V9 z3 y+ t    else sys.argv[1:])
& R8 L6 P+ {) C# W/ E  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2901, in _parse_cli_opts& T  h" W' X* Q8 q
    return self._parse_config_files()
# v& v" r4 b1 [$ x8 {4 L  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 2918, in _parse_config_files( W% X% Z" R* R( X, z
    ConfigParser._parse_file(config_file, namespace)! }& X1 C4 h* G4 e2 q6 X7 J
  File "/usr/lib/python3.6/site-packages/oslo_config/cfg.py", line 1610, in _parse_file- U% R6 @+ N. j# L
    raise ConfigFileParseError(pe.filename, str(pe))  L/ `. g$ l* }: C2 G( ~6 {9 U' `
oslo_config.cfg.ConfigFileParseError: Failed to parse /etc/glance/glance-api.conf: at /etc/glance/glance-api.conf:1, Unexpected continuation line: ' [DEFAULT]'1 H% v0 Q' b% p; _- v) N

2 R2 v6 y& f0 u/ E检查glance-api.conf文件,和glance-register.conf文件* b8 `1 f# h6 {+ y5 z6 t9 S3 u
. J% r8 G( K: V9 y8 a+ D
[root@controller ~]# vim /etc/glance/glance-api.conf
. ~/ [# C6 L* `; r8 v0 X% S
+ q7 C" F/ f  O/ svim /etc/glance/glance-registry.conf5 l3 |1 G9 s$ V' i) X( }7 a

- v* |; H7 K2 G) [1 G2 {9 W
3 v# t4 q0 J1 l* n, ?# g[root@controller ~]# su -s /bin/sh -c "glance-manage db_sync" glance
& G2 a; Y  s- E+ E2 @4 S) XINFO  [alembic.runtime.migration] Context impl MySQLImpl.$ B! Y' j& p/ p! J
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.) j& |% Q! e/ \8 c
/usr/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1280, "Name 'alembic_version_pkc' ignored for PRIMARY key.")
  }( Z& |6 f# ~3 F# |3 i4 a  result = self._query(query)
/ ?: U! j. a# [7 U4 c  m! F; gINFO  [alembic.runtime.migration] Running upgrade  -> liberty, liberty initial  m& w( K* h' l( T
INFO  [alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table. g5 X* B" |1 L( N' n
INFO  [alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server" a& ~+ a5 q) l: [
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_expand01, add visibility to images
% @( m$ @. Z9 y+ _+ ?9 cINFO  [alembic.runtime.migration] Running upgrade ocata_expand01 -> pike_expand01, empty expand for symmetry with pike_contract01
' ^/ S9 l3 L7 w# _INFO  [alembic.runtime.migration] Running upgrade pike_expand01 -> queens_expand01
  g% D& l& N/ R  x; z- hINFO  [alembic.runtime.migration] Running upgrade queens_expand01 -> rocky_expand01, add os_hidden column to images table
/ |6 y* h5 L* i5 o8 _) D) gINFO  [alembic.runtime.migration] Running upgrade rocky_expand01 -> rocky_expand02, add os_hash_algo and os_hash_value columns to images table9 p! Y4 b: @. E0 U4 e9 h, Q4 M
INFO  [alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01
9 U# Y% d( ?6 x0 z. |8 A+ lINFO  [alembic.runtime.migration] Running upgrade train_expand01 -> ussuri_expand01, empty expand for symmetry with ussuri_expand015 w9 S1 S% @( e& c
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
% C" o1 s2 Y1 F7 H, TINFO  [alembic.runtime.migration] Will assume non-transactional DDL.
0 Q% y& e, l( w* |- fUpgraded database to: ussuri_expand01, current revision(s): ussuri_expand01
4 n- d! G2 g. y. k" mINFO  [alembic.runtime.migration] Context impl MySQLImpl.+ [* b  ~% z9 I  B% R1 g* w
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.; j  t1 p) E! f' o  r
INFO  [alembic.runtime.migration] Context impl MySQLImpl.) T6 z2 z7 T, B! @: v# }) R& `' j
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.4 O1 S% M: O4 q4 S+ |" J; g
Database migration is up to date. No migration needed.% D3 P# w5 s+ r7 `
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
& j( L7 ~( [! x  GINFO  [alembic.runtime.migration] Will assume non-transactional DDL./ j! }+ _+ ?4 M  A& L
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
4 B, ?& r7 c6 {6 JINFO  [alembic.runtime.migration] Will assume non-transactional DDL.2 U8 l* a5 x  M2 k
INFO  [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_contract01, remove is_public from images+ t* R3 _% x9 G4 _
INFO  [alembic.runtime.migration] Running upgrade ocata_contract01 -> pike_contract01, drop glare artifacts tables) `8 t7 J! o# X  F. r+ m. B' o
INFO  [alembic.runtime.migration] Running upgrade pike_contract01 -> queens_contract01
2 o  |( p; y! Z5 r, _9 H$ B. xINFO  [alembic.runtime.migration] Running upgrade queens_contract01 -> rocky_contract01
, _  Y( G6 n! mINFO  [alembic.runtime.migration] Running upgrade rocky_contract01 -> rocky_contract021 o/ `5 [# q& x+ L! g- o
INFO  [alembic.runtime.migration] Running upgrade rocky_contract02 -> train_contract01
$ Q' l* Q% a) y4 L+ b! q( F7 TINFO  [alembic.runtime.migration] Running upgrade train_contract01 -> ussuri_contract01  I. C- E# U- ^/ v0 S
INFO  [alembic.runtime.migration] Context impl MySQLImpl.  e5 a& Y. \2 U. L% }
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
+ w% Z0 p0 D1 v8 J2 T, u& t3 K; XUpgraded database to: ussuri_contract01, current revision(s): ussuri_contract01
0 I, T9 }. I' T& Z- J4 J  hINFO  [alembic.runtime.migration] Context impl MySQLImpl.
' T5 b4 Z9 R( G1 \INFO  [alembic.runtime.migration] Will assume non-transactional DDL.$ `  \* [  j& D1 k0 L! K
Database is synced successfully.
4 x4 l: R" G4 N. ]% m- w) b
/ ^. n' v8 [- C% v  u) ^: [
6 z$ Q- H* P, t' m: x) u$ `- \: R
- q0 d. T: j4 V8 V# A
6 F2 e( B7 @+ J0 N% B1 [
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 21:01 , Processed in 0.040895 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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