-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add support for Centos7/ppc64 #1763
Conversation
Hm, gcc-6 and gcc-4.9 aren't installed. For ubuntu, they appear to have been official packages (gcc-4.8, etc.). For 11.x, I assume it doesn't matter, we'll use devtoolset-6 for 11.x+, and only use the centos machines to build them. |
Hm, link failed on
@nodejs/v8-update any ideas on this? |
Hm, went the other way, installed |
Does this need changes in build/jenkins/scripts/select-compiler.sh Line 19 in cf02bff
, doing something like build/jenkins/scripts/select-compiler.sh Line 57 in cf02bff
? |
Yes... and no. Generally we land the ansiblization first, then the select-compiler.sh second in another PR. That said, I have the changes locally to select-compiler, and this machine isn't currently in use, and I'm very unfamiliar with the process of bringin online a set of machines that will (initially) only be used to build master.12.x.. @mhdawson the select-compiler update, want it in this PR, or another? |
Well... We don't do it very often... We'd also need to patch somewhere near build/jenkins/scripts/VersionSelectorScript.groovy Lines 51 to 53 in cf02bff
... IMO in this specific case the order or PRs is not very critical since the change will not go live until we actually add the new machines to the job matrix ( |
yum: | ||
name: "https://centos{{ ansible_distribution_major_version }}.iuscommunity.org/ius-release.rpm" | ||
state: present | ||
|
||
- name: centos7 | install sclo7 devtoolset-6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have #1765 which is for x64 centos7 and it's going to conflict with this, one of us probably needs to change, or we need to add arch exclusions. Mine is just:
- name: centos7 | install scl for devtoolset-6
when: "arch != 'arm64'"
yum:
name: centos-release-scl
state: present
and I'm not sure about the arm64 exclusion there, we might be able to get rid of the sclo aarch64 bits further down this file but it'll need some testing (which I don't have time for right now!)
@sam-github might a simple yum install centos-release-scl
work for ppc64 too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so sure what these incantations do, but I replaced mine with your example above, and am trying it on a fresh host. I'll see if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, no, I don't think that repo works for ppc64le:
TASK [baselayout : install packages] **************************************************
failed: [release-osuosl-centos7-ppc64_le-1] (item=ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel,python3) => {"changed": false, "msg": "Failure talking to yum: Cannot find a valid baseurl for repo: centos-sclo-sclo/ppc64le", "package": "ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel,python3"}
failed: [release-osuosl-centos7-ppc64_le-1] (item=automake,bash,libtool) => {"changed": false, "msg": "Failure talking to yum: Cannot find a valid baseurl for repo: centos-sclo-sclo/ppc64le", "package": "automake,bash,libtool"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reverting back to what I did, but with when: "arch == 'ppc64'"
.
Closes: #1705 |
Added groovy exclusion, added more packages to centos7, still looking around to compare to Rod's changes, and for his comments. |
@refack Sorry, I've had no success finding python 3. |
I've ansibled the 3 ppc64_le machines added in inventory.yml, several times (just doing it again now, against all 3 simultaneously, to make sure they are in same state). What's next, do we land this, or add them as ci machines to make sure the config is sufficient? |
@@ -91,6 +91,7 @@ needs_monit: [ | |||
|
|||
# some os'es needs different paths to java. add them here. | |||
java_path: { | |||
'centos7': '/home/iojs/jdk8u172-b11/bin/java', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This java path is actually specific to centos-ppc64le, but I'm not sure if any other centos7 platforms use systemd.
I re-ansibled with the correct jenkins secrets (@mhdawson set the machines up in jenkins), and realized that there was no java on the machine. Please see last commit, it works, but I'm not sure if its the right way, or what other options there are. |
so we're seeing the fruits of removing |
I'm not sure what I'm slightly horrified to see I changed how the Anyhow, I'm not sure if this is the |
@@ -18,7 +18,7 @@ def buildExclusions = [ | |||
[ /centos[67]-(arm)?(64|32)-gcc48/, anyType, gte(10) ], | |||
[ /centos[67]-(arm)?(64|32)-gcc6/, anyType, lt(10) ], | |||
[ /centos6-32-gcc6/, releaseType, gte(10) ], // 32-bit linux for <10 only | |||
[ /^centos7-64/, releaseType, lt(12) ], | |||
[ /^centos7-64/, anyType, lt(12) ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the need for this a bit more. Wondering if maybe the addition should be ppc specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In specific I'm wondering why we would not have already had the exclude for x64 in test. Do we not have centos in the test builds, that seems odd to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To start it should instead exclude running centos on versions lower than 12.x. The result should be builds on both ubuntu and centos for 12.x and above.
I am misunderstanding what you meant by that. What did you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe that applies only to centos7-ppc64? that version rule is wrong, we want the centos7-64 exclusion to only exist for releaseType
because that's how we say that centos6 should be used for making binaries prior to 12. anyType
is going to stop it even testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment was because the tag is centos7-64 and I expected changes to only be affecting ppcle in this PR.
jenkins/scripts/select-compiler.sh
Outdated
*s390x* ) SELECT_ARCH=S390X ;; | ||
*aix* ) SELECT_ARCH=AIXPPC ;; | ||
esac | ||
fi | ||
|
||
# get node version | ||
if [ -z ${NODEJS_MAJOR_VERSION+x} ]; then | ||
if [ -z "$NODEJS_MAJOR_VERSION" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering about this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous code wasn't working for me, this does. Possibly a shell difference? I am not at all sure why there was such a convoluted way of checking of the env var is set, this seems to work better:
core/build (centos7-ppc-support % u=) % if [ -z ${ZZZ+x} ]; then echo T; fi
T
core/build (centos7-ppc-support % u=) % if [ -z "$ZZZ" ]; then echo T; fi
T
core/build (centos7-ppc-support % u=) % env | grep ZZZ
Tomorrow I can revert it and post the error caused by the original line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will match both an empty string and an unset environment variable. I think this change is OK because if it's empty then it's still useless and should be re-generated, but it's a bit weird that it's necessary. In what context is NODEJS_MAJOR_VERSION
not set? Are there Jenkins jobs that aren't using the versioning plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will match both an empty string and an unset environment variable. I think this change is OK because if it's empty then it's still useless and should be re-generated, but it's a bit weird that it's necessary. In what context is
NODEJS_MAJOR_VERSION
not set? Are there Jenkins jobs that aren't using the versioning plugin?
Yes. Anything that isn't building Node.js from source but still needs to do compilation (i.e. natve addons), e.g. citgm-smoker-nobuild. node-test-node-addon-api.
@@ -4,14 +4,14 @@ if [ "$DONTSELECT_COMPILER" != "DONT" ]; then | |||
NODE_NAME=${NODE_NAME:-$HOSTNAME} | |||
echo "Selecting compiler based on $NODE_NAME" | |||
case $NODE_NAME in | |||
*ppc64_le* ) SELECT_ARCH=PPC64LE ;; | |||
*ppc64*le* ) SELECT_ARCH=PPC64LE ;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It this because the node names are inconsistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of
safe_hostname: "{{ inventory_hostname | regex_replace('_', '--') }}" |
HOSTNAME := NODE_NAME.replace(_, --)
, so select compiler's attempt to use the HOSTNAME as a default, which usually works, fails here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change should be OK, but again it's an oddity because NODE_NAME
should come from Jenkins and the only situation where it's not set is when this is run independently, I guess if this is run as an independent test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, anyone attempting to trouble shoot build issues or bootstrap a ci machine needs to read select-compiler by hand, after reading it to figure out what they should set NODE_NAME to. I added HOSTNAME as the default. If we don't want that, I can back it out. Given that ansible sets the HOSTNAME to the NODE_NAME (modulo the -
and _
), I'm not sure why this script depends on ci env vars. If this change is out of scope, I'll back it out. Its more of a public service for future users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, understood now and makes sense. The result is that you can call select-compiler.sh on the host by hand and get the right behavior without having to export NODE_NAME.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
when: os in "ubuntu1404" and arch == "ppc64" | ||
unarchive: | ||
src: /tmp/OpenJDK8_ppc64le_Linux_jdk8u172-b11.tar.gz | ||
remote_src: yes | ||
dest: /home/iojs | ||
tags: java | ||
|
||
- name: unarchive java centos7 ppc64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two stanzas have the effect of putting java in /usr/bin/java, where the systemd jenkins unit file (and anyone else) would expect it to be.
@@ -19,6 +19,7 @@ def buildExclusions = [ | |||
[ /centos[67]-(arm)?(64|32)-gcc6/, anyType, lt(10) ], | |||
[ /centos6-32-gcc6/, releaseType, gte(10) ], // 32-bit linux for <10 only | |||
[ /^centos7-64/, releaseType, lt(12) ], | |||
[ /^centos7-ppcle/, anyType, lt(12) ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the new machines are labelled centos7-ppcle
, this excludes them when node lt 12.
So Java base was not removed it was moved in https://github.com/nodejs/build/pull/1723/files ansible/roles/jenkins-worker/tasks/main.yml now has
instead. That was necessary because java base installs java to a location only created earlier on in main.yml (at least for ppc) so it could not work properly on a new machine. So it was moved (my fault as I added it to Sam's PR to get it working). It worked fine for both PPC and s390 but maybe there is something about it that does not work on other platforms? It may be because of the associated list of packages in build/ansible/roles/java-base/vars/main.yml. @rvagg we can revert if its causing problems on other platforms. @sam-github can you see if you can figure out another solution which works for ppc, s390 and other platforms? It might be something like moving the package: {} definition but I really don't know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but lets hold off landing until 12.x goes out.
I think the java-base thing should be sorted in the merged smartos18 PR that pulled its inclusion up before the |
@@ -43,7 +43,7 @@ packages: { | |||
centos7_x64: ['git2u','centos-release-scl',], # centos-release-scl is required to enable SCLo | |||
# but we do it manually in partials/repo/centos7.yml for arm64 | |||
centos7: [ | |||
'ccache,gcc-c++,devtoolset-6,sudo', | |||
'ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added git
in #1765, if it gets merged first then you'll just have to resolve that conflict
The centos7 machines will be used instead.
- Add the repository for devtoolset-6. - Do not use the "ius" repository, it doesn't support ppc64le, and was not necessary.
Landing as I think this is ready to go based on the discussion. |
necessary.
Fixes: #1705