Skip to content

Commit 226d76a

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 226d76a

File tree

8 files changed

+77
-107
lines changed

8 files changed

+77
-107
lines changed

.github/workflows/main.yml

+9-13
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ on: [push, pull_request]
22

33
jobs:
44
check-packages:
5-
runs-on: ubuntu-latest
5+
runs-on: ubuntu-24.04
66
steps:
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:
21-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
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:
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04
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:
40-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-24.04
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

+6-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.
@@ -72,19 +72,21 @@ DEPENDS += ansible, \
7272
net-tools, \
7373
netbase, \
7474
netplan.io, \
75-
ntp, \
76-
nullmailer, \
75+
ntpsec, \
76+
nullmailer, \
7777
open-iscsi, \
7878
openssh-server, \
7979
openssl, \
8080
passwd, \
8181
policykit-1, \
8282
procps, \
8383
python3, \
84+
python3-netifaces, \
8485
rng-tools, \
8586
rsyslog, \
8687
sudo, \
8788
systemd-container, \
89+
systemd-resolved, \
8890
tzdata, \
8991
udev,
9092

@@ -110,47 +112,27 @@ DEPENDS += $(DEPENDS.$(TARGET_PLATFORM))
110112
#
111113
DEPENDS += delphix-build-info,
112114

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-
128115
#
129116
# These packages are tools that are intended for human convenience. The
130117
# product should not rely on them programmatically. They may be updated
131118
# or replaced without regard for backward compatibility.
132119
#
133120
DEPENDS += aptitude, \
134-
awscli, \
135-
bcc-tools, \
121+
bcc, \
136122
bpftrace, \
137123
crash-python, \
138124
delphix-rust, \
139125
dnsutils, \
140126
drgn, \
141-
dstat, \
142-
emacs-nox, \
143127
ethtool, \
144128
gdb, \
145-
gdb-python, \
146129
htop, \
147130
iftop, \
148131
inotify-tools, \
149132
iotop, \
150133
jq, \
151134
kdump-tools, \
152135
ldap-utils, \
153-
libkdumpfile, \
154136
linux-tools-common, \
155137
lsof, \
156138
man-db, \
@@ -229,4 +211,3 @@ override_dh_auto_test:
229211
# testing via another mechanism, so running it during package
230212
# builds is unnecessary.
231213
#
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)