Compare commits

...

10 Commits

Author SHA1 Message Date
Mohan Boddu 554841d176 Rebuilt for IMA sigs, glibc 2.34, aarch64 flags 2023-05-19 09:54:36 +00:00
Jan Friesse 2cb59d803e New upstream release
- Related: rhbz#1962501
2021-07-19 11:27:34 +02:00
Jan Friesse f9c92e6983 Really add new upstream release sources
- Related: rhbz#1962501
2021-05-20 13:53:41 +02:00
Jan Friesse 9fb01ba8b0 New upstream release
- Resolves: rhbz#1962501
2021-05-20 13:42:52 +02:00
Mohan Boddu 24072ae03d - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-04-16 05:42:16 +00:00
DistroBaker 4f5913a4b1 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/spausedd.git#ad38e6ac561dabba53b477d7b254b0639ee8e765
2021-03-30 04:20:18 +00:00
DistroBaker 451f7ff017 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/spausedd.git#fddb64ab580ef406e922df4a963eb1b09c27e7f9
2021-02-04 20:25:04 +00:00
Troy Dawson 7936417bd3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/spausedd#7b8181d4afbaf03d67a08375fec57b9423df3bdc
2020-11-16 14:02:29 -08:00
DistroBaker 49bc689d63 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/spausedd.git#3ce5a3dbab119e41bff5a2266d3917a613427053
2020-11-10 10:04:22 +00:00
DistroBaker 2b4c66e2fd Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/spausedd.git#282f830b23e8d4b32c542800de005310b1d30c21
2020-11-02 16:57:35 +01:00
10 changed files with 341 additions and 0 deletions

8
.gitignore vendored
View File

@ -0,0 +1,8 @@
/spausedd-20190320.tar.gz
/spausedd-20190807.tar.gz
/spausedd-20200323.tar.gz
/spausedd-20201110.tar.gz
/spausedd-20201112.tar.gz
/spausedd-20210326.tar.gz
/spausedd-20210520.tar.gz
/spausedd-20210719.tar.gz

1
.spausedd.metadata Normal file
View File

@ -0,0 +1 @@
daad8303589c6d2314d0bf5e1a18752758a66ec1 spausedd-20210719.tar.gz

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# spausedd
Scheduler Pause Detection Daemon

15
gating.yaml Normal file
View File

@ -0,0 +1,15 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (spausedd-20210719.tar.gz) = e2a05fd0d9ff4620848fe51d2d06e9c81b9f1553bb092a5e5ac229dc96d3bbd73b9aa2e1c6832e1625cfa8e033844701cdf3c3b7c053213fea167d33bd2bfc90

2
spausedd.rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# Empty %postun
addFilter(r'W: empty-%postun')

166
spausedd.spec Normal file
View File

@ -0,0 +1,166 @@
%bcond_without vmguestlib
Name: spausedd
Summary: Utility to detect and log scheduler pause
Version: 20210719
Release: 2%{?dist}
License: ISC
URL: https://github.com/jfriesse/spausedd
Source0: https://github.com/jfriesse/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
# VMGuestLib exists only for x86 architectures (for Fedora) and x86_64 (for RHEL)
%if %{with vmguestlib}
%if 0%{?rhel} >= 6
%ifarch x86_64
%global use_vmguestlib 1
%endif
%else
%ifarch %{ix86} x86_64
%global use_vmguestlib 1
%endif
%endif
%endif
BuildRequires: gcc
BuildRequires: make
%{?systemd_requires}
BuildRequires: systemd
%if %{defined use_vmguestlib}
BuildRequires: pkgconfig(vmguestlib)
%endif
%description
Utility to detect and log scheduler pause
%prep
%setup -q -n %{name}-%{version}
%build
%set_build_flags
%make_build \
%if %{defined use_vmguestlib}
WITH_VMGUESTLIB=1 \
%else
WITH_VMGUESTLIB=0 \
%endif
%install
%make_install PREFIX="%{_prefix}"
mkdir -p %{buildroot}/%{_unitdir}
install -m 644 -p init/%{name}.service %{buildroot}/%{_unitdir}
%clean
%files
%doc AUTHORS
%license COPYING
%{_bindir}/%{name}
%{_mandir}/man8/*
%{_unitdir}/spausedd.service
%post
%systemd_post spausedd.service
%preun
%systemd_preun spausedd.service
%postun
%systemd_postun spausedd.service
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 20210719-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jul 19 2021 Jan Friesse <jfriesse@redhat.com> - 20210719-1
- Related: rhbz#1962501
- New upstream release
- Add mode option for moving to root cgroup functionality
* Thu May 20 2021 Jan Friesse <jfriesse@redhat.com> - 20210520-1
- Resolves: rhbz#1962501
- New upstream release
- Support for cgroup v2
- Document cgroup v2 problems
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 20210326-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Mar 26 2021 Jan Friesse <jfriesse@redhat.com> - 20210326-1
- Fix possible memory leak
- Check memlock rlimit
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20201112-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Nov 12 2020 Jan Friesse <jfriesse@redhat.com> - 20201112-1
- Add ability to move process into root cgroup
- Rebase to new version
* Tue Nov 10 2020 Jan Friesse <jfriesse@redhat.com> - 20201110-1
- Fix log_perror
- Rebase to new version
* Tue Sep 22 2020 Jan Friesse <jfriesse@redhat.com> - 20200323-4
- Fix build for ELN
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20200323-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 22 2020 Jan Friesse <jfriesse@redhat.com> - 20200323-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Mon Mar 23 2020 Jan Friesse <jfriesse@redhat.com> - 20200323-1
- Enhance man page
- Add CI tests
- Enable gating
- Rebase to new version
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20190807-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Aug 07 2019 Jan Friesse <jfriesse@redhat.com> - 20190807-1
- Enhance makefile
- Rebase to new version
* Tue Aug 06 2019 Jan Friesse <jfriesse@redhat.com> - 20190320-3
- Do not set exec permission for service file
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20190320-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Mar 20 2019 Jan Friesse <jfriesse@redhat.com> - 20190320-1
- Use license macro in spec file
* Tue Mar 19 2019 Jan Friesse <jfriesse@redhat.com> - 20190319-1
- Add AUTHORS and COPYING
- Fix version number in specfile
- Use install -p to preserve timestamps
- Use set_build_flags macro
- Rebase to new version
* Mon Mar 18 2019 Jan Friesse <jfriesse@redhat.com> - 20190318-2
- Initial version for Fedora
* Mon Mar 18 2019 Jan Friesse <jfriesse@redhat.com> - 20190318-1
- Require VMGuestLib only on x86 and x86_64
* Wed Mar 21 2018 Jan Friesse <jfriesse@redhat.com> - 20180321-1
- Remove exlusivearch for VMGuestLib.
- Add copr branch with enhanced spec file which tries to automatically
detect what build options should be used (systemd/vmguestlib).
* Tue Mar 20 2018 Jan Friesse <jfriesse@redhat.com> - 20180320-1
- Add support for VMGuestLib
- Add more examples
* Mon Feb 19 2018 Jan Friesse <jfriesse@redhat.com> - 20180219-1
- Add support for steal time
* Fri Feb 9 2018 Jan Friesse <jfriesse@redhat.com> - 20180209-1
- Initial version

3
tests/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Ignore tests runs/artefacts.
artifacts/**
**/*.retry

133
tests/smoke/runtest.sh Normal file
View File

@ -0,0 +1,133 @@
#!/bin/bash
# Copyright (c) 2019, Red Hat, Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND RED HAT, INC. DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RED HAT, INC. BE LIABLE
# FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Author: Jan Friesse <jfriesse@redhat.com>
# Home https://github.com/jfriesse/csts/tree/master/smoke
# -e is really important
set -xe
set -o pipefail
# Variables changing test behavior
MAX_REPEATS=60
SLEEP=5
# Start of the test (for journalctl)
JOURNAL_DATE_SINCE=$(date +"%F %T")
####################
# Helper functions #
####################
# service_start service
service_start() {
# service service must be inactive
systemctl is-active "$1" && exit 1 || true
systemctl start "$1"
systemctl is-active "$1"
}
# service_stop service
service_stop() {
systemctl is-active "$1" || exit 1
systemctl stop "$1"
systemctl is-active "$1" && exit 1 || true
}
# wait_for_log_msg message
wait_for_log_msg() {
local cont=true
local repeats=0
journalctl --since "$JOURNAL_DATE_SINCE" | cat
while $cont;do
if journalctl -t "spausedd" -o cat --since "$JOURNAL_DATE_SINCE" | grep "$1";then
cont=false
else
sleep 1
repeats=$((repeats+1))
[ "$repeats" -le "$MAX_REPEATS" ] || return 1
fi
done
}
##################
# Test functions #
##################
test_spausedd_h() {
# Check that spausedd binary exists and -h returns help text
res=`spausedd -h || true`
[ "$res" != "${res/usage/}" ]
}
test_spausedd_start() {
service_start "spausedd"
wait_for_log_msg 'Running main poll loop with maximum timeout .* and steal threshold .*%'
}
test_spausedd_stop() {
service_stop "spausedd"
wait_for_log_msg 'During .*s runtime spausedd was .*x not scheduled on time'
}
test_sig_stop() {
local cont=true
local repeats=0
spausedd_pid=$(systemctl show spausedd -p "MainPID")
spausedd_pid=${spausedd_pid##*=}
while $cont;do
# Wait a while for full start
sleep $SLEEP
kill -STOP "$spausedd_pid"
sleep $SLEEP
kill -CONT "$spausedd_pid"
if wait_for_log_msg 'Not scheduled for .*s (threshold is .*s), steal time is ';then
cont=false
else
repeats=$((repeats+1))
[ "$repeats" -le "$MAX_REPEATS" ]
fi
done
}
test_man_page() {
man -w "spausedd"
}
########
# main #
########
test_spausedd_h
test_man_page
test_spausedd_start
test_sig_stop
test_spausedd_stop

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- smoke
required_packages:
- spausedd