File tree Expand file tree Collapse file tree 3 files changed +24
-15
lines changed
scripts/image-builder/config Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,12 @@ if ! subscription-manager status >& /dev/null ; then
53
53
fi
54
54
55
55
# Configure systemd journal service to persist logs between boots and limit their size to 1G
56
- mkdir -p /var/log/journal/
57
- sed -i ' s/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
58
- sed -i ' s/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
59
- sed -i ' s/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
56
+ sudo mkdir -p /etc/systemd/journald.conf.d
57
+ cat <<EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
58
+ [Journal]
59
+ Storage=persistent
60
+ SystemMaxUse=1G
61
+ RuntimeMaxUse=1G
62
+ EOF
60
63
61
64
%end
Original file line number Diff line number Diff line change 4
4
5
5
Serviceability of Edge Devices is often limited or non-existent, which makes it
6
6
challenging to troubleshoot device problems following a failed software or
7
- operating system upgrade.
7
+ operating system upgrade.
8
8
9
9
To mitigate these problems, MicroShift uses [ greenboot] ( https://github.com/fedora-iot/greenboot ) ,
10
10
the Generic Health Check Framework for ` systemd ` on ` rpm-ostree ` based systems.
@@ -105,8 +105,11 @@ and setting limits on the maximal journal data size.
105
105
106
106
Run the following commands to configure the journal data persistency and limits.
107
107
``` bash
108
- sudo mkdir -p /var/log/journal/
109
- sudo sed -i ' s/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
110
- sudo sed -i ' s/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
111
- sudo sed -i ' s/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
108
+ sudo mkdir -p /etc/systemd/journald.conf.d
109
+ cat << EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
110
+ [Journal]
111
+ Storage=persistent
112
+ SystemMaxUse=1G
113
+ RuntimeMaxUse=1G
114
+ EOF
112
115
```
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ network --bootproto=dhcp --device=link --activate --onboot=on
13
13
# For example, a 20GB disk would be partitioned in the following way:
14
14
#
15
15
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
16
- # sda 8:0 0 20G 0 disk
16
+ # sda 8:0 0 20G 0 disk
17
17
# ├─sda1 8:1 0 200M 0 part /boot/efi
18
18
# ├─sda1 8:1 0 800M 0 part /boot
19
- # └─sda2 8:2 0 19G 0 part
19
+ # └─sda2 8:2 0 19G 0 part
20
20
# └─rhel-root 253:0 0 10G 0 lvm /sysroot
21
21
#
22
22
zerombr
@@ -66,10 +66,13 @@ firewall-offline-cmd --zone=trusted --add-source=169.254.169.1
66
66
echo -e 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig' >> /root/.profile
67
67
68
68
# Configure systemd journal service to persist logs between boots and limit their size to 1G
69
- mkdir -p /var/log/journal/
70
- sed -i 's/.*Storage=.*/Storage=auto/g' /etc/systemd/journald.conf
71
- sed -i 's/.*SystemMaxUse=.*/SystemMaxUse=1G/g' /etc/systemd/journald.conf
72
- sed -i 's/.*RuntimeMaxUse=.*/RuntimeMaxUse=1G/g' /etc/systemd/journald.conf
69
+ sudo mkdir -p /etc/systemd/journald.conf.d
70
+ cat <<EOF | sudo tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null
71
+ [Journal]
72
+ Storage=persistent
73
+ SystemMaxUse=1G
74
+ RuntimeMaxUse=1G
75
+ EOF
73
76
74
77
# Make sure all the Ethernet network interfaces are connected automatically
75
78
for uuid in $(nmcli -f uuid,type,autoconnect connection | awk '$2 == "ethernet" && $3 == "no" {print $1}') ; do
You can’t perform that action at this time.
0 commit comments