Support python3

Bug #1691881 reported by James Hebden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ceilometer Agent Charm
Fix Released
Medium
David Ames

Bug Description

When using python3, the charm encounters errors related to type mismatch.
subprocess requires an extra decode of return values to address this, ala:
https://git.launchpad.net/~jhebden/charm-ceilometer-agent/diff/hooks/charmhelpers/contrib/network/ip.py?h=onsite-fixes-17.02&id=5aa249f2af35a49c75ec09442d86a141c2811786

Related branches

Ryan Beisner (1chb1n)
tags: added: adrastea
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi James,

Thanks for the fix. Do we need the 2nd decode("utf-8")?

I ran a quick test on xenial: http://paste.ubuntu.com/24729399/

and one decode seemed to do the trick. I believe unicode for python2 is the same as str in python3.

Corey

Changed in charm-ceilometer-agent:
importance: Undecided → High
importance: High → Medium
status: New → Triaged
Revision history for this message
David Ames (thedac) wrote : Re: [Bug 1691881] Re: Support python3

Michael Skalka confirmed we do not need the second decode.

On Wed, May 31, 2017 at 12:34 PM, Corey Bryant
<email address hidden> wrote:
> Hi James,
>
> Thanks for the fix. Do we need the 2nd decode("utf-8")?
>
> I ran a quick test on xenial: http://paste.ubuntu.com/24729399/
>
> and one decode seemed to do the trick. I believe unicode for python2 is
> the same as str in python3.
>
> Corey
>
> ** Changed in: charm-ceilometer-agent
> Importance: Undecided => High
>
> ** Changed in: charm-ceilometer-agent
> Importance: High => Medium
>
> ** Changed in: charm-ceilometer-agent
> Status: New => Triaged
>
> --
> You received this bug notification because you are a member of OpenStack
> Charmers, which is subscribed to OpenStack Charms.
> Matching subscriptions: openstack-charms
> https://bugs.launchpad.net/bugs/1691881
>
> Title:
> Support python3
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charm-ceilometer-agent/+bug/1691881/+subscriptions

Revision history for this message
David Ames (thedac) wrote :
Changed in charm-ceilometer-agent:
status: Triaged → In Progress
Revision history for this message
David Ames (thedac) wrote :
David Ames (thedac)
Changed in charm-ceilometer-agent:
assignee: nobody → David Ames (thedac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceilometer-agent (master)

Reviewed: https://review.openstack.org/469673
Committed: https://git.openstack.org/cgit/openstack/charm-ceilometer-agent/commit/?id=36a4edff9cdd0f5fb07836e790030d49b39f562f
Submitter: Jenkins
Branch: master

commit 36a4edff9cdd0f5fb07836e790030d49b39f562f
Author: David Ames <email address hidden>
Date: Wed May 31 15:27:04 2017 -0700

    Decode subprocess output for python3 in ipv6 check

    When using python3, the code encounters errors related to type
    mismatch. subprocess requires an extra decode of return values
    to address this.

    CH Sync to get fix.

    Change-Id: I141c0d4d1851012d5c0a5a606402c75211a323f5
    Partial-Bug: #1691881

David Ames (thedac)
Changed in charm-ceilometer-agent:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-ceilometer-agent:
milestone: none → 17.08
James Page (james-page)
Changed in charm-ceilometer-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.