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,jenkins: smartos18 in ci and ci-release #1769

Merged
merged 2 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ hosts:
smartos14-x64-1: {ip: 72.2.113.193}
smartos15-x64-1: {ip: 72.2.113.195}
smartos17-x64-1: {ip: 72.2.114.225}
smartos18-x64-1: {ip: 72.2.119.47}
ubuntu1604_arm_cross-x64-1: {ip: 72.2.114.100, user: ubuntu}

- requireio:
Expand Down Expand Up @@ -107,6 +108,8 @@ hosts:
smartos16-x64-2: {ip: 72.2.113.74}
smartos17-x64-1: {ip: 72.2.113.127}
smartos17-x64-2: {ip: 72.2.115.11}
smartos18-x64-1: {ip: 72.2.115.192}
smartos18-x64-2: {ip: 72.2.119.5}
ubuntu1604_docker-x64-1: {ip: 37.153.110.162, user: ubuntu}
ubuntu1604_arm_cross-x64-1: {ip: 165.225.136.6, user: ubuntu}
ubuntu1804-x64-1: {ip: 37.153.109.142, user: ubuntu}
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/baselayout/tasks/ccache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# This depends on ansible being able to run curl locally, YMMV, if it doesn't
# work, try changing the local_action to a remote one:
# raw: curl -sL https://www.samba.org/ftp/ccache/
local_action: command shell -sL https://www.samba.org/ftp/ccache/
local_action: command shell curl -sL https://www.samba.org/ftp/ccache/
Copy link
Member Author

Choose a reason for hiding this comment

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

removed in #1723, hopefully by accident, also I discovered that smartos is shipping with a recent enough ccache now so we don't even take this path for smartos18

Copy link
Contributor

Choose a reason for hiding this comment

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

Was in #1735, and was unintentional, sorry, I was flailing around trying to get the wget to work.

Copy link
Member Author

Choose a reason for hiding this comment

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

ohhh, yeah, been there with wget, sorry for your pain

register: ccache_html_content

- name: "ccache : extract ccache latest version"
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sshd_service_map: {
'ubuntu1404': 'ssh',
'ubuntu1204': 'ssh',
'smartos17': 'ssh',
'smartos18': 'ssh',
}

sshd_service_name: "{{ sshd_service_map[os]|default(sshd_service_map[os|stripversion])|default('sshd') }}"
Expand Down Expand Up @@ -101,6 +102,11 @@ packages: {
'gcc7'
],

smartos18: [
'gcc7',
'ccache'
],

ubuntu: [
'ccache,g++,gcc,git,libfontconfig1,sudo',
],
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/jenkins-worker/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
#

dependencies:
- { 'role': 'java-base' }
Copy link
Member Author

Choose a reason for hiding this comment

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

removed in #1723, just for debugging or speedup during dev hopefully

Copy link
Member

Choose a reason for hiding this comment

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

It was removed because the dependencies were wrong. The task that depended on it needed to create some directory locations before it would be able to be installed.

Copy link
Member

Choose a reason for hiding this comment

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

Instead, it was integrated into the task itself in the right place to satisfy ordering.

Copy link
Member Author

Choose a reason for hiding this comment

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

So this is broken for the smartos install at least, it doesn't get java installed without it. How are we supposed to handle this now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

^--- that stanza should be hit, does it not get triggered on smartos?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, here's the problem: that java-base inclusion is probably OK but it's too late because it comes after the service call service: name=jenkins state=restarted enabled=yes - so that's going to try and start jenkins but if there's no Java it'll fail, which is exactly where I was failing.

In my latest commit here, 436b080, I've removed it again from meta/main.yml and instead have moved up the include_role to just before the first startup (service) call. I don't have a bare host to test on but re-ran it on one of the smartos18 machines and watched the output and it appeared to do it in a workable order.

This isn't ideal IMO because an include_role in the middle of a set of tasks is going to get confusing for future debugging. It's probably technical debt we have to accept for now but some more refactoring is probably in order for jenkins-worker.

PTAL at latest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Your explanation makes sense to me, I ran into the issue on a fresh install, so didn't hit the restart problem.

Copy link
Member

Choose a reason for hiding this comment

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

@rvagg thanks for figuring that out. My bad as I made the move in Sam's PR. Not sure why we did not see the failure when running ansible on the machine I had to make the change for but glad you have a single solution at least for now.

- { 'role': 'gcc', when: os|startswith("rhel7") }
1 change: 1 addition & 0 deletions ansible/roles/jenkins-worker/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ java_path: {
'smartos15': '/opt/local/java/openjdk8/bin/java',
'smartos16': '/opt/local/java/openjdk8/bin/java',
'smartos17': '/opt/local/java/openjdk8/bin/java',
'smartos18': '/opt/local/java/openjdk8/bin/java',
'zos13': '/usr/lpp/java/J8.0_64/bin/java'
}

Expand Down
3 changes: 3 additions & 0 deletions jenkins/scripts/VersionSelectorScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def buildExclusions = [
[ /^smartos15/, anyType, lt(8) ],
[ /^smartos15/, anyType, gte(10) ],
[ /^smartos16/, anyType, lt(8) ],
[ /^smartos16/, anyType, gte(12) ],
[ /^smartos17/, anyType, lt(10) ],
[ /^smartos17/, anyType, gte(12) ],
[ /^smartos18/, anyType, lt(12) ],

// PPC BE ------------------------------------------------
[ /^ppcbe-ubuntu/, anyType, gte(8) ],
Expand Down