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

Fedora 31 #12619

Merged
merged 2 commits into from
Sep 11, 2019
Merged
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
3 changes: 3 additions & 0 deletions bots/image-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ TRIGGERS = {
"fedora-30/firefox@weldr/cockpit-composer",
"fedora-30/edge@weldr/cockpit-composer",
],
"fedora-31": [
"fedora-31",
],
"fedora-atomic": [
"fedora-atomic",
"fedora-atomic@cockpit-project/cockpit-ostree",
Expand Down
1 change: 1 addition & 0 deletions bots/image-trigger
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ REFRESH = {
"debian-stable": { },
"fedora-29": { },
"fedora-30": { },
"fedora-31": { },
"fedora-atomic": { },
"fedora-testing": { },
"fedora-i386": { },
Expand Down
1 change: 1 addition & 0 deletions bots/images/fedora-31
23 changes: 23 additions & 0 deletions bots/images/scripts/fedora-31.bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#
# Copyright (C) 2019 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.

BASE=$(dirname $0)
# once fedora 31 is released, replace url:
# http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Server/x86_64/os/
$BASE/virt-install-fedora "$1" x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/development/31/Everything/x86_64/os/"
4 changes: 4 additions & 0 deletions bots/images/scripts/fedora-31.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash

set -e
/var/lib/testvm/fedora.install "$@"
1 change: 1 addition & 0 deletions bots/images/scripts/fedora-31.setup
38 changes: 25 additions & 13 deletions bots/images/scripts/fedora.setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ fi
# depending on how it was compiled and which plugins are installed,
# and will just silently not do it. So we do it here.
#
xfs_growfs /
if [ "$IMAGE" != fedora-31 ]; then
xfs_growfs /
fi
df -h /

echo foobar | passwd --stdin root
Expand All @@ -27,16 +29,23 @@ if [ $(uname -m) = x86_64 ]; then
HAVE_KUBERNETES=1
fi

# HACK docker not available on f31
# https://github.com/cockpit-project/cockpit/issues/12670
HAVE_DOCKER=
if [ "$1" != fedora-31 ]; then
HAVE_DOCKER=1
fi

# We install all dependencies of the cockpit packages since we want
# them to not spontaneously change from one test run to the next when
# the distribution repository is updated.
#
COCKPIT_DEPS="\
atomic \
device-mapper-multipath \
docker \
etcd \
glibc-all-langpacks \
glib-networking \
grubby \
json-glib \
kexec-tools \
libssh \
Expand All @@ -60,6 +69,8 @@ tuned \
virt-install \
"

[ -z "$HAVE_DOCKER" ] || COCKPIT_DEPS="$COCKPIT_DEPS atomic docker"

COCKPIT_DEPS="$COCKPIT_DEPS udisks2 udisks2-lvm2 udisks2-iscsi"

[ -z "$HAVE_KUBERNETES" ] || COCKPIT_DEPS="$COCKPIT_DEPS kubernetes"
Expand Down Expand Up @@ -164,23 +175,24 @@ if ! [ "$version" -eq "$version" ] 2>/dev/null; then version=30; fi
su builder -c "/usr/bin/mock --no-bootstrap-chroot --verbose -i $(/var/lib/testvm/build-deps.sh "$opsys $version")"
su builder -c "/usr/bin/mock --install --verbose rpmlint"

# HACK: docker falls over regularly, print its log if it does
systemctl start docker || journalctl -u docker

# our cockpit/base container is only really a thing on x86_64, just skip it on other arches
if [ $(uname -m) = x86_64 ]; then
docker build -t cockpit/base /var/tmp/cockpit-base
if [ -n "$HAVE_DOCKER" ]; then
# HACK: docker falls over regularly, print its log if it does
systemctl start docker || journalctl -u docker
# docker images that we need for integration testing
/var/lib/testvm/docker-images.setup
fi

# Configure kubernetes
[ -z "$HAVE_KUBERNETES" ] || /var/lib/testvm/kubernetes.setup

# docker images that we need for integration testing
/var/lib/testvm/docker-images.setup

# reduce image size
dnf clean all
/var/lib/testvm/zero-disk.setup
zd_opts=
# Offline Mock with dnf isn't happy anymore without a cache
if [ "$IMAGE" = fedora-31 ]; then
zd_opts="--keep-mock-cache"
fi
/var/lib/testvm/zero-disk.setup $zd_opts

ln -sf ../selinux/config /etc/sysconfig/selinux
printf "SELINUX=enforcing\nSELINUXTYPE=targeted\n" > /etc/selinux/config
Expand Down
7 changes: 3 additions & 4 deletions bots/images/scripts/lib/zero-disk.setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Cockpit; If not, see <http://www.gnu.org/licenses/>.

# We don't want to delete the pbuilder caches since we need them
# during build. Mock with --offline and dnf is happy without caches,
# but with yum it isn't, so we provide an option to also leave the
# mock caches in place.
# We don't want to delete the pbuilder caches since we need them during build.
# Mock with --offline and dnf is sometimes happy without caches, and with yum it
# never is, so we provide an option to also leave the mock caches in place.
#
# We also want to keep cracklib since otherwise password quality
# checks break on Debian.
Expand Down
5 changes: 5 additions & 0 deletions bots/naughty/fedora-31/10038-abrtd-crash-fn
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Traceback (most recent call last):
File "test/verify/check-journal", line *, in testAbrtSegv
b.wait_visible(sel)
*
Error: timeout
5 changes: 5 additions & 0 deletions bots/naughty/fedora-31/10038-abrtd-crash-fn-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Traceback (most recent call last):
File "test/verify/check-journal", line *, in testAbrtDelete
b.click(sel)
*
Error: timeout
1 change: 1 addition & 0 deletions bots/naughty/fedora-31/12721-selinux-timedatectl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Failed to set time zone: Failed to update /etc/localtime*
1 change: 1 addition & 0 deletions bots/naughty/fedora-31/12721-selinux-timedatectl-2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Failed to set time: Failed to set system clock: Operation not permitted*
1 change: 1 addition & 0 deletions bots/naughty/fedora-31/12744-selinux-nm-system-cat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testlib.Error: audit: type=1400 audit(*): avc: denied { write } for pid=* comm="NetworkManager" path="/var/tmp/dracut.*/systemd-cat" dev="dm-0" ino=* scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:kdumpctl_tmp_t:s0 tclass=fifo_file permissive=0
3 changes: 3 additions & 0 deletions bots/naughty/fedora-31/8905-nm-bond-autoconnect-slaves
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Traceback (most recent call last):
File "check-networking-bond", line *, in testBondActive
b.wait_in_text("#network-interface .panel:contains('tbond')", ip)
3 changes: 3 additions & 0 deletions bots/naughty/fedora-31/8905-nm-bridge-autoconnect-slaves
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Traceback (most recent call last):
File "check-networking-bridge", line *, in testBridgeActive
b.wait_in_text("#network-interface .panel:contains('tbridge')", ip)
4 changes: 2 additions & 2 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ def check_journal_messages(self, machine=None):
if "TEST_AUDIT_NO_SELINUX" not in os.environ:
messages += machine.audit_messages("14", cursor=cursor) # 14xx is selinux

if self.image in ['fedora-30', 'fedora-testing', 'fedora-i386']:
# Fedora 30 switched to dbus-broker
if self.image in ['fedora-31', 'fedora-30', 'fedora-testing', 'fedora-i386']:
# Fedora >= 30 switched to dbus-broker
self.allowed_messages.append("dbus-daemon didn't send us a dbus address; not installed?.*")

all_found = True
Expand Down
5 changes: 4 additions & 1 deletion test/verify/check-dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class TestBasicDashboard(MachineCase, DashBoardHelpers):

# Start second browser and check that it is in sync
b2 = self.new_browser()
b2.default_user = "root"
b2.default_user = "admin"
Copy link
Member

Choose a reason for hiding this comment

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

This could also be split out and landed separately. (If it helps, then you don't need to run the entire set of tests for this PR)

b2.login_and_go("/dashboard")
self.wait_dashboard_addresses(b2, ["localhost"])
b.wait_present("#dashboard-hosts a[data-address='localhost'] button.pficon-delete.disabled")
Expand Down Expand Up @@ -236,6 +236,9 @@ class TestDashboardSetup(MachineCase, DashBoardHelpers):

# lockout admin
m2.execute("echo admin:badpass | chpasswd")
# Logging in as root is no longer allowed by default by sshd
m2.execute("sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config")
m2.execute("systemctl restart sshd")

# Create some users on m1 and m2.
m1.execute("getent group docker >/dev/null || groupadd docker")
Expand Down
4 changes: 3 additions & 1 deletion test/verify/check-docker
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ from testlib import *

@skipPackage("cockpit-docker")
@skipImage("No docker packaged", "rhel-8-1", "rhel-8-1-distropkg")
@skipImage("Docker not available", "fedora-31") # https://github.com/cockpit-project/cockpit/issues/12670
class TestDocker(MachineCase):

def setUp(self):
Expand Down Expand Up @@ -588,7 +589,8 @@ CMD ["/bin/sh"]


@skipImage("Skip on systems without atomic and ones with missing deps", "debian-stable",
"debian-testing", "ubuntu-1804", "ubuntu-stable", "fedora-atomic", "fedora-i386")
"debian-testing", "ubuntu-1804", "ubuntu-stable", "fedora-atomic", "fedora-i386",
"fedora-31")
@skipImage("No docker packaged", "rhel-8-1", "rhel-8-1-distropkg")
@skipPackage("cockpit-docker")
class TestAtomicScan(MachineCase):
Expand Down
2 changes: 2 additions & 0 deletions test/verify/check-docker-storage
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def can_manage(machine):

@skipImage("No cockpit-docker on i386", "fedora-i386")
@skipImage("No docker packaged", "rhel-8-1", "rhel-8-1-distropkg")
@skipImage("Docker not available", "fedora-31") # https://github.com/cockpit-project/cockpit/issues/12670
@skipPackage("cockpit-docker")
class TestDockerStorageDirect(MachineCase):

Expand All @@ -55,6 +56,7 @@ class TestDockerStorageDirect(MachineCase):

@skipImage("No cockpit-docker on i386", "fedora-i386")
@skipImage("No docker packaged", "rhel-8-1", "rhel-8-1-distropkg")
@skipImage("Docker not available", "fedora-31") # https://github.com/cockpit-project/cockpit/issues/12670
@skipPackage("cockpit-docker")
class TestDockerStorage(MachineCase):
provision = {"machine1": {"address": "10.111.113.1/20"}}
Expand Down
4 changes: 4 additions & 0 deletions test/verify/check-multi-machine
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@ class TestMultiMachine(MachineCase):
m1 = self.machine
m2 = self.machine2

# Logging in as root is no longer allowed by default by sshd
m2.execute("sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config")
m2.execute("systemctl restart sshd")

machine_path = "/@10.111.113.2"

self.login_and_go(None)
Expand Down
2 changes: 1 addition & 1 deletion test/verify/check-packagekit
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ class TestUpdates(PackageCase):


@skipImage("Image uses OSTree", "fedora-atomic")
@skipImage("No subscriptions", "debian-stable", "debian-testing",
@skipImage("No subscriptions", "debian-stable", "debian-testing", "fedora-31",
"fedora-30", "fedora-i386", "fedora-testing", "ubuntu-1804", "ubuntu-stable")
class TestUpdatesSubscriptions(PackageCase):
provision = {
Expand Down
15 changes: 10 additions & 5 deletions test/verify/machineslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def verify_disk_added(self):
b.click("#vm-subVmTest1-disks") # open the "Disks" subtab

# Detect volume format
detect_format_cmd = "virsh vol-dumpxml {0} {1} | xmllint --xpath '/volume/target/format' -".format(self.volume_name, self.pool_name)
detect_format_cmd = "virsh vol-dumpxml {0} {1} | xmllint --xpath '{2}' -"

if self.test_obj.provider == "libvirt-dbus":
b.wait_in_text('#vm-{0}-disks-{1}-source-volume'.format(self.vm_name, self.expected_target), self.volume_name)
Expand All @@ -713,10 +713,15 @@ def verify_disk_added(self):
expected_format = 'unknown'
else:
expected_format = 'qcow2'
self.test_obj.assertEqual(
m.execute(detect_format_cmd).rstrip(),
'<format type="{0}"/>'.format(self.volume_format or expected_format)
)

# Unknown pool format isn't present in xml anymore
if expected_format == "unknown" and m.execute("virsh --version") >= "5.6.0":
m.execute(detect_format_cmd.format(self.volume_name, self.pool_name, "/volume/target") + " | grep -qv format")
else:
self.test_obj.assertEqual(
m.execute(detect_format_cmd.format(self.volume_name, self.pool_name, "/volume/target/format")).rstrip(),
'<format type="{0}"/>'.format(self.volume_format or expected_format)
)
else:
if self.pool_type == 'disk':
b.wait_in_text('#vm-{0}-disks-{1}-source-device'.format(self.vm_name, self.expected_target), self.volume_name)
Expand Down