Skip to content

Commit 1bf22bd

Browse files
palash-gandhiprakashsurya
authored andcommitted
DLPX-94085 LTS 24.04: update delphix-platform for Ubuntu 24.04 appliance
PR URL: https://www.github.com/delphix/delphix-platform/pull/527
1 parent 7fcc2e7 commit 1bf22bd

File tree

8 files changed

+78
-103
lines changed

8 files changed

+78
-103
lines changed

.github/workflows/main.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
- uses: actions/checkout@v2
88
- run: docker build -t delphix-platform:latest docker
99
- run: ./scripts/docker-run.sh make packages
10+
1011
check-shellcheck:
1112
runs-on: ubuntu-latest
1213
steps:
@@ -17,31 +18,26 @@ jobs:
1718
steps:
1819
- uses: actions/checkout@v2
1920
- uses: delphix/actions/shfmt@master
21+
2022
check-pylint:
2123
runs-on: ubuntu-latest
2224
steps:
2325
- uses: actions/checkout@v2
24-
- uses: actions/setup-python@v1
25-
with:
26-
python-version: '3.8'
26+
- uses: actions/setup-python@v5
2727
- run: python3 -m pip install pylint
2828
- run: python3 -m pip install netifaces
2929
- run: pylint -d invalid-name,E0611 files/common/usr/bin/delphix-startup-screen
3030
check-yapf:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: actions/checkout@v2
34-
- uses: actions/setup-python@v1
35-
with:
36-
python-version: '3.8'
34+
- uses: actions/setup-python@v5
3735
- run: python3 -m pip install yapf
3836
- run: yapf --diff --style google files/common/usr/bin/delphix-startup-screen
3937
check-mypy:
4038
runs-on: ubuntu-latest
4139
steps:
4240
- uses: actions/checkout@v2
43-
- uses: actions/setup-python@v1
44-
with:
45-
python-version: '3.8'
41+
- uses: actions/setup-python@v5
4642
- run: python3 -m pip install mypy
4743
- run: mypy --ignore-missing-imports files/common/usr/bin/delphix-startup-screen

debian/postinst

+15-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,23 @@ configure)
5252
#
5353
systemctl disable nullmailer.service
5454

55+
systemctl unmask auditd.service
5556
systemctl enable auditd.service
56-
systemctl enable delphix.target
57-
systemctl enable delphix-platform.service
58-
systemctl enable delphix-rpool-upgrade.service
57+
58+
systemctl unmask systemd-networkd.service
5959
systemctl enable systemd-networkd.service
60+
61+
systemctl unmask iscsi-name-init.service
6062
systemctl enable iscsi-name-init.service
6163

64+
systemctl unmask delphix-platform.service
65+
systemctl unmask delphix-rpool-upgrade.service
66+
systemctl unmask delphix.target
67+
68+
systemctl enable delphix-platform.service
69+
systemctl enable delphix-rpool-upgrade.service
70+
systemctl enable delphix.target
71+
6272
if ! id -u postgres >/dev/null; then
6373
# When installing postgres, a postgres user is created unless it
6474
# already exists. To have a consistent UID accross installations
@@ -70,6 +80,8 @@ configure)
7080
# postgres UID. Note that we put this code here instead of the
7181
# delphix-platform service as we need it to be executed before
7282
# the postgres package gets installed.
83+
sed -i 's/^UID_MAX.*/UID_MAX 65437/g' /etc/login.defs
84+
sed -i 's/^GID_MAX.*/GID_MAX 65437/g' /etc/login.defs
7385
addgroup postgres --gid 65437
7486
adduser --home /var/lib/postgresql --no-create-home \
7587
--shell /bin/bash --ingroup postgres \

debian/rules

+11-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/make -f
22
#
3-
# Copyright 2018, 2024 Delphix
3+
# Copyright 2018, 2025 Delphix
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -41,6 +41,7 @@ DEPENDS = delphix-kernel-$(KERNEL_TYPE.$(TARGET_PLATFORM)),
4141
# that are leveraging ZFS as their root filesystem.
4242
#
4343
DEPENDS += grub-pc, \
44+
grub-efi-amd64-bin, \
4445
delphix-zfs,
4546

4647
#
@@ -59,6 +60,9 @@ DEPENDS += ansible, \
5960
debootstrap, \
6061
debsums, \
6162
dmidecode, \
63+
dosfstools, \
64+
efibootmgr, \
65+
efitools, \
6266
init, \
6367
iproute2, \
6468
iputils-ping, \
@@ -72,19 +76,22 @@ DEPENDS += ansible, \
7276
net-tools, \
7377
netbase, \
7478
netplan.io, \
75-
ntp, \
76-
nullmailer, \
79+
ntpsec, \
80+
nullmailer, \
7781
open-iscsi, \
7882
openssh-server, \
7983
openssl, \
8084
passwd, \
8185
policykit-1, \
8286
procps, \
8387
python3, \
88+
python3-netifaces, \
8489
rng-tools, \
8590
rsyslog, \
8691
sudo, \
92+
systemd-boot, \
8793
systemd-container, \
94+
systemd-resolved, \
8895
tzdata, \
8996
udev,
9097

@@ -110,47 +117,27 @@ DEPENDS += $(DEPENDS.$(TARGET_PLATFORM))
110117
#
111118
DEPENDS += delphix-build-info,
112119

113-
#
114-
# The usrmerge package modifies the layout of directories under root (/) upon
115-
# installation, to ensure that a Delphix Engine upgraded to Ubuntu 20.04 has
116-
# the same directory layout as a Delphix Engine that initially came on
117-
# Ubuntu 20.04 (or later).
118-
#
119-
DEPENDS += usrmerge,
120-
121-
#
122-
# These packages help strengthen the security of the appliance by identifying
123-
# and preventing undesired behaviors.
124-
#
125-
DEPENDS += aide, \
126-
aide-common,
127-
128120
#
129121
# These packages are tools that are intended for human convenience. The
130122
# product should not rely on them programmatically. They may be updated
131123
# or replaced without regard for backward compatibility.
132124
#
133125
DEPENDS += aptitude, \
134-
awscli, \
135-
bcc-tools, \
126+
bcc, \
136127
bpftrace, \
137128
crash-python, \
138129
delphix-rust, \
139130
dnsutils, \
140131
drgn, \
141-
dstat, \
142-
emacs-nox, \
143132
ethtool, \
144133
gdb, \
145-
gdb-python, \
146134
htop, \
147135
iftop, \
148136
inotify-tools, \
149137
iotop, \
150138
jq, \
151139
kdump-tools, \
152140
ldap-utils, \
153-
libkdumpfile, \
154141
linux-tools-common, \
155142
lsof, \
156143
man-db, \
@@ -229,4 +216,3 @@ override_dh_auto_test:
229216
# testing via another mechanism, so running it during package
230217
# builds is unnecessary.
231218
#
232-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# The 'ClientAliveInterval' setting determines the amount of time (in seconds)
3+
# the sshd server will wait to receive data from the client before sending a
4+
# request for response.
5+
#
6+
# The Azure marketplace does not allow a value greater than 3 minutes. So, when
7+
# running on Azure, we use 3 minutes.
8+
#
9+
ClientAliveCountMax 0
10+
ClientAliveInterval 180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Configure SSH to allow PAM "conversations" (interactions with the user).
3+
#
4+
ChallengeResponseAuthentication yes
5+
KbdInteractiveAuthentication yes
6+
UsePam yes
7+
8+
#
9+
# Harden the appliance by disabling ssh-agent(1), tcp, UNIX domain, and X11
10+
# forwarding. Note that this doesn't improve security unless users are also
11+
# denied shell access.
12+
#
13+
AllowAgentForwarding no
14+
AllowStreamLocalForwarding no
15+
AllowTcpForwarding no
16+
X11Forwarding no
17+
18+
Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
19+
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
20+
MACs umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512
21+
HostKeyAlgorithms -ssh-rsa*
22+
23+
#
24+
# The 'ClientAliveInterval' setting determines the amount of time (in seconds)
25+
# the sshd server will wait to receive data from the client before sending a
26+
# request for response.
27+
#
28+
ClientAliveCountMax 3
29+
ClientAliveInterval 300
30+
31+
LoginGraceTime 60
32+
MaxAuthTries 4
33+
MaxStartups 10:30:60
34+
PermitRootLogin no
35+
PrintLastLog no

files/common/lib/modprobe.d/10-lockd.conf

-10
This file was deleted.

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/handlers/main.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
when: ansible_virtualization_type != "systemd-nspawn" and not ansible_is_chroot
2828

2929
- systemd:
30-
name: sshd
30+
name: ssh
3131
state: reloaded
3232
listen: "sshd config changed"
3333
when: ansible_virtualization_type != "systemd-nspawn" and not ansible_is_chroot

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

+1-55
Original file line numberDiff line numberDiff line change
@@ -232,56 +232,6 @@
232232
- 'delphix'
233233
- 'root'
234234

235-
#
236-
# The 'ClientAliveInterval' setting determines the amount of time
237-
# (in seconds) the sshd server will wait to receive data from the
238-
# client before sending a request for response.
239-
#
240-
- set_fact:
241-
ssh_client_alive_interval: "300"
242-
ssh_client_alive_count_max: "3"
243-
244-
#
245-
# With that said (see comment above), the Azure marketplace does not
246-
# allow a value greater than 3 minutes. So, when running on Azure, we
247-
# use 3 minutes.
248-
#
249-
- set_fact:
250-
ssh_client_alive_interval: "180"
251-
ssh_client_alive_count_max: "0"
252-
when:
253-
- platform == "azure"
254-
255-
- lineinfile:
256-
path: /etc/ssh/sshd_config
257-
regexp: "^#?{{ item.key }} "
258-
line: "{{ item.key }} {{ item.value }}"
259-
with_items:
260-
#
261-
# Configure SSH to allow PAM "conversations" (interactions with the user).
262-
#
263-
- { key: "ChallengeResponseAuthentication", value: "yes" }
264-
#
265-
# Harden the appliance by disabling ssh-agent(1), tcp, UNIX domain, and
266-
# X11 forwarding. Note that this doesn't improve security unless users are
267-
# also denied shell access.
268-
#
269-
- { key: "AllowAgentForwarding", value: "no" }
270-
- { key: "AllowStreamLocalForwarding", value: "no" }
271-
- { key: "AllowTcpForwarding", value: "no" }
272-
- { key: "Ciphers", value: "chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com" }
273-
- { key: "ClientAliveCountMax", value: "{{ ssh_client_alive_count_max }}" }
274-
- { key: "ClientAliveInterval", value: "{{ ssh_client_alive_interval }}" }
275-
- { key: "HostKeyAlgorithms", value: "-ssh-rsa*" }
276-
- { key: "KexAlgorithms", value: "curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256"}
277-
- { key: "LoginGraceTime", value: "60"}
278-
- { key: "MACs", value: "umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512"}
279-
- { key: "MaxAuthTries", value: "4" }
280-
- { key: "MaxStartups", value: "10:30:60"}
281-
- { key: "PermitRootLogin", value: "no" }
282-
- { key: "X11Forwarding", value: "no" }
283-
notify: "sshd config changed"
284-
285235
- blockinfile:
286236
path: /etc/profile
287237
insertafter: EOF
@@ -318,10 +268,6 @@
318268
# like last-login, "welcome to ubuntu", and help messages. This makes linux and
319269
# illumos look the same, too.
320270
#
321-
- replace:
322-
dest: /etc/ssh/sshd_config
323-
regexp: '^#?[\s]*PrintLastLog.*$'
324-
replace: 'PrintLastLog no'
325271
- replace:
326272
dest: /etc/pam.d/sshd
327273
regexp: '^(session[\s]+optional[\s]+pam_motd\.so.*)$'
@@ -349,7 +295,7 @@
349295
regexp: '^{{ item.key }}='
350296
line: '{{ item.key }}="{{ item.value }}"'
351297
with_items:
352-
- { key: 'JAVA_HOME', value: '/usr/lib/jvm/adoptopenjdk-java8-jdk-amd64' }
298+
- { key: 'JAVA_HOME', value: '/usr/lib/jvm/java-8-openjdk-amd64' }
353299

354300
#
355301
# Configure the Azure agent. Only run this on Azure, since that is the

0 commit comments

Comments
 (0)