File tree Expand file tree Collapse file tree 3 files changed +46
-3
lines changed
Expand file tree Collapse file tree 3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 2323 (/usr/bin/rvps --config /etc/trustee/rvps.json --address 127.0.0.1:50003 &) && sleep 1
2424 (/usr/bin/grpc-as --socket 0.0.0.0:50004 --config-file /etc/trustee/as-config.json &) && sleep 1
2525 (/usr/bin/kbs --config-file /etc/trustee/kbs-config.toml &) && sleep 1
26- (/usr/bin/trustee-gateway --config /etc/trustee/gateway.yml &) && sleep 1
26+ (/usr/bin/trustee-gateway --config /etc/trustee/gateway.yml > /tmp/trustee-gateway.log 2>&1 &) && sleep 1
2727
2828 # Register passphrases
2929 mkdir -p /opt/trustee/kbs/repository/default/local-resources/
Original file line number Diff line number Diff line change @@ -202,6 +202,35 @@ jobs:
202202 # install requirements
203203 yum install -y libguestfs-tools
204204
205+ - name : Load nbd kernel module
206+ run : |
207+ yum install -y kmod zstd
208+
209+ MODULE_DIR="/lib/modules/$(uname -r)"
210+ MODULE_FILE=$(find "$MODULE_DIR" -name "nbd.ko*" -type f | head -1)
211+
212+ if [ -z "$MODULE_FILE" ]; then
213+ echo "No module file found in $MODULE_DIR"
214+ exit 1
215+ fi
216+ echo "Found module file: $MODULE_FILE"
217+
218+ if [[ "$MODULE_FILE" == *.ko.zst ]]; then
219+ echo "Found zstd compressed module file, decompressing..."
220+
221+ zstd -d "$MODULE_FILE" -o "/tmp/nbd.ko"
222+ if [ $? -ne 0 ]; then
223+ echo "Failed to decompress module file"
224+ exit 1
225+ fi
226+
227+ echo "Loading the decompressed module..."
228+ insmod "/tmp/nbd.ko" || exit 1
229+ else
230+ echo "Loading the module with modprobe ..."
231+ modprobe nbd
232+ fi
233+
205234 - name : Download artifacts
206235 uses : actions/download-artifact@v4
207236 with :
Original file line number Diff line number Diff line change 150150create_test_disk () {
151151 log " Creating test disk..."
152152
153- # Create a 100MB disk image
154- dd if=/dev/zero of=test-disk.img bs=1M count=100
153+ # Create a 5GB disk image
154+ dd if=/dev/zero of=test-disk.img bs=5M count=1024
155155
156156 # Detach loop device if already attached
157157 LOOP_DEVICE=$( losetup --associated " $IMAGE " | awk ' {print $1}' )
@@ -176,9 +176,23 @@ create_test_disk() {
176176test_volume_init () {
177177 log " Initializing KBS volume..."
178178
179+ # check if trustee is still running
180+ yum install -y iproute
181+ ps -ef
182+
183+ ss --tcp -n --listening
184+
179185 # Initialize the volume
180186 if ! cryptpilot init kbs-test -c " ${CONFIG_DIR} " -y; then
181187 echo " Failed to initialize volume."
188+
189+ cat /tmp/trustee-gateway.log
190+
191+ # check again trustee is still running
192+ ps -ef
193+
194+ ss --tcp -n --listening
195+
182196 return 1
183197 fi
184198
You can’t perform that action at this time.
0 commit comments