1

有人可以帮忙解决以下问题吗?
在 ubuntu 18.04 上安装 devstack 时遇到以下问题。
python - 具有 sudo 访问权限的 3.6.9
堆栈用户。
pip 版本 - 来自 /usr/local/lib/python3.6/dist-packages/pip (python 3.6) 的 pip 20.2.4

INFO keystone.cmd.bootstrap [None req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created region RegionOne
INFO keystone.cmd.bootstrap [None req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created public endpoint http://10.61.62.241/identity
INFO keystone.cmd.bootstrap [None req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created admin endpoint http://10.61.62.241/identity


+./stack.sh:main:1084                      create_keystone_accounts  
+lib/keystone:create_keystone_accounts:314  local admin_project  
++lib/keystone:create_keystone_accounts:315  oscwrap project show admin -f value -c id  
Traceback (most recent call last):  
  File "/usr/local/bin/openstack", line 5, in <module>  
    from openstackclient.shell import main  
  File "/usr/local/lib/python3.6/dist-packages/openstackclient/shell.py", line 24, in <module>  
    from osc_lib import shell  
  File "/usr/local/lib/python3.6/dist-packages/osc_lib/shell.py", line 24, in <module>  
    from cliff import app  
  File "/usr/local/lib/python3.6/dist-packages/cliff/app.py", line 24, in <module>  
    import cmd2  
  File "/usr/local/lib/python3.6/dist-packages/cmd2/__init__.py", line 30, in <module>  
    from .cmd2 import Cmd  
  File "/usr/local/lib/python3.6/dist-packages/cmd2/cmd2.py", line 48, in <module>  
    from .clipboard import can_clip, get_paste_buffer, write_to_paste_buffer  
  File "/usr/local/lib/python3.6/dist-packages/cmd2/clipboard.py", line 12, in <module>  
    _ = pyperclip.paste()  
  File "/usr/local/lib/python3.6/dist-packages/pyperclip/__init__.py", line 680, in lazy_load_stub_paste  
    copy, paste = determine_clipboard()  
  File "/usr/local/lib/python3.6/dist-packages/pyperclip/__init__.py", line 568, in determine_clipboard  
    os.environ["XDG_SESSION_TYPE"] == "wayland" and  
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__  
    raise KeyError(key) from None  
KeyError: 'XDG_SESSION_TYPE'  

++functions-common:oscwrap:2346             return 1  
+lib/keystone:create_keystone_accounts:315  admin_project=  
+lib/keystone:create_keystone_accounts:1   exit_trap  
+./stack.sh:exit_trap:491                  local r=1  
++./stack.sh:exit_trap:492                  jobs -p  
+./stack.sh:exit_trap:492                  jobs=  
+./stack.sh:exit_trap:495                  [[ -n '' ]]  
+./stack.sh:exit_trap:501                  '[' -f /tmp/tmp.LRWsRkTTkV ']'  
+./stack.sh:exit_trap:502                  rm /tmp/tmp.LRWsRkTTkV  
+./stack.sh:exit_trap:506                  kill_spinner  
+./stack.sh:kill_spinner:401               '[' '!' -z '' ']'  
+./stack.sh:exit_trap:508                  [[ 1 -ne 0 ]]  
+./stack.sh:exit_trap:509                  echo 'Error on exit'  
Error on exit  
+./stack.sh:exit_trap:511                  type -p generate-subunit 
+./stack.sh:exit_trap:512                  generate-subunit 1606228299 592 fail  
+./stack.sh:exit_trap:514                  [[ -z /opt/stack/logs ]]  
+./stack.sh:exit_trap:517                  /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs  
+./stack.sh:exit_trap:526                  exit 1  
4

2 回答 2

3

之前使用 ubuntu18.4 进行了安装,但似乎有些问题,不确定这是否是由于 python 或 Ubuntu dist 版本(或其他东西)而发生的。直到有合适的解决方案可用,作为一种解决方法,您可以导出XDG_SESSION_TYPE=wayland然后运行./stack.sh,我已经devstack以这种方式安装,并且dashboard创建VM/network等工作正常。

于 2020-11-27T13:46:35.780 回答
1

我有同样的问题,四处搜索我在这个视频中找到了这个问题的解决方案https://www.youtube.com/watch?v=SYd34yuyLYk&feature=youtu.be解决方案是这条线,export XDG_SESSION_TYPE=wayland希望对您有所帮助。

于 2021-02-28T23:36:06.997 回答