<div dir="ltr">Openstack devstack installation went fine after exporting "
XDG_SESSION_TYPE" but openstack cli didn't work <div><br></div><div>Thanks,</div><div>Nitish Goel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 26, 2020 at 5:41 PM Nitish Goel <<a href="mailto:goel.nitish10@gmail.com">goel.nitish10@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks Balázs,<div><br></div><div>This workaround export XDG_SESSION_TYPE='' worked for me.</div><div><br></div><div>Thanks,</div><div>Nitish Goel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 25, 2020 at 10:07 PM Balázs Gibizer <balazs.gibizer@est.tech> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On Wed, Nov 25, 2020 at 09:42, Nitish Goel <<a href="mailto:goel.nitish10@gmail.com" target="_blank">goel.nitish10@gmail.com</a>> <br>
wrote:<br>
> Hi Team,<br>
> <br>
> I'm trying to install a devstack on a ubuntu 18.04 VM having python <br>
> 3.6.9 but getting below error. Any suggestions?<br>
> python - 3.6.9<br>
> stack user with sudo access.<br>
> pip version - pip 20.2.4 from <br>
> /usr/local/lib/python3.6/dist-packages/pip (python 3.6)<br>
> <a href="https://stackoverflow.com/questions/64989221/xdg-session-type-error-on-devstack-installation" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/64989221/xdg-session-type-error-on-devstack-installation</a><br>
> NFO keystone.cmd.bootstrap [None <br>
> req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created region <br>
> RegionOne<br>
> INFO keystone.cmd.bootstrap [None <br>
> req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created public <br>
> endpoint <a href="http://10.61.62.241/identity" rel="noreferrer" target="_blank">http://10.61.62.241/identity</a><br>
> INFO keystone.cmd.bootstrap [None <br>
> req-f46e9c41-1b14-4e5b-82b2-ada81e8b0dcd None None] Created admin <br>
> endpoint <a href="http://10.61.62.241/identity" rel="noreferrer" target="_blank">http://10.61.62.241/identity</a><br>
> <br>
> <br>
> +./stack.sh:main:1084 create_keystone_accounts<br>
> +lib/keystone:create_keystone_accounts:314 local admin_project<br>
> ++lib/keystone:create_keystone_accounts:315 oscwrap project show <br>
> admin -f value -c id<br>
> Traceback (most recent call last):<br>
> File "/usr/local/bin/openstack", line 5, in <module><br>
> from openstackclient.shell import main<br>
> File <br>
> "/usr/local/lib/python3.6/dist-packages/openstackclient/shell.py", <br>
> line 24, in <module><br>
> from osc_lib import shell<br>
> File "/usr/local/lib/python3.6/dist-packages/osc_lib/shell.py", <br>
> line 24, in <module><br>
> from cliff import app<br>
> File "/usr/local/lib/python3.6/dist-packages/cliff/app.py", line <br>
> 24, in <module><br>
> import cmd2<br>
> File "/usr/local/lib/python3.6/dist-packages/cmd2/__init__.py", <br>
> line 30, in <module><br>
> from .cmd2 import Cmd<br>
> File "/usr/local/lib/python3.6/dist-packages/cmd2/cmd2.py", line <br>
> 48, in <module><br>
> from .clipboard import can_clip, get_paste_buffer, <br>
> write_to_paste_buffer<br>
> File "/usr/local/lib/python3.6/dist-packages/cmd2/clipboard.py", <br>
> line 12, in <module><br>
> _ = pyperclip.paste()<br>
> File <br>
> "/usr/local/lib/python3.6/dist-packages/pyperclip/__init__.py", line <br>
> 680, in lazy_load_stub_paste<br>
> copy, paste = determine_clipboard()<br>
> File <br>
> "/usr/local/lib/python3.6/dist-packages/pyperclip/__init__.py", line <br>
> 568, in determine_clipboard<br>
> os.environ["XDG_SESSION_TYPE"] == "wayland" and<br>
> File "/usr/lib/python3.6/os.py", line 669, in __getitem__<br>
> raise KeyError(key) from None<br>
> KeyError: 'XDG_SESSION_TYPE'<br>
> <br>
> ++functions-common:oscwrap:2346 return 1<br>
> +lib/keystone:create_keystone_accounts:315 admin_project=<br>
> +lib/keystone:create_keystone_accounts:1 exit_trap<br>
> +./stack.sh:exit_trap:491 local r=1<br>
> ++./stack.sh:exit_trap:492 jobs -p<br>
> +./stack.sh:exit_trap:492 jobs=<br>
> +./stack.sh:exit_trap:495 [[ -n '' ]]<br>
> +./stack.sh:exit_trap:501 '[' -f /tmp/tmp.LRWsRkTTkV <br>
> ']'<br>
> +./stack.sh:exit_trap:502 rm /tmp/tmp.LRWsRkTTkV<br>
> +./stack.sh:exit_trap:506 kill_spinner<br>
> +./stack.sh:kill_spinner:401 '[' '!' -z '' ']'<br>
> +./stack.sh:exit_trap:508 [[ 1 -ne 0 ]]<br>
> +./stack.sh:exit_trap:509 echo 'Error on exit'<br>
> Error on exit<br>
> +./stack.sh:exit_trap:511 type -p generate-subunit<br>
> +./stack.sh:exit_trap:512 generate-subunit <br>
> 1606228299 592 fail<br>
> +./stack.sh:exit_trap:514 [[ -z /opt/stack/logs ]]<br>
> +./stack.sh:exit_trap:517 /usr/bin/python3.6 <br>
> /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs<br>
> +./stack.sh:exit_trap:526 exit 1<br>
<br>
<br>
I've seen the same error in my Ubuntu 18.04 devstack on master. I <br>
stopped digging when I saw that the code that blows are 15 months <br>
old[1]. As a workaround I did<br>
<br>
$ export XDG_SESSION_TYPE=''<br>
$ ./unstack.sh && ./stack.sh<br>
<br>
And it worked.<br>
<br>
[1] <br>
<a href="https://github.com/asweigart/pyperclip/blame/master/src/pyperclip/__init__.py#L568" rel="noreferrer" target="_blank">https://github.com/asweigart/pyperclip/blame/master/src/pyperclip/__init__.py#L568</a><br>
<br>
Cheers,<br>
gibi<br>
<br>
<br>
<br>
<br>
</blockquote></div>
</blockquote></div>