[libvirt] [jenkins-ci PATCH 0/3] guests: Fixes for development releases

Andrea Bolognani (3): guests: Use non-debug kernel on Fedora Rawhide ansible: Use ansible_distribution_release on FreeBSD guests: Add Debian sid and FreeBSD -CURRENT guests/files/fedora-rawhide-kernel-nodebug.repo | 8 +++ guests/host_vars/libvirt-debian-sid/install.yml | 3 ++ guests/host_vars/libvirt-debian-sid/main.yml | 19 +++++++ guests/host_vars/libvirt-debian-sid/vault.yml | 8 +++ guests/host_vars/libvirt-freebsd-current/main.yml | 25 +++++++++ guests/host_vars/libvirt-freebsd-current/vault.yml | 8 +++ guests/tasks/base.yml | 61 ++++++++++++++-------- 7 files changed, 111 insertions(+), 21 deletions(-) create mode 100644 guests/files/fedora-rawhide-kernel-nodebug.repo create mode 100644 guests/host_vars/libvirt-debian-sid/install.yml create mode 100644 guests/host_vars/libvirt-debian-sid/main.yml create mode 100644 guests/host_vars/libvirt-debian-sid/vault.yml create mode 100644 guests/host_vars/libvirt-freebsd-current/main.yml create mode 100644 guests/host_vars/libvirt-freebsd-current/vault.yml -- 2.13.6

By default, Fedora Rawhide uses a kernel with a lot of debug options enable. This is very useful for the development of Rawhide itself, but also causes a pretty significant performance penalty. Enable the fedora-rawhide-kernel-nodebug, with higher than default priority, to make sure the non-debug kernels are picked up instead of the debug ones. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/files/fedora-rawhide-kernel-nodebug.repo | 8 ++++ guests/tasks/base.yml | 52 +++++++++++++++---------- 2 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 guests/files/fedora-rawhide-kernel-nodebug.repo diff --git a/guests/files/fedora-rawhide-kernel-nodebug.repo b/guests/files/fedora-rawhide-kernel-nodebug.repo new file mode 100644 index 0000000..76198dc --- /dev/null +++ b/guests/files/fedora-rawhide-kernel-nodebug.repo @@ -0,0 +1,8 @@ +[fedora-rawhide-kernel-nodebug] +name=Rawhide kernels built without debugging turned on +baseurl=https://dl.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/$basearch +enabled=1 +skip_if_unavailable=0 +metadata_expire=6h +gpgcheck=0 +priority=90 diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index a71e66d..abfd6a1 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -33,6 +33,30 @@ - ( os_name == 'CentOS' or os_name == 'Fedora' ) +- name: Bootstrap the package module + command: apt-get install -y python-apt + args: + creates: /usr/lib/python2*/*-packages/apt + warn: no + when: + - package_format == 'deb' + +- name: Bootstrap the package module + command: dnf install -y python2-dnf + args: + creates: /usr/lib*/python2*/*-packages/dnf + warn: no + when: + - os_name == 'Fedora' + +- name: Permit file editing on SELinux-enabled systems + package: + name: libselinux-python + state: present + when: + - ( os_name == 'CentOS' or + os_name == 'Fedora' ) + - name: Enable jessie-backports repository copy: src: files/jessie-backports.sources @@ -53,21 +77,15 @@ - os_name == 'Debian' - os_version == '8' -- name: Bootstrap the package module - command: apt-get install -y python-apt - args: - creates: /usr/lib/python2*/*-packages/apt - warn: no - when: - - package_format == 'deb' - -- name: Bootstrap the package module - command: dnf install -y python2-dnf - args: - creates: /usr/lib*/python2*/*-packages/dnf - warn: no +- name: Enable fedora-rawhide-kernel-nodebug repository + copy: + src: files/fedora-rawhide-kernel-nodebug.repo + dest: /etc/yum.repos.d/fedora-rawhide-kernel-nodebug.repo + owner: root + group: root when: - os_name == 'Fedora' + - os_version == 'Rawhide' - name: Update installed packages package: @@ -106,14 +124,6 @@ with_items: - nano -- name: Permit file editing on SELinux-enabled systems - package: - name: libselinux-python - state: present - when: - - ( os_name == 'CentOS' or - os_name == 'Fedora' ) - - name: Configure hostname hostname: name: '{{ inventory_hostname }}' -- 2.13.6

On Mon, Oct 23, 2017 at 01:35:36PM +0200, Andrea Bolognani wrote:
By default, Fedora Rawhide uses a kernel with a lot of debug options enable. This is very useful for the development of Rawhide itself, but also causes a pretty significant performance penalty.
Enable the fedora-rawhide-kernel-nodebug, with higher than default priority, to make sure the non-debug kernels are picked up instead of the debug ones.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/files/fedora-rawhide-kernel-nodebug.repo | 8 ++++ guests/tasks/base.yml | 52 +++++++++++++++---------- 2 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 guests/files/fedora-rawhide-kernel-nodebug.repo
This should be split into two commits, it moves some code and adds a new one. Pavel

In general, we can rely on ansible_distribution_major_version for a quick way to figure out the OS version; however, when it comes to FreeBSD's -CURRENT snapshots, that variable is not available, which causes the playbook to fail. Work around the problem by always extracting the OS version from ansible_distribution_release, which is available even on -CURRENT. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/tasks/base.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index abfd6a1..64fbabd 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -4,6 +4,7 @@ os_name: '{{ ansible_distribution }}' os_version: '{{ ansible_distribution_major_version }}' when: + - ansible_distribution != 'FreeBSD' - ansible_distribution_release != 'Rawhide' - name: Set additional facts (OS) @@ -11,8 +12,16 @@ os_name: '{{ ansible_distribution }}' os_version: Rawhide when: + - ansible_distribution != 'FreeBSD' - ansible_distribution_release == 'Rawhide' +- name: Set additional facts (OS) + set_fact: + os_name: '{{ ansible_distribution }}' + os_version: '{{ ansible_distribution_release|regex_replace("^(\d+)\.\d+-.*$", "\1") }}' + when: + - ansible_distribution == 'FreeBSD' + - name: Set additional facts (package format) set_fact: package_format: deb -- 2.13.6

We already have support for Fedora's development branch; it only makes sense to include Debian's and FreeBSD's as well. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/host_vars/libvirt-debian-sid/install.yml | 3 +++ guests/host_vars/libvirt-debian-sid/main.yml | 19 ++++++++++++++++ guests/host_vars/libvirt-debian-sid/vault.yml | 8 +++++++ guests/host_vars/libvirt-freebsd-current/main.yml | 25 ++++++++++++++++++++++ guests/host_vars/libvirt-freebsd-current/vault.yml | 8 +++++++ 5 files changed, 63 insertions(+) create mode 100644 guests/host_vars/libvirt-debian-sid/install.yml create mode 100644 guests/host_vars/libvirt-debian-sid/main.yml create mode 100644 guests/host_vars/libvirt-debian-sid/vault.yml create mode 100644 guests/host_vars/libvirt-freebsd-current/main.yml create mode 100644 guests/host_vars/libvirt-freebsd-current/vault.yml diff --git a/guests/host_vars/libvirt-debian-sid/install.yml b/guests/host_vars/libvirt-debian-sid/install.yml new file mode 100644 index 0000000..da1c7a8 --- /dev/null +++ b/guests/host_vars/libvirt-debian-sid/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://deb.debian.org/debian/dists/sid/main/installer-amd64/ +install_config: preseed.cfg diff --git a/guests/host_vars/libvirt-debian-sid/main.yml b/guests/host_vars/libvirt-debian-sid/main.yml new file mode 100644 index 0000000..3654618 --- /dev/null +++ b/guests/host_vars/libvirt-debian-sid/main.yml @@ -0,0 +1,19 @@ +--- +projects: + - base + - jenkins + - libosinfo + - libvirt + - libvirt-glib + - libvirt-go + - libvirt-go-xml + - libvirt-perl + - libvirt-python + - libvirt-sandbox + - libvirt-tck + - osinfo-db + - osinfo-db-tools + - virt-manager + - virt-viewer + +jenkins_secret: '{{ vault.jenkins_secret }}' diff --git a/guests/host_vars/libvirt-debian-sid/vault.yml b/guests/host_vars/libvirt-debian-sid/vault.yml new file mode 100644 index 0000000..1b1dc96 --- /dev/null +++ b/guests/host_vars/libvirt-debian-sid/vault.yml @@ -0,0 +1,8 @@ +$ANSIBLE_VAULT;1.1;AES256 +37323439623333313639316164643133646332653539653361323565363063383638653330306364 +3034353335613463353865663033363136636632633138660a353139663038383835383232366133 +39373232633163306263393262396335383534363234393366386434643939396461373533383036 +3435326138653561630a616331623136663936396230613237373964323664653939303266333831 +31366463656237656336616639363738626531633535666263336666646363623538373231663132 +64626462333632633461643039363233373338343635303834646161636137633339383362613431 +646234373933646436616335313031626432 diff --git a/guests/host_vars/libvirt-freebsd-current/main.yml b/guests/host_vars/libvirt-freebsd-current/main.yml new file mode 100644 index 0000000..2931fe3 --- /dev/null +++ b/guests/host_vars/libvirt-freebsd-current/main.yml @@ -0,0 +1,25 @@ +--- +ansible_python_interpreter: /usr/local/bin/python2 + +bash: /usr/local/bin/bash +java: /usr/local/bin/java +make: /usr/local/bin/gmake +su: /usr/bin/su + +projects: + - base + - jenkins + - libosinfo + - libvirt + - libvirt-glib + - libvirt-go + - libvirt-go-xml + - libvirt-perl + - libvirt-python + - libvirt-tck + - osinfo-db + - osinfo-db-tools + - virt-manager + - virt-viewer + +jenkins_secret: '{{ vault.jenkins_secret }}' diff --git a/guests/host_vars/libvirt-freebsd-current/vault.yml b/guests/host_vars/libvirt-freebsd-current/vault.yml new file mode 100644 index 0000000..f25e7d9 --- /dev/null +++ b/guests/host_vars/libvirt-freebsd-current/vault.yml @@ -0,0 +1,8 @@ +$ANSIBLE_VAULT;1.1;AES256 +65393334613165666664623735653563656133373463353434313166623938663961376164346539 +3930373666303065633838373062343962393766313737320a663839616337623130396339356233 +37616634303036343363303733643261333338653930356466663235396337383435656236373732 +3362653061613736350a363038373533376566616239316432333666323231393031623430316164 +35386136306466303464323336396335356165643261393131396365393865616635323139303633 +35363037623463316566336162323266326164623163386465613830326437346631623165353736 +633739323661613565616331633034346466 -- 2.13.6
participants (2)
-
Andrea Bolognani
-
Pavel Hrdina