Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# file: workstations.yml
- hosts: all
remote_user: root
vars:
ansible_python_interpreter: /usr/bin/python3
roles:
- common
2 changes: 1 addition & 1 deletion roles/common/tasks/ntp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- ntp

- name: be sure ntpd is running
systemd: name=ntpd state=running
systemd: name=ntpd state=started
ignore_errors: yes
tags:
- install
Expand Down
25 changes: 18 additions & 7 deletions roles/netfs/tasks/lizardfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,26 @@
- nfs
- lizardfs

#- name: install bindfs and lizardfs-client
# dnf: name={{ item }} state=installed
# with_items:
# - bindfs
# - lizardfs-client
# tags:
# - install
# - nfs
# - lizardfs

- name: install bindfs and lizardfs-client
dnf: name={{ item }} state=installed
with_items:
- bindfs
- lizardfs-client
dnf:
name:
- bindfs
- lizardfs-client
state: present
tags:
- install
- nfs
- lizardfs
- install
- nfs
- lizardfs

- name: install LizardFS config files
copy: src={{ branch }}/{{ item }} dest=/etc/mfs/{{ item }} mode=0600
Expand Down
2 changes: 1 addition & 1 deletion roles/workstations-common/tasks/cups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- print

- name: be sure cups and cups-browsed are running
systemd: name={{item}} state=running
systemd: name={{item}} state=started
ignore_errors: yes
with_items:
- cups
Expand Down
79 changes: 68 additions & 11 deletions roles/workstations-common/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@

- name: install python-dnf
dnf: name="python-dnf"
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 22
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 22 and ansible_distribution_major_version|int <= 29
tags:
- install
- packages
- repo
- languages
- fonts

- name: install python3-dnf
dnf: name="python3-dnf"
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 30
tags:
- install
- packages
Expand Down Expand Up @@ -89,13 +99,24 @@

- name: install GNOME Desktop for >= F21
command: "{{yum}} -y groupinstall workstation-product-environment"
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 21
#command: "{{yum}} -y groupinstall GNOME Desktop Environment"
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 21 and ansible_distribution_major_version|int < 30
register: workstation_install_result
changed_when: '"Nothing to do" in workstation_install_result.stderr'
tags:
- install
- packages

- name: install GNOME Desktop for >= F30
command: "dnf -y groupinstall workstation-product-environment"
#command: "{{yum}} -y groupinstall GNOME-Desktop-Environment"
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 30
register: workstation_install_result
changed_when: '"Nothing to do" in workstation_install_result.stderr'
tags:
- install
- packages

- name: check whether CUDA-enabled Blender is installed
command: rpm -q blender-cuda
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 25 and ansible_distribution_major_version|int < 27
Expand Down Expand Up @@ -141,7 +162,7 @@

- name: install NVIDIA binary driver from RPM Fusion
dnf: name={{item}}
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 27
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 27 and ansible_distribution_major_version|int < 28
with_items:
- xorg-x11-drv-nvidia
- xorg-x11-drv-nvidia-libs
Expand All @@ -154,6 +175,21 @@
- install
- packages

- name: install NVIDIA binary driver from RPM Fusion
dnf: name={{item}}
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 28
with_items:
- xorg-x11-drv-nvidia-390xx
- xorg-x11-drv-nvidia-390xx-libs
- xorg-x11-drv-nvidia-390xx-libs.i686
- xorg-x11-drv-nvidia-390xx-cuda-libs
- xorg-x11-drv-nvidia-390xx-cuda-libs.i686
- akmod-nvidia-390xx
- nvidia-settings-390xx
tags:
- install
- packages

- name: clear out rpm locks
command: rpm -q kernel-core
changed_when: False
Expand All @@ -162,6 +198,7 @@
- atomic
- akmods
- packages

- name: get installed kernels
command: rpm -q kernel-core --qf="%{version}-%{release}.%{arch}\n"
changed_when: False
Expand All @@ -172,13 +209,13 @@
- akmods
- packages

#- name: install kernel modules
# dnf: name=kernel-modules-{{item}}
# with_items: kernel.stdout_lines
# tags:
# - akmods
# - install
# - packages
- name: install kernel modules
dnf: name=kernel-modules
with_items: kernel.stdout_lines
tags:
- akmods
- install
- packages

- name: run akmods
command: akmods --kernels {{item}}
Expand Down Expand Up @@ -208,7 +245,7 @@
tags:
- install
- packages

- name: check that /etc/default/grub exists
stat: path=/etc/default/grub
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 25
Expand Down Expand Up @@ -363,6 +400,7 @@

- name: install EFI bootloader utils
dnf: name={{item}}
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int < 28
with_items:
- grub2-efi-x64
- grub2
Expand All @@ -374,6 +412,18 @@
- install
- bootloader

- name: install EFI bootloader utils for fedora 28
dnf: name={{item}}
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 28
with_items:
- grub2-efi-x64
- grub2
- efibootmgr
- efivar
tags:
- install
- bootloader

- name: install HP drivers
dnf: name={{item}}
with_items:
Expand All @@ -385,3 +435,10 @@
- install
- bootloader
- hpplugin

- name: install java-1.8.0-openjdk
command: dnf -y install java-1.8.0-openjdk
when: ansible_distribution == "Fedora" and ansible_distribution_major_version|int >= 28
tags:
- java
- packages
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
cd /usr/share/demo-client
python demo-client.py
python3 demo-client.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,16 @@
From eb0bf02a2d8a10b734a55effa76f5fa6b021ac8f Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <jdieter@gmail.com>
Date: Wed, 24 Jan 2018 12:00:34 +0200
Subject: [PATCH] background.js: destroy old background object after swapping

Currently BackgroundManager._swapBackgroundActor doesn't destroy the
old background object after swapping it out.

Because each new background has a new clock object, failure to destroy
the background objects leads to a timerfd leak from the clock objects,
which then causes the system to run out of file descriptors.

To fix this, we've changed the Background class to Extend:
Meta.Background, and we destroy the background in _swapBackgroundActor
rather than running run_dispose() on it. We also no longer destroy the
background in BackgroundSource when the background has been changed
because it will be automatically destroyed when _swapBackgroundActor is
run as the change finishes.

Please note that this doesn't prevent timerfds from accumulating,
as they are only released when automatic garbage collection is run, so we
have taken the final step of putting the clock in the BackgroundCache, and
reusing it from there.

https://bugzilla.gnome.org/show_bug.cgi?id=790531

Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
---
js/ui/background.js | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/js/ui/background.js b/js/ui/background.js
index 3ea7900e7..545caebca 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -145,6 +145,7 @@ var BackgroundCache = new Lang.Class({
diff -urb js/ui/background.js js2/ui/background.js
--- a/js/ui/background.js 2019-02-10 22:03:17.160835583 +0200
+++ b/js/ui/background.js 2019-02-10 22:05:36.123342025 +0200
@@ -145,6 +145,7 @@
this._fileMonitors = {};
this._backgroundSources = {};
this._animations = {};
+ this._clock = null;
},

monitorFile: function(file) {
@@ -197,6 +198,12 @@ var BackgroundCache = new Lang.Class({
}));
monitorFile(file) {
@@ -165,6 +166,12 @@
this._fileMonitors[key] = monitor;
},

+ getWallClock: function() {
Expand All @@ -51,118 +19,16 @@ index 3ea7900e7..545caebca 100644
+ return this._clock;
+ },
+
getBackgroundSource: function(layoutManager, settingsSchema) {
// The layoutManager is always the same one; we pass in it since
// Main.layoutManager may not be set yet
@@ -232,6 +239,7 @@ function getBackgroundCache() {

var Background = new Lang.Class({
Name: 'Background',
+ Extends: Meta.Background,

_init: function(params) {
params = Params.parse(params, { monitorIndex: 0,
@@ -240,8 +248,7 @@ var Background = new Lang.Class({
file: null,
style: null });

- this.background = new Meta.Background({ meta_screen: global.screen });
- this.background._delegate = this;
+ this.parent({ meta_screen: global.screen });

this._settings = params.settings;
this._file = params.file;
@@ -252,7 +259,8 @@ var Background = new Lang.Class({
getAnimation(params) {
params = Params.parse(params, { file: null,
settingsSchema: null,
@@ -252,7 +259,8 @@
this._cancellable = new Gio.Cancellable();
this.isLoaded = false;

- this._clock = new GnomeDesktop.WallClock();
+ let cache = getBackgroundCache();
+ let cache = getBackgroundCache()
+ this._clock = cache.getWallClock();
this._timezoneChangedId = this._clock.connect('notify::timezone',
Lang.bind(this, function() {
() => {
if (this._animation)
@@ -298,6 +306,7 @@ var Background = new Lang.Class({
if (this._settingsChangedSignalId != 0)
this._settings.disconnect(this._settingsChangedSignalId);
this._settingsChangedSignalId = 0;
+ this.run_dispose();
},

updateResolution: function() {
@@ -337,9 +346,9 @@ var Background = new Lang.Class({
let shadingType = this._settings.get_enum(COLOR_SHADING_TYPE_KEY);

if (shadingType == GDesktopEnums.BackgroundShading.SOLID)
- this.background.set_color(color);
+ this.set_color(color);
else
- this.background.set_gradient(shadingType, color, secondColor);
+ this.set_gradient(shadingType, color, secondColor);
},

_watchFile: function(file) {
@@ -375,13 +384,13 @@ var Background = new Lang.Class({
let finish = Lang.bind(this, function() {
this._setLoaded();
if (files.length > 1) {
- this.background.set_blend(files[0], files[1],
+ this.set_blend(files[0], files[1],
this._animation.transitionProgress,
this._style);
} else if (files.length > 0) {
- this.background.set_file(files[0], this._style);
+ this.set_file(files[0], this._style);
} else {
- this.background.set_file(null, this._style);
+ this.set_file(null, this._style);
}
this._queueUpdateAnimation();
});
@@ -454,7 +463,7 @@ var Background = new Lang.Class({
},

_loadImage: function(file) {
- this.background.set_file(file, this._style);
+ this.set_file(file, this._style);
this._watchFile(file);

let cache = Meta.BackgroundImageCache.get_default();
@@ -596,7 +605,6 @@ var BackgroundSource = new Lang.Class({

background._changedId = background.connect('changed', Lang.bind(this, function() {
background.disconnect(background._changedId);
- background.destroy();
delete this._backgrounds[monitorIndex];
}));

@@ -719,7 +727,7 @@ var BackgroundManager = new Lang.Class({
time: FADE_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: function() {
- oldBackgroundActor.background.run_dispose();
+ oldBackgroundActor.background.destroy();
oldBackgroundActor.destroy();
}
});
@@ -739,7 +747,7 @@ var BackgroundManager = new Lang.Class({

this._newBackgroundActor = newBackgroundActor;

- let background = newBackgroundActor.background._delegate;
+ let background = newBackgroundActor.background;

if (background.isLoaded) {
this._swapBackgroundActor();
@@ -759,7 +767,7 @@ var BackgroundManager = new Lang.Class({
let background = this._backgroundSource.getBackground(this._monitorIndex);
let backgroundActor = new Meta.BackgroundActor({ meta_screen: global.screen,
monitor: this._monitorIndex,
- background: background.background,
+ background: background,
vignette: this._vignette,
vignette_sharpness: 0.5,
brightness: 0.5,
--
2.14.3

Loading