Project

General

Profile

Wiki » History » Version 9

jlausuch, 2022-09-22 13:43

1 8 jlausuch
## COCKPIT MANUAL TEST
2
3
### Preparation
4
5
#### Install the needed modules
6
7
Make sure the following packages are installed on the system:
8
```
9
---+------------------------+------------------------------------------------------------------------------+--------
10
i+ | cockpit                | Web Console for Linux servers                                                | package
11
i  | cockpit-bridge         | Cockpit bridge server-side component                                         | package
12
i+ | cockpit-kdump          | Cockpit user interface for kernel crash dumping                              | package
13
i+ | cockpit-machines       | Cockpit user interface for virtual machines                                  | package
14
i+ | cockpit-networkmanager | Cockpit user interface for networking, using NetworkManager                  | package
15
i+ | cockpit-podman         | Cockpit component for Podman containers                                      | package
16
i+ | cockpit-selinux        | Cockpit SELinux package                                                      | package
17
i+ | cockpit-storaged       | Cockpit user interface for storage, using udisks                             | package
18
i+ | cockpit-system         | Cockpit admin interface package for configuring and troubleshooting a system | package
19
i+ | cockpit-tukit          | Cockpit module for Transactional Update                                      | package
20
i+ | cockpit-ws             | Cockpit Web Service                                                          | package
21
```
22
If needed, to install them:
23
`transactional-update pkg install cockpit-X cockpit-Y cockpit-Z`
24
25
Reboot the system.
26
27
#### Start cockpit service
28
`systemctl enable --now cockpit.socket`
29
30
In a browser, load the Cockpit UI using https://<IP>:9090.
31
32
33
## Overview Tab
34 9 jlausuch
![](cockpit_overview.png)
35
36 8 jlausuch
37
## Logs Tab
38
39
## Storage Tab
40
41
## Podman Containers Tab
42
43
## Virtual Machines Tab
44
45
## Accounts Tab
46
47
## Services Tab
48
49
## Kernel Dump Tab
50
51
## SELinux Tab
52
53
## Software Updates Tab
54
55
## Terminal Tab
56
57
58
# APENDIX
59 1 jlausuch
## SLE Micro Test Cases
60
61
### Basic checks
62
#### microos/networking.pm
63
Basic network and connectivity check. 
64
- Print network configuration (ip addr show and resolv.conf)
65 2 jlausuch
- Ping localhost `127.0.0.1` (IPv4) and `::1` (IPv6)
66 1 jlausuch
- Curl to openqa.opensuse.org and github.com
67
68
#### microos/libzypp_config.pm
69
Check that zypper configuration is customized for MicroOS.
70 2 jlausuch
- `egrep -x "^solver.onlyRequires ?= ?true" /etc/zypp/zypp.conf`
71
- `egrep -x "^rpm.install.excludedocs ?= ?yes" /etc/zypp/zypp.conf`
72
- `egrep -x "^multiversion ?=" /etc/zypp/zypp.conf`
73 1 jlausuch
74
#### microos/image_checks.pm
75
Simple image specific checks:
76
- Verify that openQA resized the disk image
77
- Verify that there is no unpartitioned space left
78
- Verify that the filesystem mounted at /var grew beyond the default 5GiB
79
- Verify that combustion ran
80
81
#### microos/one_line_checks.pm
82
Simple checks after installation.
83 2 jlausuch
- Check that snapper is configured `snapper list`
84
- Subvolume check `btrfs subvolume show /var`
85
- `kubectl` is not installable if `SYSTEM_ROLE=microos` (only openSUSE MicroOS)
86
- `crio` should be installed if `SYSTEM_ROLE=kubeadm` (only openSUSE MicroOS)
87 1 jlausuch
88
89
#### microos/services_enabled.pm
90
Check that services are enables based on system role
91
The following services should be enabled by default:
92 2 jlausuch
- `issue-add-ssh-keys`
93
- `issue-generator`
94
- `transactional-update.timer`
95
- `sshd`
96
97 1 jlausuch
On other system roles (MicroOS only), other services might be checked to be enabled.
98
99
100
#### microos/cockpit_service.pm
101
Basic check for cockpit service.
102
- Install `cockpit` package if not installed
103
- Install `cockpit-networkmanager` package if the system is running network-manager.
104
- Install `cockpit-wicked` package if the system is running wicked.
105
- Install `cockpit-machines` and `cockpit-tukit` if packages are available.
106
- Enable and start `cockpit.socket service` and check that Cockpit is active and accessible on http://localhost:9090
107
- Test Cockpit service survives a reboot (it's active automatically after rebooting)
108
109
110
111
### Specific transactional system tests
112
113
#### transactional/trup_smoke.pm
114 4 jlausuch
Basic smoke test to verify all basic transactional update operations work and system can properly boot.
115
- Reinstall bootloader: `transactional-update bootloader`
116
- Regenerate grub.cfg: `transactional-update grub.cfg`
117
- Regenerate initrd: `transactional-update initrd`
118
- Regenerate kdump: `transactional-update kdump`
119
- Run cleanup: `transactional-update cleanup`
120
121 1 jlausuch
122
#### transactional/filesystem_ro.pm
123 3 jlausuch
Check that root filesystem is read only
124
- `/` is RO: 
125
  - cannot create `touch /should_fail`
126
  - `btrfs property get / ro | grep "ro=true"`
127
- `/var` is RW:
128
  - can create `touch /var/log/should_succeed`
129
  - `btrfs property get /var ro | grep "ro=false"`
130
- `/etc` is RW:
131
  - can create `touch /etc/should_succeed`
132
- Look for ro mount point in fstab: `findmnt -s / -n -O ro`
133
- Look for ro mount point in mounted filesystems: `findmnt / -n -O ro`
134 1 jlausuch
135
#### transactional/transactional_update.pm
136
TBD
137
138
#### transactional/rebootmgr.pm
139 6 jlausuch
Test rebootmgr using different strategies
140
- Test instant reboot
141
- Test maint-window strategy
142
- Test etcd locking strategy
143
144 1 jlausuch
145
#### transactional/health_check.pm
146 5 jlausuch
Check that health-check service works correctly.
147
- Install and enable service `health-checker` if not installed.
148
- `health-checker` command shall return `passed` string.
149
- Current snapshot shall be the same as the logged one from health-checker.
150
- Update rebootmgr.sh using transactional update shell to force health-checker to fail:
151
  - f=$(rpm --eval %{_libexecdir})/health-checker/fail.sh; echo -e \'#/bin/sh\n[ "$1" != "check" ]\' > $f && chmod a+x $f
152
  - reboot
153
  - health-checker should rollback to the correct snapshot
154
- `health-checker` command shall return `passed` string.
155 7 jlausuch
156
157
### Cockpit UI testing (manual)
158
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.
159
TBD