Project

General

Profile

Wiki » History » Revision 9

Revision 8 (jlausuch, 2022-09-13 16:01) → Revision 9/10 (jlausuch, 2022-09-22 13:43)

## COCKPIT MANUAL TEST 

 ### Preparation 

 #### Install the needed modules 

 Make sure the following packages are installed on the system: 
 ``` 
 ---+------------------------+------------------------------------------------------------------------------+-------- 
 i+ | cockpit                  | Web Console for Linux servers                                                  | package 
 i    | cockpit-bridge           | Cockpit bridge server-side component                                           | package 
 i+ | cockpit-kdump            | Cockpit user interface for kernel crash dumping                                | package 
 i+ | cockpit-machines         | Cockpit user interface for virtual machines                                    | package 
 i+ | cockpit-networkmanager | Cockpit user interface for networking, using NetworkManager                    | package 
 i+ | cockpit-podman           | Cockpit component for Podman containers                                        | package 
 i+ | cockpit-selinux          | Cockpit SELinux package                                                        | package 
 i+ | cockpit-storaged         | Cockpit user interface for storage, using udisks                               | package 
 i+ | cockpit-system           | Cockpit admin interface package for configuring and troubleshooting a system | package 
 i+ | cockpit-tukit            | Cockpit module for Transactional Update                                        | package 
 i+ | cockpit-ws               | Cockpit Web Service                                                            | package 
 ``` 
 If needed, to install them: 
 `transactional-update pkg install cockpit-X cockpit-Y cockpit-Z` 

 Reboot the system. 

 #### Start cockpit service 
 `systemctl enable --now cockpit.socket` 

 In a browser, load the Cockpit UI using https://<IP>:9090. 


 ## Overview Tab 
 ![](cockpit_overview.png) 


 

 ## Logs Tab 

 ## Storage Tab 

 ## Podman Containers Tab 

 ## Virtual Machines Tab 

 ## Accounts Tab 

 ## Services Tab 

 ## Kernel Dump Tab 

 ## SELinux Tab 

 ## Software Updates Tab 

 ## Terminal Tab 


 # APENDIX 
 ## SLE Micro Test Cases 

 ### Basic checks 
 #### microos/networking.pm 
 Basic network and connectivity check.  
 - Print network configuration (ip addr show and resolv.conf) 
 - Ping localhost `127.0.0.1` (IPv4) and `::1` (IPv6) 
 - Curl to openqa.opensuse.org and github.com 

 #### microos/libzypp_config.pm 
 Check that zypper configuration is customized for MicroOS. 
 - `egrep -x "^solver.onlyRequires ?= ?true" /etc/zypp/zypp.conf` 
 - `egrep -x "^rpm.install.excludedocs ?= ?yes" /etc/zypp/zypp.conf` 
 - `egrep -x "^multiversion ?=" /etc/zypp/zypp.conf` 

 #### microos/image_checks.pm 
 Simple image specific checks: 
 - Verify that openQA resized the disk image 
 - Verify that there is no unpartitioned space left 
 - Verify that the filesystem mounted at /var grew beyond the default 5GiB 
 - Verify that combustion ran 

 #### microos/one_line_checks.pm 
 Simple checks after installation. 
 - Check that snapper is configured `snapper list` 
 - Subvolume check `btrfs subvolume show /var` 
 - `kubectl` is not installable if `SYSTEM_ROLE=microos` (only openSUSE MicroOS) 
 - `crio` should be installed if `SYSTEM_ROLE=kubeadm` (only openSUSE MicroOS) 


 #### microos/services_enabled.pm 
 Check that services are enables based on system role 
 The following services should be enabled by default: 
 - `issue-add-ssh-keys` 
 - `issue-generator` 
 - `transactional-update.timer` 
 - `sshd` 

 On other system roles (MicroOS only), other services might be checked to be enabled. 


 #### microos/cockpit_service.pm 
 Basic check for cockpit service. 
 - Install `cockpit` package if not installed 
 - Install `cockpit-networkmanager` package if the system is running network-manager. 
 - Install `cockpit-wicked` package if the system is running wicked. 
 - Install `cockpit-machines` and `cockpit-tukit` if packages are available. 
 - Enable and start `cockpit.socket service` and check that Cockpit is active and accessible on http://localhost:9090 
 - Test Cockpit service survives a reboot (it's active automatically after rebooting) 



 ### Specific transactional system tests 

 #### transactional/trup_smoke.pm 
 Basic smoke test to verify all basic transactional update operations work and system can properly boot. 
 - Reinstall bootloader: `transactional-update bootloader` 
 - Regenerate grub.cfg: `transactional-update grub.cfg` 
 - Regenerate initrd: `transactional-update initrd` 
 - Regenerate kdump: `transactional-update kdump` 
 - Run cleanup: `transactional-update cleanup` 


 #### transactional/filesystem_ro.pm 
 Check that root filesystem is read only 
 - `/` is RO:  
   - cannot create `touch /should_fail` 
   - `btrfs property get / ro | grep "ro=true"` 
 - `/var` is RW: 
   - can create `touch /var/log/should_succeed` 
   - `btrfs property get /var ro | grep "ro=false"` 
 - `/etc` is RW: 
   - can create `touch /etc/should_succeed` 
 - Look for ro mount point in fstab: `findmnt -s / -n -O ro` 
 - Look for ro mount point in mounted filesystems: `findmnt / -n -O ro` 

 #### transactional/transactional_update.pm 
 TBD 

 #### transactional/rebootmgr.pm 
 Test rebootmgr using different strategies 
 - Test instant reboot 
 - Test maint-window strategy 
 - Test etcd locking strategy 


 #### transactional/health_check.pm 
 Check that health-check service works correctly. 
 - Install and enable service `health-checker` if not installed. 
 - `health-checker` command shall return `passed` string. 
 - Current snapshot shall be the same as the logged one from health-checker. 
 - Update rebootmgr.sh using transactional update shell to force health-checker to fail: 
   - f=$(rpm --eval %{_libexecdir})/health-checker/fail.sh; echo -e \'#/bin/sh\n[ "$1" != "check" ]\' > $f && chmod a+x $f 
   - reboot 
   - health-checker should rollback to the correct snapshot 
 - `health-checker` command shall return `passed` string. 


 ### Cockpit UI testing (manual) 
 The strategy for testing Cockpit UI is not yet 100% defined, there are still (2022-09-01) some open questions to be answered. For now, the UI has been tested manually. 
 TBD