Skip to content

Bug 1873414: Install python3 in ubi8 base to emulate ubi7#34

Merged
bparees merged 1 commit intoopenshift:masterfrom
jupierce:python3_in_base
Aug 28, 2020
Merged

Bug 1873414: Install python3 in ubi8 base to emulate ubi7#34
bparees merged 1 commit intoopenshift:masterfrom
jupierce:python3_in_base

Conversation

@jupierce
Copy link
Copy Markdown
Contributor

@jupierce jupierce commented Aug 28, 2020

ubi7 had python2 available for direct user consumption by default. ubi8 dropped this and instead has python3 installed, but only available internally for utilities like yum. By explicitly installing it here, we hope to satisfy the older assumptions layered images have on the openshift base.
Layered images that have python2 specific code will need to modify that code (recommended) or explicitly install python2 in their Dockerfile and use alternatives to make it their default.

@yselkowitz
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@yselkowitz: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jupierce, yselkowitz
To complete the pull request process, please assign smarterclayton
You can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yselkowitz
Copy link
Copy Markdown
Contributor

/retitle Bug 1873414: Install python3 in ubi8 base to emulate ubi7

@openshift-ci-robot openshift-ci-robot changed the title Install python3 in ubi8 base to emulate ubi7 Bug 1873414: Install python3 in ubi8 base to emulate ubi7 Aug 28, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label Aug 28, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jupierce: This pull request references Bugzilla bug 1873414, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1873414: Install python3 in ubi8 base to emulate ubi7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 28, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jupierce: This pull request references Bugzilla bug 1873414, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1873414: Install python3 in ubi8 base to emulate ubi7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yselkowitz
Copy link
Copy Markdown
Contributor

Is this trying to be built as both base-7 and base-8?? The alternatives would probably only work on 8.

Comment thread base/Dockerfile.rhel Outdated
if [ ! -e /usr/bin/yum ]; then ln -s /usr/bin/microdnf /usr/bin/yum; fi && \
echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
alternatives --set python /usr/bin/python3 && \
Copy link
Copy Markdown
Contributor

@yselkowitz yselkowitz Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this needs to be buildable for both 7 and 8 (ugh, why?), then something like:

        ( test -e /usr/bin/python || alternatives --set python /usr/bin/python3) && \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, but that would mean that we're installing python3 alongside python2 in base-7

Comment thread base/Dockerfile.rhel
if [ ! -e /usr/bin/yum ]; then ln -s /usr/bin/microdnf /usr/bin/yum; fi && \
echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
( test -e /usr/bin/python || ( yum install -y --setopt=tsflags=nodocs python3 && alternatives --set python /usr/bin/python3 ) ) && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought exactly.

@jupierce
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-upgrade

@bparees
Copy link
Copy Markdown
Contributor

bparees commented Aug 28, 2020

hard to see how this makes things worse. merging and we can quick revert if i'm wrong.

@bparees bparees merged commit 0d6d354 into openshift:master Aug 28, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@jupierce: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state.

Bugzilla bug 1873414 has not been moved to the MODIFIED state.

Details

In response to this:

Bug 1873414: Install python3 in ubi8 base to emulate ubi7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants