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

ansible: add Python 3 to centos7-arm64 hosts #2585

Merged
merged 1 commit into from Apr 8, 2021

Conversation

richardlau
Copy link
Member

Installs Python 3.8, enabled via . /opt/rh/rh-python38/enable.

Refs: #2507

Currently Node.js 14 and later will build with Python 3. This maps to where we currently use gcc 8 to compile on arm64:

[ /^centos[67]-(arm)?(64|32)-gcc6/, anyType, gte(14) ], // 14.x: gcc6 builds stop
[ /^centos7-(arm)?(64)-gcc8/, anyType, lt(14) ], // 14.x: gcc8 builds start

@targos
Copy link
Member

targos commented Mar 22, 2021

Did you execute it? Can I try a new run for nodejs/node#37764 ?

@richardlau
Copy link
Member Author

Did you execute it? Can I try a new run for nodejs/node#37764 ?

Yes -- tested against Node.js master at least, with builds queued for v10.x-staging and v12.x-staging to check I haven't broken anything. #2576 is now done, so please request a new run for nodejs/node#37764. I think maybe the Pi's will fail (the Pi's themselves have Python 3 but they run builds in docker containers that do not) but it would good to flush out any of the x64 platforms that don't have Python 3 available (again I suspect the docker containers might need to be updated).

Installs Python 3 (3.6.8 at this time).
@richardlau
Copy link
Member Author

I'm going to rework this. I'm currently installing rh-python38-python because trying to install python3 doesn't work due to a repository error:

yum install python3
[root@test-packetnet-centos7-arm64-1 ~]# yum install python3
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.facebook.net
 * epel: ewr.edge.kernel.org
 * extras: mirror.facebook.net
 * updates: mirror.facebook.net
http://mirror.ewr1.packet.net/centos/7/os/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

http://mirror.ewr1.packet.net/centos/7/extras/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
http://mirror.ewr1.packet.net/centos/7/updates/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package python3.aarch64 0:3.6.8-18.el7 will be installed
--> Processing Dependency: python3-libs(aarch-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.aarch64
--> Processing Dependency: python3-setuptools for package: python3-3.6.8-18.el7.aarch64
--> Processing Dependency: python3-pip for package: python3-3.6.8-18.el7.aarch64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.aarch64
--> Running transaction check
---> Package python3-libs.aarch64 0:3.6.8-18.el7 will be installed
---> Package python3-pip.noarch 0:9.0.3-8.el7 will be installed
---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================
 Package                                   Arch                           Version                               Repository                             Size
============================================================================================================================================================
Installing:
 python3                                   aarch64                        3.6.8-18.el7                          packet-updates                         70 k
Installing for dependencies:
 python3-libs                              aarch64                        3.6.8-18.el7                          packet-updates                        6.5 M
 python3-pip                               noarch                         9.0.3-8.el7                           base                                  1.6 M
 python3-setuptools                        noarch                         39.2.0-10.el7                         base                                  629 k

Transaction Summary
============================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 8.8 M
Installed size: 49 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
python3-3.6.8-18.el7.aarch64.r FAILED
http://mirror.ewr1.packet.net/centos/7/updates/aarch64/Packages/python3-3.6.8-18.el7.aarch64.rpm: [Errno 14] HTTP Error 404 - Not Found   0 B  --:--:-- ETA
Trying other mirror.
python3-libs-3.6.8-18.el7.aarc FAILED
http://mirror.ewr1.packet.net/centos/7/updates/aarch64/Packages/python3-libs-3.6.8-18.el7.aarch64.rpm: [Errno 14] HTTP Error 404 - Not FoundB  --:--:-- ETA
Trying other mirror.
(1/4): python3-setuptools-39.2.0-10.el7.noarch.rpm                                                                                   | 629 kB  00:00:00
(2/4): python3-pip-9.0.3-8.el7.noarch.rpm                                                                                            | 1.6 MB  00:00:00


Error downloading packages:
  python3-libs-3.6.8-18.el7.aarch64: [Errno 256] No more mirrors to try.
  python3-3.6.8-18.el7.aarch64: [Errno 256] No more mirrors to try.

[root@test-packetnet-centos7-arm64-1 ~]#
[root@test-packetnet-centos7-arm64-1 ~]# yum repolist
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.facebook.net
 * epel: ewr.edge.kernel.org
 * extras: mirror.facebook.net
 * updates: mirror.facebook.net
http://mirror.ewr1.packet.net/centos/7/os/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

http://mirror.ewr1.packet.net/centos/7/extras/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
http://mirror.ewr1.packet.net/centos/7/updates/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
repo id                                                         repo name                                                                             status
base/7/aarch64                                                  CentOS-7 - Base                                                                        7629
epel/aarch64                                                    Extra Packages for Enterprise Linux 7 - aarch64                                       12988
extras/7/aarch64                                                CentOS-7 - Extras                                                                       465
!packet-base/7/aarch64                                          CentOS-7 - Base                                                                        7629
!packet-extras/7/aarch64                                        CentOS-7 - Extras                                                                       453
!packet-updates/7/aarch64                                       CentOS-7 - Updates                                                                      522
sclo-aarch64/7                                                  CentOS-7 - AArch64 SCLo                                                                5144
updates/7/aarch64                                               CentOS-7 - Updates                                                                     1389
repolist: 36219
[root@test-packetnet-centos7-arm64-1 ~]#

The 404'ing packet-* repositories are coming from /etc/yum.repos.d/packet.repo -- if I temporarily move that file away from that directory then yum is able to install python3 from updates/7/aarch64 (instead of failing to install from packet-updates/7/aarch64). Using the python3 package will be consistent with the other centos7 platforms (including x64, which I'll add) and avoids us having to enable the package/edit paths like we have to do with the rh-python38-python package.

@richardlau
Copy link
Member Author

I ran

ansible  "*centos7-arm64-*" -m shell -a "mv /etc/yum.repos.d/packet.repo ./packet.repo"

to move packet.repo out of /etc/yum.repos.d and that lets ansible install python3 with the changes in this PR. PTAL.

@richardlau richardlau merged commit 7079715 into nodejs:master Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants