<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">They both upgraded but still fail:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@us01odc-dev2-ctrl1:~# nova --version<o:p></o:p></p>
<p class="MsoNormal">16.0.0<o:p></o:p></p>
<p class="MsoNormal">root@us01odc-dev2-ctrl1:~# nova console-log 3febd3b2-df87-4f06-884b-378116c6fe4c<o:p></o:p></p>
<p class="MsoNormal">ERROR (UnicodeEncodeError): 'latin-1' codec can't encode characters in position 46615-46617: ordinal not in range(256)<o:p></o:p></p>
<p class="MsoNormal">root@us01odc-dev2-ctrl1:~# os --version<o:p></o:p></p>
<p class="MsoNormal">openstack 4.0.0<o:p></o:p></p>
<p class="MsoNormal">root@us01odc-dev2-ctrl1:~# os console log show 3febd3b2-df87-4f06-884b-378116c6fe4c<o:p></o:p></p>
<p class="MsoNormal">'latin-1' codec can't encode characters in position 46615-46617: ordinal not in range(256)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I look at /usr/lib/python2.7/dist-packages/openstackclient/compute/v2/console.py on the controller, I see the new code from https://review.opendev.org/#/c/541609/3/openstackclient/compute/v2/console.py:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> if data and data[-1] != '\n':<o:p></o:p></p>
<p class="MsoNormal"> data += '\n'<o:p></o:p></p>
<p class="MsoNormal"> self.app.stdout.write(data)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also I see this in the review at https://review.opendev.org/#/c/541609<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you are sure this works, please ignore my comment.<o:p></o:p></p>
<p class="MsoNormal">I tried to verify this on a local python console (python-2.7.13).<o:p></o:p></p>
<p class="MsoNormal">To do this I used<o:p></o:p></p>
<p class="MsoNormal">sys.stdout = codecs.getwriter('ascii')(sys.stdout)<o:p></o:p></p>
<p class="MsoNormal">and<o:p></o:p></p>
<p class="MsoNormal">sys.stdout = codecs.getwriter('utf-8')(sys.stdout)<o:p></o:p></p>
<p class="MsoNormal">Before running the first command, I can write any unicode-character, after the first command I get the same error as in the bug report. After running the second command, the error persists.<o:p></o:p></p>
<p class="MsoNormal">That makes me believe, your patch won't fix the issue completely.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is my cluster one of the cases where the patch doesn’t fix the issue?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Radosław Piliszek <radoslaw.piliszek@gmail.com>
<br>
<b>Sent:</b> Friday, January 31, 2020 1:21 PM<br>
<b>To:</b> Albert Braden <albertb@synopsys.com><br>
<b>Cc:</b> Radosław Piliszek <radoslaw.piliszek@gmail.com>; OpenStack Discuss ML <openstack-discuss@lists.openstack.org><br>
<b>Subject:</b> Re: "encoding error when doing console log show" in Rocky<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Ok, try upgrading both to the latest (no pin). Latest clients should still work on Rocky and we don't have to guess versions.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-yoctozepto<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Jan 31, 2020, 22:12 Albert Braden <<a href="mailto:Albert.Braden@synopsys.com">Albert.Braden@synopsys.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">In my other cluster where I haven't upgraded anything since the Rocky install, the old nova version 11 client works, but the openstack client fails:<br>
<br>
root@us01odc-dev1-ctrl1:~# openstack --version<br>
openstack 3.16.1<br>
root@us01odc-dev1-ctrl1:~# openstack console log show 5a923a92-8fd1-48fd-8b76-768d1fb5f0c6<br>
'latin-1' codec can't encode characters in position 45794-45796: ordinal not in range(256)<br>
root@us01odc-dev1-ctrl1:~# nova --version<br>
11.0.0<br>
root@us01odc-dev1-ctrl1:~# nova console-log 5a923a92-8fd1-48fd-8b76-768d1fb5f0c6<br>
[ 0.000000] Initializing cgroup subsys cpuset<br>
[ 0.000000] Initializing cgroup subsys cpu<br>
[ 0.000000] Initializing cgroup subsys cpuacct<br>
[ 0.000000] Linux version 3.10.0-957.5.1.el7.x86_64 (<a href="mailto:mockbuild@kbuilder.bsys.centos.org" target="_blank">mockbuild@kbuilder.bsys.centos.org</a>) (gcc version 4.8.5 20150<br>
...<br>
<br>
-----Original Message-----<br>
From: Albert Braden <<a href="mailto:Albert.Braden@synopsys.com" target="_blank">Albert.Braden@synopsys.com</a>>
<br>
Sent: Friday, January 31, 2020 12:49 PM<br>
To: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>><br>
Cc: OpenStack Discuss ML <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
Subject: RE: "encoding error when doing console log show" in Rocky<br>
<br>
That ran successfully, but it didn't fix the problem.<br>
<br>
Installing collected packages: python-novaclient<br>
Attempting uninstall: python-novaclient<br>
Found existing installation: python-novaclient 16.0.0<br>
Uninstalling python-novaclient-16.0.0:<br>
Successfully uninstalled python-novaclient-16.0.0<br>
Successfully installed python-novaclient-11.0.1<br>
root@us01odc-dev2-ctrl1:/var/log/nova# os console log show 3febd3b2-df87-4f06-884b-378116c6fe4c<br>
'latin-1' codec can't encode characters in position 46615-46617: ordinal not in range(256)<br>
<br>
-----Original Message-----<br>
From: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>>
<br>
Sent: Friday, January 31, 2020 12:41 PM<br>
To: Albert Braden <<a href="mailto:albertb@synopsys.com" target="_blank">albertb@synopsys.com</a>><br>
Cc: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>>; OpenStack Discuss ML <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
Subject: Re: "encoding error when doing console log show" in Rocky<br>
<br>
Then also:<br>
pip install -U python-novaclient==11.0.1<br>
<br>
-yoctozepto<br>
<br>
pt., 31 sty 2020 o 21:31 Albert Braden <<a href="mailto:Albert.Braden@synopsys.com" target="_blank">Albert.Braden@synopsys.com</a>> napisał(a):<br>
><br>
> The client claims that it is version 3.16.3. What am I missing?<br>
><br>
> root@us01odc-dev2-ctrl1:/var/log/nova# openstack --version<br>
> openstack 3.16.3<br>
> root@us01odc-dev2-ctrl1:/var/log/nova# os console log show 3febd3b2-df87-4f06-884b-378116c6fe4c<br>
> 'latin-1' codec can't encode characters in position 46615-46617: ordinal not in range(256)<br>
><br>
> -----Original Message-----<br>
> From: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>><br>
> Sent: Friday, January 31, 2020 10:49 AM<br>
> To: Albert Braden <<a href="mailto:albertb@synopsys.com" target="_blank">albertb@synopsys.com</a>><br>
> Cc: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>>; OpenStack Discuss ML <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
> Subject: Re: "encoding error when doing console log show" in Rocky<br>
><br>
> It looks like these are package-provided and hence pip refused to touch them.<br>
> Are there no updates to packages of clients?<br>
> You could try installing the client in venv if you insist on using this machine.<br>
><br>
> That file you call "source file" has a definition of environment<br>
> variables for osc, you surely "source" it but it's far from being a<br>
> "source file" in the specific sense around here. Hence my previous<br>
> confusion. :-)<br>
><br>
> -yoctozepto<br>
><br>
> pt., 31 sty 2020 o 19:25 Albert Braden <<a href="mailto:Albert.Braden@synopsys.com" target="_blank">Albert.Braden@synopsys.com</a>> napisał(a):<br>
> ><br>
> > This is the source file:<br>
> ><br>
> > <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_7omp8p&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=-eOnfHHn64irzKfiMAMB9Hp4bpvYgldkQHRCuCOvE60&e=" target="_blank">
https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_7omp8p&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=-eOnfHHn64irzKfiMAMB9Hp4bpvYgldkQHRCuCOvE60&e=</a><br>
> ><br>
> > I'm not very good at PIP but it looks like I already have the latest Rocky client installed:<br>
> ><br>
> > <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_xd6hi2&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=3Skkokc_zvLhR_0v_WNYAp7rzYbPA0pDg_IvMmSPtHc&e=" target="_blank">
https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_xd6hi2&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=3Skkokc_zvLhR_0v_WNYAp7rzYbPA0pDg_IvMmSPtHc&e=</a><br>
> > <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_zxjh3t&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=V7aVdb9JbVeogcCPGu2wAtCvM1aw5EgBGKLuhEIkMQw&e=" target="_blank">
https://urldefense.proofpoint.com/v2/url?u=https-3A__f.perl.bot_p_zxjh3t&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=9hpBVaDxs6DnEno4f15EYzgDq-WzDXknz_GfNTUqDGI&s=V7aVdb9JbVeogcCPGu2wAtCvM1aw5EgBGKLuhEIkMQw&e=</a><br>
> ><br>
> > Requirement already satisfied, skipping upgrade: python-novaclient>=9.1.0 in /usr/local/lib/python2.7/dist-packages (from python-openstackclient==3.16.3) (16.0.0)<br>
> ><br>
> > root@us01odc-dev2-ctrl1:~# os console log show 3febd3b2-df87-4f06-884b-378116c6fe4c<br>
> > 'latin-1' codec can't encode characters in position 46615-46617: ordinal not in range(256)<br>
> ><br>
> > -----Original Message-----<br>
> > From: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>><br>
> > Sent: Friday, January 31, 2020 12:39 AM<br>
> > To: Albert Braden <<a href="mailto:albertb@synopsys.com" target="_blank">albertb@synopsys.com</a>><br>
> > Cc: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>>; OpenStack Discuss ML <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
> > Subject: Re: "encoding error when doing console log show" in Rocky<br>
> ><br>
> > Well, I might be slow here. :-)<br>
> > What source file do you need to run on the controller?<br>
> > If you run openstack client from controller then it becomes your<br>
> > client so just update the client there to the latest rocky release:<br>
> > <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.openstack.org_releasenotes_python-2Dopenstackclient_rocky.html&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=avA5Liwj2cVesY05Dk6kFm0YanYp7N7Q4PHGMbzeD6Y&s=dQaaBGR2A-dmJXGDr_TiJ0XVyghaMONnZasgJ52CnrU&e=" target="_blank">
https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.openstack.org_releasenotes_python-2Dopenstackclient_rocky.html&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=avA5Liwj2cVesY05Dk6kFm0YanYp7N7Q4PHGMbzeD6Y&s=dQaaBGR2A-dmJXGDr_TiJ0XVyghaMONnZasgJ52CnrU&e=</a><br>
> > something along this:<br>
> > sudo pip install -U python-openstackclient==3.16.3<br>
> ><br>
> > -yoctozepto<br>
> ><br>
> > czw., 30 sty 2020 o 22:18 Albert Braden <<a href="mailto:Albert.Braden@synopsys.com" target="_blank">Albert.Braden@synopsys.com</a>> napisał(a):<br>
> > ><br>
> > > Sorry if I am slow. This happens when I go to the controller, run my source file and then type: os console log show <UUID><br>
> > ><br>
> > > How can I install a new client to use on the controller command line? Do I need to replace the files mentioned below, or is there a better way?<br>
> > ><br>
> > > -----Original Message-----<br>
> > > From: Radosław Piliszek <<a href="mailto:radoslaw.piliszek@gmail.com" target="_blank">radoslaw.piliszek@gmail.com</a>><br>
> > > Sent: Thursday, January 30, 2020 12:09 PM<br>
> > > To: Albert Braden <<a href="mailto:albertb@synopsys.com" target="_blank">albertb@synopsys.com</a>><br>
> > > Cc: OpenStack Discuss ML <<a href="mailto:openstack-discuss@lists.openstack.org" target="_blank">openstack-discuss@lists.openstack.org</a>><br>
> > > Subject: Re: "encoding error when doing console log show" in Rocky<br>
> > ><br>
> > > The bug you mention affects clients.<br>
> > > Hence you just need to patch your clients.<br>
> > > I guess just using a newer version of client would work fine.<br>
> > ><br>
> > > -yoctozepto<br>
> > ><br>
> > > czw., 30 sty 2020 o 20:56 Albert Braden <<a href="mailto:Albert.Braden@synopsys.com" target="_blank">Albert.Braden@synopsys.com</a>> napisał(a):<br>
> > > ><br>
> > > > We’re running openstack-ansible Rocky and seeing the “encoding error when doing console log show.” I see here that there is a patch:<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_python-2Dopenstackclient_-2Bbug_1747862&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=-HCLwwRjUJ1GrihF5PjSNOYqDFH9Y7Qg0Bckxae56UY&s=vpftbl1w23aba5hyvrLPC-bG3IemMkFqbNBDTxrtHFM&e=" target="_blank">
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_python-2Dopenstackclient_-2Bbug_1747862&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=-HCLwwRjUJ1GrihF5PjSNOYqDFH9Y7Qg0Bckxae56UY&s=vpftbl1w23aba5hyvrLPC-bG3IemMkFqbNBDTxrtHFM&e=</a><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > How can I apply this patch to our Rocky install? Do I need to just copy the file over the existing /usr/lib/python2.7/dist-packages/openstackclient/compute/v2/console.py on controllers and hypervisors? Or is there a better way?<o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>