-
Notifications
You must be signed in to change notification settings - Fork 4
Centos kernel version patch & sysctl.conf #27
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| - name: sysctl update | ||
| command: sysctl -p | ||
| command: sysctl -p | ||
| # ignore_errors: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| - name: Install base packages | ||
| yum: name={{item}} state=installed | ||
| with_items: | ||
| - curl | ||
| - unzip | ||
| - ca-certificates | ||
|
|
||
| - name: check kernel version | ||
| shell: uname -r| tr -d '.|-' |cut -c 1-7 | ||
| register: version | ||
|
|
||
| - name: uninstall firmware | ||
| yum: name={{item}} state=removed | ||
| with_items: | ||
| - kernel-firmware | ||
| when: "'{{version.stdout}}' != '2632573'" | ||
| register: newkernel | ||
|
|
||
| - name: update kernel-firmware | ||
| get_url: dest=/home/{{ansible_ssh_user}}/kernel-firmware.rpm url=ftp://fr2.rpmfind.net/linux/centos/6.7/centosplus/x86_64/Packages/kernel-firmware-2.6.32-573.18.1.el6.centos.plus.noarch.rpm mode=0644 | ||
| sudo: false | ||
| when: newkernel.changed | ||
|
|
||
| - shell: rpm -if /home/{{ansible_ssh_user}}/kernel-firmware.rpm | ||
| sudo: true | ||
| when: newkernel.changed | ||
|
|
||
| - name: Update kernel | ||
| yum: name=kernel-debug state=latest | ||
| sudo: true | ||
| when: newkernel.changed | ||
|
|
||
| - shell: grubby --set-default=/boot/vmlinuz-2.6.32-573.18.1.el6.x86_64.debug | ||
| sudo: true | ||
| when: newkernel.changed | ||
|
|
||
| - shell: sleep 2 && reboot | ||
| when: newkernel.changed | ||
| async: 1 | ||
| poll: 0 | ||
| sudo: true | ||
| ignore_errors: true | ||
|
|
||
| - name: waiting for server to come back | ||
| local_action: wait_for host={{ inventory_hostname }} state=started delay=15 timeout=120 port=22 | ||
| sudo: false | ||
| when: newkernel.changed | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| --- | ||
| - name: Restart agent service | ||
| service: name=mesos-slave state=restarted | ||
| service: name=mesos-slave state=stopped | ||
| notify: remove-metadata | ||
|
|
||
| - name: remove-metadata | ||
| file: path={{work_dir}}/meta state=absent | ||
| notify: start-agent | ||
|
|
||
| - name: start-agent | ||
| service: name=mesos-slave state=started |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,20 +8,23 @@ | |
| # | ||
| # Depends on the [mesos](mesos.md) role. | ||
| --- | ||
| - name: Set agent facts | ||
| set_fact: work_dir=/log/mesos | ||
|
|
||
| - name: Configure agent | ||
| copy: content={{item.content}} dest={{item.file}} | ||
| with_items: | ||
| - { file: '/etc/mesos/zk', content: "{{mesos_zk_url}}" } | ||
| - { file: '/etc/mesos-slave/hostname', content: "{{mesos_hostname}}" } | ||
| - { file: '/etc/mesos-slave/containerizers', content: 'docker,mesos' } | ||
| - { file: '/etc/mesos-slave/isolation', content: 'cgroups/cpu,cgroups/mem' } | ||
| - { file: '/etc/mesos-slave/executor_registration_timeout', content: '5mins' } | ||
| - { file: '/etc/mesos-slave/executor_registration_timeout', content: '2mins' } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reason for lowering this? For large docker images I think it is better to have this higher to increase the change of the download succeeding before the Mesos task fails
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually takes less than a minute, but sometimes connection fails. I will revert, if we ever see timeout on slow connections |
||
| - { file: '/etc/mesos-slave/attributes', content: "{{agent_attributes}}" } | ||
| - { file: '/etc/mesos-slave/resources', content: "{{agent_resources}}" } | ||
| - { file: '/etc/mesos-slave/credential', content: '/etc/mesos-slave/.credentials' } | ||
| - { file: '/etc/mesos-slave/fetcher_cache_size', content: "2GB" } | ||
| - { file: '/etc/mesos-slave/fetcher_cache_dir', content: "/tmp/mesos" } | ||
| - { file: '/etc/mesos-slave/work_dir', content: "/log/mesos" } | ||
| - { file: '/etc/mesos-slave/work_dir', content: "{{work_dir}}" } | ||
| notify: Restart agent service | ||
|
|
||
| - name: Configure default limits and logs | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| # Depends on the [mesos](mesos.md) role. | ||
| --- | ||
| - name: Install Mesos master packages | ||
| apt: name={{item}} state=installed | ||
| apt: name={{item}} state=installed force=yes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure it's needed, but helpful in case of downgrading |
||
| with_items: | ||
| - marathon={{marathon_version}}* | ||
| - chronos={{chronos_version}}* | ||
|
|
||
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.
Hmm, interesting way to get the version. :)
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.
was in a hurry, suggestions are welcomed
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 seems like the goal is to upgrade the kernel firmware, so suggest we do this by first enable the centosplus repo which seems to be the official source of the kernel-firmware:
and then use the
yumtask to force installation of the version listed below