Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove python2 from CAPI Photon images #578

Open
jpeach opened this issue Apr 6, 2021 · 8 comments
Open

Remove python2 from CAPI Photon images #578

jpeach opened this issue Apr 6, 2021 · 8 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@jpeach
Copy link

jpeach commented Apr 6, 2021

The Photon 3 CAPI images install both Python2 and Python3. AFAICT cloud-init is OK with Python3, so we should be able to remove Python2 and save a bit of disk space.

@jpeach jpeach changed the title Remove python2 from CAPi Photon images Remove python2 from CAPI Photon images Apr 6, 2021
@codenrhoden
Copy link
Contributor

I think with a bit of validation this is definitely possible. Photon 3 uses Python 3 as it's default, and i'm not even positive why Python 2 is there.

Our tooling installs two RPMs that would certainly pull it in -- python-netifaces and python-requests, and it has long been something I wondered about what was requiring these (they've been there since I've been on the project). But, we can first install the Python 3 variant of them and go through testing to make sure everything is good.

on CentOS, such a switch isn't possible because the rpm package requires Python 2. Photon does not have that:

$ rpm -q --whatrequires python2
python-six-1.11.0-3.ph3.noarch
python-ipaddress-1.0.22-2.ph3.noarch
python-idna-2.7-1.ph3.noarch
python-pyparsing-2.2.0-3.ph3.noarch
python-packaging-17.1-3.ph3.noarch
python-pycparser-2.18-1.ph3.noarch
python-cffi-1.11.5-4.ph3.x86_64
python-setuptools-40.2.0-2.ph3.noarch
python-pyasn1-0.4.4-1.ph3.noarch
python-enum34-1.1.6-2.ph3.noarch
python-asn1crypto-0.24.0-1.ph3.noarch
python-cryptography-2.8-1.ph3.x86_64
python-urllib3-1.23-2.ph3.noarch
python-enum-0.4.7-2.ph3.noarch
python-pyOpenSSL-18.0.0-3.ph3.noarch
python-chardet-3.0.4-1.ph3.noarch
python-requests-2.19.1-4.ph3.noarch
python-netifaces-0.10.9-1.ph3.x86_64

$ rpm -q --whatrequires python3
python3-six-1.11.0-3.ph3.noarch
python3-idna-2.7-1.ph3.noarch
python3-markupsafe-1.0-3.ph3.x86_64
python3-jinja2-2.10-1.ph3.noarch
python3-pycparser-2.18-1.ph3.noarch
python3-cffi-1.11.5-4.ph3.x86_64
python3-pyparsing-2.2.0-3.ph3.noarch
python3-packaging-17.1-3.ph3.noarch
python3-pyasn1-0.4.4-1.ph3.noarch
python3-asn1crypto-0.24.0-1.ph3.noarch
python3-cryptography-2.8-1.ph3.x86_64
python3-pyOpenSSL-18.0.0-3.ph3.noarch
python3-urllib3-1.23-2.ph3.noarch
python3-chardet-3.0.4-1.ph3.noarch
python3-jsonpointer-2.0-1.ph3.noarch
python3-netifaces-0.10.9-1.ph3.x86_64
python3-prettytable-0.7.2-6.ph3.noarch
python3-oauthlib-2.1.0-1.ph3.noarch
python3-deepmerge-0.0.5-2.ph3.noarch
python3-requests-2.19.1-4.ph3.noarch
motd-0.1.3-5.ph3.noarch
python3-PyYAML-3.13-6.ph3.x86_64
python3-xml-3.7.5-10.ph3.x86_64
python3-setuptools-3.7.5-10.ph3.noarch
cloud-init-19.4-11.ph3.noarch
python3-pip-21.0.1-1.ph3.noarch

This is from a recent build of Photon 3 OVA with K8s 1.20.4. I don't see any system packages requiring Python 2, where as Python3 is required by motd and cloud-init.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 5, 2021
@codenrhoden
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 4, 2021
@codenrhoden
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 5, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 2, 2022
@codenrhoden
Copy link
Contributor

I know this can still be looked at. I don't want it to close.

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

5 participants