找回密码
 注册
查看: 2959|回复: 2

glance image-list : Support for it is now deprecated in cryptography, and will b

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-8-13 17:25:39 | 显示全部楼层 |阅读模式
[root@controller1 ~]# glance  image-list: d$ t% x8 {' Y% P
/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.0 k, G! q+ P% p# B+ m
  from cryptography import utils, x509
5 r, {' J* S5 H  iinvalid syntax (_pmap.py, line 98)
, Y0 h- g/ R3 x! q1 t& e9 k" N. j7 a% ]6 e; ~
[root@controller1 src]# glance image-list. ^. y* P" L# o" m( N6 u& C
/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release." @9 i5 l2 l6 ^  n8 o. f
  from cryptography import utils, x509
+ f' c$ j. p2 O: I# Q: minvalid syntax (_pmap.py, line 98), u" T! B% D8 _; \2 {: k. u1 c/ U% ]
[root@controller1 src]# vim /usr/lib/python2.7/site-packages/OpenSSL/crypto.py6 [! i$ ?, ^8 l3 |0 j

* I# r. W: u" i* c" a; W- {; i- Q% {7 p
& T# D% n/ S  g  m4 u* {3 f2 |
解决过程如下:
. ]& f3 a+ X% U, B2 X% _9 D
7 X/ {8 `0 V- E4 C. N, }[root@controller1 src]# pip install -I utils* |9 @6 J( P2 P  s
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality." j* n* E, R% n/ C
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
7 r4 `; K! ~1 o" I+ t, j8 S' lCollecting utils
- p% u+ s4 [, U/ E4 ]# r- S  Downloading http://mirrors.aliyun.com/pypi/packages/9b/de/9ffaf89be661b32d1e0cff05e1af5e4fc2d608c47498975e94aca219aed4/utils-0.9.0-py2.py3-none-any.whl (23 kB)% x! m, j$ H% K: Z
Installing collected packages: utils
# w/ q5 t* q1 lSuccessfully installed utils-0.9.02 h! H' a, F, L5 i4 u) v
[root@controller1 src]# pip install -I cryptography
7 A- |  m/ D' R( f. vDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
8 y6 c5 j4 U+ G' j: {+ uLooking in indexes: http://mirrors.aliyun.com/pypi/simple/$ [7 ?% \& \4 q- Q
Collecting cryptography
+ Y  c: v4 W8 w  Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
7 F8 e5 B9 }; I4 ~2 v' \. Z& o) R     |████████████████████████████████| 2.6 MB 607 kB/s . i" R# t$ {' Q: f( R1 b& @
Collecting six>=1.4.1  E* i# T, c9 }7 y% z* i& E
  Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
- O9 A2 V: w7 WCollecting cffi>=1.127 h( D6 f% I  e, R+ y
  Downloading http://mirrors.aliyun.com/pypi/packages/74/f5/f0cb35e78044bf19309e635b20550bf3443322e0ff2ff09e6732c0ed0851/cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)1 o+ S& m3 z, \8 N3 ?. \
     |████████████████████████████████| 389 kB 658 kB/s * P3 `- j+ l' S6 D2 \9 j
Collecting ipaddress; python_version < "3"
8 I( l' \) R  a; A" A& J0 }  Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
) X9 s3 E, ]4 u# lCollecting enum34; python_version < "3"
& c- e& }7 X  D: v2 L  Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)
" n& L9 w0 D8 v! k4 vCollecting pycparser
) p! _0 b/ k6 }& a& I+ r( O  Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB). j3 l& @$ a: q
     |████████████████████████████████| 112 kB 660 kB/s 8 ?% o) Y( T0 p8 G, y
Installing collected packages: six, pycparser, cffi, ipaddress, enum34, cryptography
; z/ Q5 \8 M- D# f# bSuccessfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0# K: J0 Z+ T0 J7 w- b
[root@controller1 src]# glance image-list" [; }! F9 [6 q( ~" c( D9 V$ M
/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
% D, W2 K, i! {6 b# J. ~  from cryptography import utils, x509% ?: q7 j  d0 ?4 _9 `& S
invalid syntax (_pmap.py, line 98)
+ \; C( ?" _5 e& Y9 s( i[root@controller1 src]# yum provides cryptography; e  ^+ T5 J* G' d
Loaded plugins: fastestmirror
+ W; m& i/ ]! U+ BLoading mirror speeds from cached hostfile  S) ~+ X. t( I  ~0 i9 C7 L+ k/ X
* base: mirrors.tuna.tsinghua.edu.cn
0 U9 n& k, p" {5 d  ~# l * epel: mirrors.tuna.tsinghua.edu.cn3 h* }4 V8 v) {8 ^: j0 x
* extras: mirrors.tuna.tsinghua.edu.cn
3 Z: o0 e/ m3 M, ? * updates: mirrors.tuna.tsinghua.edu.cn  U4 |2 A/ y1 f
python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library" O- r8 R: O2 X, x( `4 R8 u
Repo        : base
) O$ V: l9 _% W" oMatched from:* `3 V0 o" k9 h) \- w" v
Filename    : /usr/lib64/python2.7/site-packages/cryptography- H$ M# P* q6 K) Q
' J# A/ t* F/ k$ C- D- p. A# D
python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
- R# l( b' X; D' h2 n" RRepo        : c7-media
5 ]: q, v1 z/ f7 Y# W% B- gMatched from:
& Q  Q6 u) N# a; b" _2 ^; gFilename    : /usr/lib64/python2.7/site-packages/cryptography5 I9 n$ D, J- ~- W* ~' Z' U

! M8 P6 ^8 Z/ j[root@controller1 src]# yum install -y python2-cryptography-1.7.2-2.el7.x86_64! @% ?% s- a: _6 R2 B
Loaded plugins: fastestmirror$ V$ Y, n: w! i" ?
Loading mirror speeds from cached hostfile
" ]' P& `0 l0 v7 ]1 z( `0 _epel/x86_64/metalink                                                                                                                        | 6.7 kB  00:00:00     
! t9 O8 E3 E  O0 A0 ] * base: mirrors.tuna.tsinghua.edu.cn
' d+ {1 ^$ `1 g" ?* B. V * epel: mirrors.tuna.tsinghua.edu.cn8 y, {  n( E  r9 Y" M
* extras: mirrors.tuna.tsinghua.edu.cn
: m+ f$ c- y6 e7 P1 I * updates: mirrors.tuna.tsinghua.edu.cn
- j# |; }$ `0 n0 @! Y: jbase                                                                                                                                        | 3.6 kB  00:00:00     3 v3 E1 G5 X& y# n! z
c7-media                                                                                                                                    | 2.9 kB  00:00:00     
; z+ ]/ o8 G; [: ?ceph                                                                                                                                        | 2.9 kB  00:00:00     
7 D6 e3 m* [. Q- vdocker-ce-stable                                                                                                                            | 3.5 kB  00:00:00     
$ i0 U* y% U. B! |% A! z* g) \) D5 O

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:41:36 | 显示全部楼层
[root@controller1 src]# glance image-list --debug
$ \. Q4 b) t8 G9 ?" t4 dTraceback (most recent call last):, r5 B( h) T' P4 A% C
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main2 a$ s& A9 M7 c8 f: I) x# ^, K7 ]
    OpenStackImagesShell().main(argv)% I# {. N" p# J  L# O
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main
( @- r  e' ?+ J9 `) p8 B6 Z$ t$ I    sub_parser = _get_subparser(api_version); \- l& o# H4 g
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser
( W; v1 _7 i" J2 \% s    return self.get_subcommand_parser(api_version, argv)# X/ y* c: ?  X# i3 n
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser: T2 y" ]2 _  F7 o: p* I
    version, 'shell')6 \$ |4 Z3 a2 Y. u! |
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module9 q  M! `, j# W7 _4 p
    return import_module(module_str)
7 _* ^' k) n7 t7 l  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module6 X, I, _/ r& m
    __import__(import_str)
* l% T4 |# K2 @  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>! L8 N8 P) p0 d+ D
    from glanceclient.v2.client import Client      # noqa
6 S; K- l/ o3 Y6 c& K2 R, F3 G  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 17, in <module>+ t4 r9 D0 G7 o. g
    from glanceclient.common import http
; q7 b! s/ m% M* _6 V; p  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 22, in <module># ]1 e* I! N6 T% O
    import OpenSSL1 M( p8 Z& _; `. H: T
  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
2 Z. I. y7 |1 ?8 P7 r    from OpenSSL import crypto, SSL, i. I; N$ A8 J" n3 ?7 {; L9 u
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 14, in <module>
+ {* Q: X# m- V7 {7 m    from cryptography import utils, x5098 _( x9 t8 r. B
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>
0 I* P, z3 U7 r8 w    from cryptography.x509.base import (4 R) e/ v, ~' p
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 16, in <module>
  r0 s* H" l1 x- [    from cryptography.x509.extensions import Extension, ExtensionType
, U) _) j- u( T  File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 20, in <module>- a" f9 V2 H& C; C/ S" S
    from cryptography.hazmat.primitives import constant_time, serialization7 M8 t/ G- [7 Z( V2 u! ?8 E$ p2 |
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
+ c6 J' \* E5 {; T  _, ?7 g+ X    from cryptography.hazmat.primitives.serialization.base import (7 C  e; w: i  d* d" h; v* X/ w( i1 |
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
& r* e# e( U7 r* Z) {8 q    from cryptography.hazmat.backends import _get_backend
/ D$ R3 k0 w( {) J: }% D0 ZImportError: cannot import name _get_backend
7 o/ P6 M) Z* J0 a2 i, M( {cannot import name _get_backend
9 m' O3 R2 C6 b6 T$ z2 h) C9 H, o8 H3 z9 k7 L' K, E( A- Q- l
安装下面包:. }. p1 w9 p0 Y2 ?5 ?  ?. e, {
pip install -U platformio( ^2 ]0 C$ w' x4 j, z# P

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:50:30 | 显示全部楼层
[root@controller1 ~]# pip install -I cryptography3 {/ j' u) {9 ?
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/de ... s/#python-2-support pip 21.0 will remove support for this functionality.; J9 M2 ^0 e& m$ ?4 N% P
Looking in indexes: http://mirrors.aliyun.com/pypi/simple// A1 o6 G0 z/ A6 `
Collecting cryptography) k  w  S: z; H3 S
  Downloading http://mirrors.aliyun.com/pypi/p ... inux2010_x86_64.whl (2.6 MB)1 M2 K+ ?; N! w- D
     |████████████████████████████████| 2.6 MB 303 kB/s
6 A" w. v) _3 C& U5 nCollecting cffi>=1.12+ C- Q2 Z% D( F& D4 d
  Downloading http://mirrors.aliyun.com/pypi/p ... nylinux1_x86_64.whl (389 kB)$ o( F  R; L7 E& |$ y
     |████████████████████████████████| 389 kB 267 kB/s % r9 Y6 T' [/ V7 z' t3 _
Collecting six>=1.4.1
# D6 T0 e1 @2 b1 j1 ~  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (11 kB)* [8 ~. \- q) |0 _4 X. a% _
Collecting ipaddress; python_version < "3"+ v( L; g% P5 d
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (18 kB)
, {/ Y  I3 p! p) f4 r; gCollecting enum34; python_version < "3"" t! r; l# J! s7 e) q
  Downloading http://mirrors.aliyun.com/pypi/p ... 10-py2-none-any.whl (11 kB)
7 J5 i; @* P+ s& a& H, X/ iCollecting pycparser1 e& P% ~7 F" j$ O- s- u
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (112 kB)
$ t$ g8 g7 w1 K- V0 z6 S     |████████████████████████████████| 112 kB 414 kB/s $ s: R0 ^: t$ D0 v" j  f6 d/ i
Installing collected packages: pycparser, cffi, six, ipaddress, enum34, cryptography8 h5 u$ ]) B% t5 _
Successfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0- P4 p0 x/ {& [  j. F
[root@controller1 ~]# glance image-list --debug
0 U: F1 k' Q# n% ]/ y( S/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.% a  N  s" p# X. _
  from cryptography import utils, x509
; Q$ M5 S9 V6 s, @, a( |* a7 g+ C0 aTraceback (most recent call last):3 b- z6 E' M6 o
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main
, ~: X3 @% |) Q/ U5 M, ^    OpenStackImagesShell().main(argv)+ B  M0 H& c  x
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main
+ b  T1 e/ J9 T$ x# s+ M$ x5 |  H    sub_parser = _get_subparser(api_version)$ h; j: p9 @/ a1 D9 n6 B3 g
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser3 N$ V3 d8 R! c# L
    return self.get_subcommand_parser(api_version, argv)
! e1 i4 T( H3 O$ d9 g2 V7 e  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser
/ d6 A, l# F+ O9 p8 i! E7 p    version, 'shell')
* ^9 ~' K- l0 d$ Q! W  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module# T& E# m" r; M3 k
    return import_module(module_str)
/ \) ^; w; w: a! M  X$ ?( B  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
. V* F! Y- w; b0 F% l- d/ L    __import__(import_str)
. A+ a7 N) G8 R( m% H2 c  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>% @+ ^; \9 _- h  R& `
    from glanceclient.v2.client import Client      # noqa5 G; g8 B( n% v/ O, m, f) b, M$ t0 D
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 19, in <module>- ]1 U' W* W# ~7 M- ]
    from glanceclient.v2 import image_members
: D- [1 i6 {9 e  File "/usr/lib/python2.7/site-packages/glanceclient/v2/image_members.py", line 16, in <module>
; o% f* v4 K' p1 l2 E    import warlock" B! f; J  F" m' C1 o  `
  File "/usr/lib/python2.7/site-packages/warlock/__init__.py", line 17, in <module>
: y+ x3 f8 l4 m$ Z) I9 Y    from warlock.core import model_factory  # NOQA
+ e( I8 n+ w# c2 s7 S- @  File "/usr/lib/python2.7/site-packages/warlock/core.py", line 19, in <module>/ _1 S- U) h- O# d0 K% r" j
    from . import model. f1 a3 t$ `6 K
  File "/usr/lib/python2.7/site-packages/warlock/model.py", line 21, in <module>
! {8 ]; V7 ~; [. ]' |9 a! [: h    import jsonschema
& h$ s5 H1 l  j) V" g& n* D  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>4 U: ^6 D& |' {3 v
    from jsonschema._types import TypeChecker0 c3 N5 \6 t$ S! z9 w
  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>+ t+ g+ ^  S6 @0 J
    from pyrsistent import pmap
; ], S4 H: T1 l  \/ E  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>8 Q# j! h# r& J$ \" X+ i
    from pyrsistent._pmap import pmap, m, PMap
3 J, x& t( z, _- L0 M3 w  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 98
/ B9 m+ O+ M( B$ F) y    ) from e* I+ b5 k. K: F- t
         ^3 p1 ^7 @* M, r9 q& {0 o& k7 V9 U
SyntaxError: invalid syntax; I$ g: X$ @/ T
invalid syntax (_pmap.py, line 98)
+ M; M& N- Y0 Z( K, y) ^[root@controller1 ~]# openstack image list 9 v: A& W0 i9 G8 X0 k( ?
+--------------------------------------+----------------------+--------++ q4 |9 K1 i. B) j& i# c
| ID                                   | Name                 | Status |
6 L3 H, d& i- P5 i+--------------------------------------+----------------------+--------+: G# f' Y1 W) d6 b. z4 V" M. Y
| d25d8b59-dfff-4f2b-b63e-aa22dc533778 | centos7.9-origin-hdd | active |# _/ \& o" M, x" W# E* N
+--------------------------------------+----------------------+--------+
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:02 , Processed in 0.021155 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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