Bug 1024357

Summary: cloud-init: Use Python 3 instead of Python 2
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: cloud-initAssignee: Garrett Holmstrom <gholms>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, bkabrda, gholms, Jan.van.Eldik, mattdm, p, shardy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cloud-init-0.7.6-4.20140218bzr1060.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-12 17:50:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 988304, 1024363, 1024365, 1195004    
Bug Blocks: 1014209, 1194577    

Description Miro Hrončok 2013-10-29 13:59:14 UTC
Hi, we would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.

https://fedoraproject.org/wiki/Changes/Python_3_as_Default

According to FESCo, we should firstly focus on the cloud image.

From that perspective, your package is considered as IMPORTANT - that means, is has to be updated to Python 3, for our intention come true.

The goal here is, that for F22 you should use Python 3 instead of Python 2 in this package.

Please, help us update to Python 3 flawlessly.

Check if upstream already support Python 3, if yes, use it and add the support to the package.

If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help.

When upstream is dead or unwilling to support Python 3, say so and we can solve the problem together.

Chances are, that you ARE the upstream. In that case, everything is easier, just do it yourself.

There is a table on wiki, that should list your package. Chances are, that you can see an upstream link that covers the problem. Anyway, please update the table with information you know.

https://fedoraproject.org/wiki/User:Churchyard/python3

I offer my help with this task, so if you have no idea, how to work on this, or it is just not your priority, don't hesitate to ask for help.

(As you've already realized, this is a bulk text, so if something is not quite exact about your package, sorry for that, just ask)

Comment 1 Miro Hrončok 2013-11-01 14:35:16 UTC
https://bugs.launchpad.net/cloud-init/+bug/1247132

Comment 2 Miro Hrončok 2015-02-18 14:50:44 UTC
Hi Garrett, for our Python 3 as default feature, we would really need cloud-init to use Python 3 in rawhide (F22) by 24.2.

Upstream already merged the patches, but didn't yet made a release. Would you please take what is in upstream bazaar and package it as a pre-release, so we can make it in time? I'm almost sure next release will hit use before the release of Fedora 22, so we can ship a non pre-release package for it once available.

I'm also willing to do the packaging if you let me.

Comment 3 Miro Hrončok 2015-02-18 14:51:25 UTC
s/hit use/hit us/

Comment 4 Garrett Holmstrom 2015-02-20 01:43:28 UTC
Upstream's python3 work is still very much ongoing, so while this may be okay for rawhide, I am reluctant to simply dump code that is this unstable into F22 because it carries such a high risk of breaking cloud image testing completely.  Cloud-init updates have historically been quite conservative because we can't update a cloud image once it has shipped.  A few people are working on a system for shipping updated images, but that isn't ready yet.

There are a couple ways we could work on that without breaking F22, though:

    1.  Build against python3 in rawhide and update F22 if ready before beta.
    2.  Build against python3 in a COPR and update F22 if ready before beta.

Either way, this should definitely go into rawhide, and a COPR shouldn't be too much work.  What do you think?

Comment 5 Bohuslav "Slavek" Kabrda 2015-02-20 07:39:24 UTC
Would it make sense to switch to Python 3 now and if some serious bugs are introduced, then switch back to Python 2 before Beta? At this point, so many packages have been switched that I'd say switching them back would mean more work for us than helping you fix cloud-init if it breaks.
But of course it's your decision and I understand your POV, so we'll help you no matter which way you choose.

Comment 6 Garrett Holmstrom 2015-02-22 21:14:45 UTC
After updating the package to cloud-init's current mainline code I grabbed the latest F22 cloud base image out of koji, updated cloud-init, updated libselinux-python3 with a fix for bug 1195004, and installed dhcp-client, which was, for whatever reason, missing.  At that point I had something I could boot and log into on EC2.  Looks like we've got our starting point.  8^)

Comment 7 Miro Hrončok 2015-02-22 21:33:08 UTC
Note: All that, running on Python 3 powered cloud-inid

Comment 8 Miro Hrončok 2015-02-23 09:44:27 UTC
BTW the specfile is here: https://github.com/gholms/cloud-init-rpmspec

Comment 9 Bohuslav "Slavek" Kabrda 2015-02-23 12:25:19 UTC
Ok, so it seems that we'll have to revert after all for F22 [1]. Please only build this for F23 (so this doesn't need to be built today). Thanks.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1194577#c4

Comment 10 Garrett Holmstrom 2015-02-23 22:55:25 UTC
I built this in rawhide for now.  Let's stick with stable cloud-init in F22 until libselinux-python3 works well enough to not break things.

Comment 11 Jaroslav Reznik 2015-03-03 17:18:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22