Skip to content

Commit

Permalink
Merge branch 'master' into qe-uyuni-bv
Browse files Browse the repository at this point in the history
  • Loading branch information
nodeg authored Aug 3, 2023
2 parents af9b547 + 5a33b14 commit b912e41
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 52 deletions.
78 changes: 43 additions & 35 deletions susemanager/bin/mgr-setup
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ if [ $SWAP -eq 0 ]; then
echo "Not enough space on /. Not adding swap space. Good luck..."
else
FSTYPE=`df -T / | tail -1 | awk '{print $2}'`
# Ignore for overlay too
if [ $FSTYPE == "btrfs" ]; then
echo "Will *NOT* create swapfile on btrfs. Make sure you have enough RAM!"
elif [ $FSTYPE == "overlay" ]; then
echo "Will *NOT* create swapfile in a container!"
else
if [ -f /SWAPFILE ]; then
swapoff /SWAPFILE
Expand Down Expand Up @@ -316,47 +319,52 @@ check_mksubvolume() {
}

check_btrfs_dirs() {
DIR="/var/spacewalk"
if [ ! -d $DIR ]; then
FSTYPE=`df -T \`dirname $DIR\` | tail -1 | awk '{print $2}'`
echo -n "Filesystem type for $DIR is $FSTYPE - "
if [ $FSTYPE == "btrfs" ]; then
check_mksubvolume
echo "creating nCoW subvolume."
mksubvolume --nocow $DIR
ROOT_FSTYPE=`df -T / | tail -1 | awk '{print $2}'`
if [ $ROOT_FSTYPE == "overlay" ]; then
echo "Skipping btrfs check in containers"
else
DIR="/var/spacewalk"
if [ ! -d $DIR ]; then
FSTYPE=`df -T \`dirname $DIR\` | tail -1 | awk '{print $2}'`
echo -n "Filesystem type for $DIR is $FSTYPE - "
if [ $FSTYPE == "btrfs" ]; then
check_mksubvolume
echo "creating nCoW subvolume."
mksubvolume --nocow $DIR
else
echo "ok."
fi
else
echo "ok."
echo "$DIR already exists. Leaving it untouched."
fi
else
echo "$DIR already exists. Leaving it untouched."
fi

DIR="/var/cache"
if [ ! -d $DIR ]; then
mkdir $DIR
fi
FSTYPE=`df -T $DIR | tail -1 | awk '{print $2}'`
echo -n "Filesystem type for $DIR is $FSTYPE - "
if [ $FSTYPE == "btrfs" ]; then
TESTDIR=`basename $DIR`
btrfs subvolume list /var | grep "$TESTDIR" > /dev/null
if [ ! $? -eq 0 ]; then
check_mksubvolume
echo "creating subvolume."
mv $DIR ${DIR}.sav
mksubvolume $DIR
touch ${DIR}.sav/foobar.dummy
if [ ! -d $DIR ]; then
mkdir $DIR
DIR="/var/cache"
if [ ! -d $DIR ]; then
mkdir $DIR
fi
FSTYPE=`df -T $DIR | tail -1 | awk '{print $2}'`
echo -n "Filesystem type for $DIR is $FSTYPE - "
if [ $FSTYPE == "btrfs" ]; then
TESTDIR=`basename $DIR`
btrfs subvolume list /var | grep "$TESTDIR" > /dev/null
if [ ! $? -eq 0 ]; then
check_mksubvolume
echo "creating subvolume."
mv $DIR ${DIR}.sav
mksubvolume $DIR
touch ${DIR}.sav/foobar.dummy
if [ ! -d $DIR ]; then
mkdir $DIR
fi
mv ${DIR}.sav/* $DIR
rmdir ${DIR}.sav
rm -f $DIR/foobar.dummy
else
echo "subvolume for $DIR already exists. Fine."
fi
mv ${DIR}.sav/* $DIR
rmdir ${DIR}.sav
rm -f $DIR/foobar.dummy
else
echo "subvolume for $DIR already exists. Fine."
echo "ok."
fi
else
echo "ok."
fi
}

Expand Down
1 change: 1 addition & 0 deletions susemanager/susemanager.changes.mbussolotto.ignore_overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Skip swap creation and BTRFS check when we have overlayfs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: PXE boot a SLES 12 SP5 retail terminal
Then "sle12sp5_terminal" should have been reformatted

Scenario: Check connection from SLES 12 SP5 retail terminal to branch server
Given I navigate to the Systems overview page of this "sle12sp5_terminal"
Given I am on the Systems overview page of this "sle12sp5_terminal"
When I follow "Details" in the content area
And I follow "Connection" in the content area
Then I should see a "proxy.example.org" text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: PXE boot a SLES 15 SP4 retail terminal
Then "sle15sp4_terminal" should have been reformatted

Scenario: Check connection from SLES 15 SP4 retail terminal to branch server
Given I navigate to the Systems overview page of this "sle15sp4_terminal"
Given I am on the Systems overview page of this "sle15sp4_terminal"
When I follow "Details" in the content area
And I follow "Connection" in the content area
Then I should see a "proxy.example.org" text
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/core/srv_channels_add.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This feature can cause failures in:
# - features/core/srv_create_activationkey.feature
# - features/core/srv_create_repository.feature
# - features/reposync/srv_create_repository.feature
# - features/init_client/sle_minion.feature
# - features/init_client/sle_ssh_minion.feature
# - features/init_client/min_rhlike.feature
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/init_clients/sle_minion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Feature: Bootstrap a Salt minion via the GUI

@proxy
Scenario: Check connection from minion to proxy
Given I navigate to the Systems overview page of this "sle_minion"
Given I am on the Systems overview page of this "sle_minion"
When I follow "Details" in the content area
And I follow "Connection" in the content area
Then I should see "proxy" short hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: The system details of each minion and client provides an overview of th
Given I am authorized for the "Admin" section
@sle_minion
Scenario: SLE minion hardware refresh
Given I am on the Systems overview page of this "sle_minion"
Given I navigate to the Systems overview page of this "sle_minion"
When I follow "Hardware"
And I click on "Schedule Hardware Refresh"
Then I should see a "You have successfully scheduled a hardware profile refresh" text
Expand Down
2 changes: 1 addition & 1 deletion testsuite/features/secondary/proxy_cobbler_pxeboot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Feature: PXE boot a terminal with Cobbler
And I wait for "tftpboot-installation-SLE-15-SP4-x86_64" to be uninstalled on "server"

Scenario: Cleanup: delete the PXE boot minion
Given I navigate to the Systems overview page of this "pxeboot_minion"
Given I am on the Systems overview page of this "pxeboot_minion"
When I follow "Delete System"
Then I should see a "Confirm System Profile Deletion" text
When I click on "Delete Profile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ Feature: PXE boot a Retail terminal
Then "pxeboot_minion" should have been reformatted

Scenario: Check connection from terminal to branch server
Given I navigate to the Systems overview page of this "pxeboot_minion"
Given I am on the Systems overview page of this "pxeboot_minion"
When I follow "Details" in the content area
And I follow "Connection" in the content area
Then I should see a "proxy.example.org" text

Scenario: Install a package on the new Retail terminal
Given I navigate to the Systems overview page of this "pxeboot_minion"
Given I am on the Systems overview page of this "pxeboot_minion"
When I install the GPG key of the test packages repository on the PXE boot minion
And I follow "Software" in the content area
And I follow "Install"
Expand All @@ -222,7 +222,7 @@ Feature: PXE boot a Retail terminal
When I wait until event "Package Install/Upgrade scheduled by admin" is completed

Scenario: Cleanup: remove a package on the new Retail terminal
Given I navigate to the Systems overview page of this "pxeboot_minion"
Given I am on the Systems overview page of this "pxeboot_minion"
When I follow "Software" in the content area
And I follow "List / Remove"
And I enter "virgo" as the filtered package name
Expand All @@ -234,7 +234,7 @@ Feature: PXE boot a Retail terminal
When I wait until event "Package Removal scheduled by admin" is completed

Scenario: Cleanup: delete the new Retail terminal
Given I navigate to the Systems overview page of this "pxeboot_minion"
Given I am on the Systems overview page of this "pxeboot_minion"
When I follow "Delete System"
Then I should see a "Confirm System Profile Deletion" text
When I click on "Delete Profile"
Expand Down
1 change: 0 additions & 1 deletion testsuite/run_sets/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- features/core/srv_organization_credentials.feature
- features/core/srv_user_preferences.feature
- features/core/srv_channels_add.feature
- features/core/srv_create_repository.feature
- features/core/srv_create_activationkey.feature
- features/core/srv_osimage.feature
- features/core/srv_docker.feature
Expand Down
2 changes: 1 addition & 1 deletion testsuite/run_sets/refhost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- features/core/allcli_sanity.feature
- features/core/srv_first_settings.feature
- features/core/srv_channels_add.feature
- features/core/srv_create_repository.feature
- features/reposync/srv_create_repository.feature
- features/core/srv_create_activationkey.feature
- features/core/srv_docker.feature

Expand Down
1 change: 1 addition & 0 deletions testsuite/run_sets/reposync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
- features/reposync/srv_sync_products.feature
- features/reposync/srv_enable_sync_products.feature
- features/reposync/srv_wait_for_reposync.feature
- features/reposync/srv_create_repository.feature

## Channels and Product synchronization features END ###
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Only build 'uyuni-base-server' package for server and not for client tools
8 changes: 4 additions & 4 deletions uyuni/base/uyuni-base.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Requires(pre): httpd
%description common
Basic filesystem hierarchy for Uyuni server and proxy.

%if ! (0%{?suse_version} == 1110)
%if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9
%package server
Summary: Base structure for Uyuni server
Group: System/Fhs
Expand Down Expand Up @@ -98,12 +98,12 @@ Basic filesystem hierarchy for Uyuni proxy.
%install
mkdir -p %{buildroot}/etc/rhn
mkdir -p %{buildroot}/usr/share/rhn/proxy
%if ! (0%{?suse_version} == 1110)
%if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9
mkdir -p %{buildroot}/var/spacewalk
%endif
mkdir -p %{buildroot}/%{_prefix}/share/rhn/config-defaults

%if !(0%{?suse_version} == 1110)
%if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9
%pre server
getent group susemanager >/dev/null || %{_sbindir}/groupadd -r susemanager
getent passwd salt >/dev/null && %{_sbindir}/usermod -a -G susemanager salt
Expand All @@ -119,7 +119,7 @@ getent passwd %{apache_user} >/dev/null && %{_sbindir}/usermod -a -G susemanager
%dir %{_prefix}/share/rhn
%dir %attr(755,root,%{apache_group}) %{_prefix}/share/rhn/config-defaults

%if ! (0%{?suse_version} == 1110)
%if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9
%files server
%defattr(-,root,root)
%dir %attr(755,%{apache_user}, root) /var/spacewalk
Expand Down
2 changes: 1 addition & 1 deletion web/html/src/manager/systems/list-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ const allListOptions = [
];

export const SystemsListFilter = (props) => {
return <TableFilter filterOptions={allListOptions} {...props} />;
return <TableFilter filterOptions={allListOptions} name="criteria" {...props} />;
};

0 comments on commit b912e41

Please sign in to comment.