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

Use python3 to build ubuntu based Metal3-dev-env #214

Merged
merged 3 commits into from
Feb 26, 2020

Conversation

fmuyassarov
Copy link
Member

@fmuyassarov fmuyassarov commented Feb 10, 2020

Use Pyhon3 as Python2 EOL has passed.

@metal3-io-bot metal3-io-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 10, 2020
@fmuyassarov
Copy link
Member Author

/test-v1a2-integration

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov
Copy link
Member Author

/test-v1a2-integration

@fmuyassarov
Copy link
Member Author

/test-v1a2-integration

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov fmuyassarov changed the title Use Python3 to build Metal3-dev-env WIP : Use Python3 to build Metal3-dev-env Feb 11, 2020
@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 11, 2020
@@ -20,7 +20,6 @@ sudo apt -y update
# ansible uses default python2 (python-pip) to run on the local machine
sudo apt -y install \
python3-pip \
python-pip \
python-setuptools \
Copy link
Member

Choose a reason for hiding this comment

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

probably need to change this too

Copy link
Member Author

Choose a reason for hiding this comment

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

probably need to change this too

Yes, thanks

@@ -20,7 +20,6 @@ sudo apt -y update
# ansible uses default python2 (python-pip) to run on the local machine
Copy link
Member

Choose a reason for hiding this comment

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

maybe update this comment ?

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe update this comment ?

sure

@metal3-io-bot metal3-io-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 11, 2020
@fmuyassarov
Copy link
Member Author

/test-centos-integration

lib/network.sh Outdated
@@ -13,7 +13,7 @@ function network_address() {
network=$2
record=$3

result=$(python -c "import ipaddress; import itertools; print(next(itertools.islice(ipaddress.ip_network(u\"$network\").hosts(), $record - 1, None)))")
result=$(python3 -c "import ipaddress; import itertools; print(next(itertools.islice(ipaddress.ip_network(u\"$network\").hosts(), $record - 1, None)))")
Copy link
Member

Choose a reason for hiding this comment

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

We already set alternatives to python3 on CentOS/RHEL8 - could we perhaps add that for Ubuntu to avoid the need for changing these?

https://github.com/metal3-io/metal3-dev-env/blob/master/centos_install_requirements.sh#L38

Copy link
Member

Choose a reason for hiding this comment

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

Note #223 adds CentOS 8 support which we'll need to move to only python3

Copy link
Member Author

Choose a reason for hiding this comment

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

We already set alternatives to python3 on CentOS/RHEL8 - could we perhaps add that for Ubuntu to avoid the need for changing these?

https://github.com/metal3-io/metal3-dev-env/blob/master/centos_install_requirements.sh#L38

Yes, absolutely

@metal3-io-bot metal3-io-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 21, 2020
@metal3-io-bot metal3-io-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 21, 2020
@fmuyassarov fmuyassarov changed the title WIP : Use Python3 to build Metal3-dev-env Use python3 to build ubuntu based Metal3-dev-env Feb 21, 2020
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 21, 2020
@fmuyassarov
Copy link
Member Author

/test-v1a3-integration

@fmuyassarov
Copy link
Member Author

@hardys , @elfosardo I updated my commit, can you please have a look when you have time.
So, now this patch is intending to switch to python3 only for Ubuntu based metal-dev-env.

@maelk
Copy link
Member

maelk commented Feb 21, 2020

/test-v1a3-integration

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov fmuyassarov mentioned this pull request Feb 22, 2020
@fmuyassarov
Copy link
Member Author

/test-v1a3-integration

@maelk
Copy link
Member

maelk commented Feb 24, 2020

/approve
Let's wait for the move to centos 8 and then do the same for Centos

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2020
Copy link
Contributor

@jan-est jan-est left a comment

Choose a reason for hiding this comment

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

This looks good to me

@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmuyassarov, jan-est, maelk

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

The pull request process is described here

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

@maelk
Copy link
Member

maelk commented Feb 25, 2020

You will need to fix the conflict and do a rebase to run the tests properly due to the Centos change

@fmuyassarov
Copy link
Member Author

You will need to fix the conflict and do a rebase to run the tests properly due to the Centos change

Rebased

@fmuyassarov
Copy link
Member Author

/test-centos-integration

@fmuyassarov
Copy link
Member Author

/test-v1a3-integration

- python-setuptools
- python3-pip
- python3-requests
- python3-setuptools
Copy link
Member

Choose a reason for hiding this comment

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

These packages won't exist on centos7 so we shouldn't change them, we probably need to deprecate centos7 suppport or figure out a way for this to temporarily work with python2 as well as python3 (on Centos/RHEL8 and Ubuntu)

Copy link
Member

Choose a reason for hiding this comment

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

Oh I think this was addressed in the rebase commit, it may be worth squashing that into the original commit then force-pushing if you do any other updates

lib/network.sh Outdated Show resolved Hide resolved
@metal3-io-bot metal3-io-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 26, 2020
@Xenwar
Copy link
Member

Xenwar commented Feb 26, 2020

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@hardys
Copy link
Member

hardys commented Feb 26, 2020

/test-centos-integration

@hardys
Copy link
Member

hardys commented Feb 26, 2020

/test-v1a3-integration

1 similar comment
@fmuyassarov
Copy link
Member Author

/test-v1a3-integration

@metal3-io-bot metal3-io-bot merged commit be87d04 into metal3-io:master Feb 26, 2020
@fmuyassarov fmuyassarov deleted the fix/python3-feruz branch February 27, 2020 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants