Bug 1194324 - Please switch pcp to Python 3
Please switch pcp to Python 3
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nathan Scott
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1194577
  Show dependency treegraph
 
Reported: 2015-02-19 09:47 EST by Bohuslav "Slavek" Kabrda
Modified: 2015-03-25 16:06 EDT (History)
11 users (show)

See Also:
Fixed In Version: pcp-3.10.3-1.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-13 12:56:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bohuslav "Slavek" Kabrda 2015-02-19 09:47:55 EST
Hi, as per [1], I'd like to ask you to switch pcp to Python 3 as default. pcp is compatible with Python 3 in upstream, so this only requires few simple downstream fixes:

- Getting rid of /usr/bin/python generated autodeps - all hashbangs /usr/bin/python should be replaced by /usr/bin/python3
- The main pcp package should depend on python3-pcp rather than on python-pcp
- All python2 explicit deps should be removed/replaced by python3 explicit deps in the main pcp package

These changes shouldn't break any depending packages, AFAICS - everyone will still be able to depend on python-pcp explicitly and use it in Python 2, all the /usr/bin scripts should keep working under Python 3.

I'd like to ask you to do this before 24th February in both Rawhide and F22. I'm terribly sorry that this is on such a short notice, but I only now realized that pcp and python-pcp are on the Fedora atomic host and thus need to be switched. If I can be of any assistance, please let me know.

Thanks a lot!

[1] https://fedoraproject.org/wiki/Changes/Python_3_Migration_Improvements
Comment 1 Nathan Scott 2015-02-19 18:51:11 EST
> I'd like to ask you to do this before 24th February in both Rawhide and F22.

I think we should be able to respin in time - I'll begin work on it immediately.

I'd like to discuss some of those simple fixes though, are you on IRC somewhere?  Thanks.

> pcp is compatible with Python 3 in upstream

Its not quite this simple - while work has been done on the python modules side of things, and packaging that up, other work remains in the pcp scripts that use those modules.  I'll attempt to audit and test each of those before Tuesday though.

cheers.
Comment 2 Bohuslav "Slavek" Kabrda 2015-02-20 02:44:04 EST
(In reply to Nathan Scott from comment #1)
> > I'd like to ask you to do this before 24th February in both Rawhide and F22.
> 
> I think we should be able to respin in time - I'll begin work on it
> immediately.
> 
> I'd like to discuss some of those simple fixes though, are you on IRC
> somewhere?  Thanks.

Thank you very much. I'm on PTO today, but feel free to ask Robert Kuska (rkuska), Matej Stuchlik (mstuchli) or Miro Hroncok (mhroncok) on #fedora-python or #fedora-devel. (CCing them)

> > pcp is compatible with Python 3 in upstream
> 
> Its not quite this simple - while work has been done on the python modules
> side of things, and packaging that up, other work remains in the pcp scripts
> that use those modules.  I'll attempt to audit and test each of those before
> Tuesday though.
> 
> cheers.

Great, thanks. Robert, Matej and Miro will help you, I'm sure.
Comment 3 Frank Ch. Eigler 2015-02-23 07:22:43 EST
> Hi, as per [1], I'd like to ask you to switch pcp to Python 3 as default.
> pcp is compatible with Python 3 in upstream

This is misleading.  Numerous .py scripts in the pcp sources are not
compatible with python3, even if the hashbangs are redirected to
/usr/bin/python3.  Just a random testing indicates parse/syntax
errors in:

pcp-free.py
pcp-dmcache.py
pcp-numastat.py
pcp-uptime.py
pmcollectl.py
pcp2graphite.py
pmiostat.py
pmatop.py (maybe)

... and that's approximately every single one, when invoked as
"python3 FOO.py" instead of "python FOO.py".
Comment 4 Bohuslav "Slavek" Kabrda 2015-02-23 07:27:12 EST
Ok, so it seems that we'll have to revert after all for F22 [1]. All the effort is not lost, we're still doing this for F23. I'll revert this myself, no need for action on your end (for F22). This should give plenty of time to fix anything that doesn't work with Python 3 for F23.
Thanks.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4
Comment 5 Bohuslav "Slavek" Kabrda 2015-02-23 08:41:38 EST
Reverted for F22 in pcp-3.10.2-3.fc22 - http://koji.fedoraproject.org/koji/taskinfo?taskID=9038696

Due to Franks comment 3, I'm leaving this in assigned. We still need to do this for F23.
Comment 6 Frank Ch. Eigler 2015-02-23 08:57:58 EST
Sorry - the above testing was prior to the most recent pcp commit #21205e44.
But things are not all well afterwards either (pcp2graphite e.g.).  Plus
it's not obvious to me what to make of errors like:

% python3 ./pmatop/pmatop.py
Traceback (most recent call last):
  File "./pmatop/pmatop.py", line 921, in <module>
    status = curses.wrapper(main)   # pylint: disable-msg=C0103
  File "/usr/lib64/python3.4/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "./pmatop/pmatop.py", line 799, in main
    (delta, errmsg) = pmc.pmParseInterval(str(opts.interval_arg) + " seconds")
  File "/usr/lib64/python3.4/site-packages/pcp/pmapi.py", line 1877, in pmParseInterval
    return (timeval.fromInterval(interval), '')
  File "/usr/lib64/python3.4/site-packages/pcp/pmapi.py", line 180, in fromInterval
    status = LIBPCP.pmParseInterval(interval, byref(tvp), byref(errmsg))

when running without the modified pcp-python* libraries installed.

Was there any testing done to see if preexisting python2 scripts/pmdas
(run with normal python2) can run against the new-current pmapi/pmda
bindings?
Comment 7 Nathan Scott 2015-02-23 16:10:42 EST
> Sorry - the above testing was prior to the most recent pcp commit #21205e44.

These remaining issues are known and were discussed on fedora-python yesterday - the plan being to get an immediate update in now so that others can proceed with building python3-only images for things like atomic host, and a second update later this week will resolve the remaining issues in the handful of monitor tools that are affected.

> Was there any testing done [...]

If you look, you will see the patch includes a significant number of test updates as well (e.g. all py PMDAs are now known working & verified both py2/3).  There are some known issues that are limited to a handful of client tools, as discussed yesterday, and they will be resolved forthwith.
Comment 8 Fedora Update System 2015-03-03 10:16:29 EST
pcp-3.10.3-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/pcp-3.10.3-1.el5
Comment 9 Fedora Update System 2015-03-03 10:17:55 EST
pcp-3.10.3-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/pcp-3.10.3-1.fc22
Comment 10 Fedora Update System 2015-03-03 10:19:06 EST
pcp-3.10.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/pcp-3.10.3-1.fc21
Comment 11 Fedora Update System 2015-03-03 10:20:14 EST
pcp-3.10.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/pcp-3.10.3-1.fc20
Comment 12 Fedora Update System 2015-03-04 16:07:36 EST
Package pcp-3.10.3-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pcp-3.10.3-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3082/pcp-3.10.3-1.fc22
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2015-03-13 12:56:55 EDT
pcp-3.10.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2015-03-13 13:07:27 EDT
pcp-3.10.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2015-03-13 13:15:14 EDT
pcp-3.10.3-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2015-03-25 16:06:30 EDT
pcp-3.10.3-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.