ci(main): NFS job의 compose 경로를 재배치에 맞추고 호스트 nfsd 모듈을 먼저 본다
문제: 두 가지다. - 재배치(PR #10)로 workflow의 기본 작업 폴더 `src`가 없어졌는데 fileserver-nfs-ambiguity의 두 compose 줄이 `adapter/outbound/...`로 남았다. 지금 main에서는 파일을 찾지 못해 실패한다. - 그 전에도 이 job은 run 52·63에서 NFS 서버 컨테이너가 바로 끝나 「dependency failed to start」로만 실패했다. 서버는 호스트 커널의 nfsd를 쓰고, desktop 호스트에는 그 모듈이 올라가 있지 않다(`lsmod`에 없음, 모듈 파일은 있음). runner 안쪽 daemon에는 /lib/modules가 없어 컨테이너가 올릴 수 없다. 고른 방법: 경로에 `src/`를 붙인다. 첫 step이 /proc/filesystems에서 nfsd를 확인하고, 없으면 호스트에서 한 번 돌릴 명령을 출력하고 실패한다. 원인을 로그에서 바로 읽을 수 있다. 버린 대안: job이 privileged 컨테이너로 호스트에 모듈을 올리게 하기. CI가 runner 호스트의 커널 상태를 바꾸게 된다. 위험·한계: 호스트에 모듈을 올리기 전까지 이 job은 빨갛다. 올리는 것은 runner 호스트 관리자(소유자)의 일이다. 검증: 경로는 workflow의 run 줄 경로를 모두 대조하는 스크립트로 확인했다 (빠진 경로는 이 두 줄뿐). runner nightly 수동 실행.
This commit is contained in:
@@ -192,11 +192,22 @@ jobs:
|
||||
FILESERVER_NFS_TESTS: "true"
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
||||
# The NFS server is the host kernel's nfsd, which a container cannot load: the runner's daemon
|
||||
# has no /lib/modules. Without the module the server exits at once and the compose step only
|
||||
# says "dependency failed to start" (runs 52 and 63). The runner host loads it once, at boot:
|
||||
# echo nfsd | sudo tee /etc/modules-load.d/nfsd.conf && sudo modprobe nfsd
|
||||
- name: The runner host has the nfsd kernel module
|
||||
run: |
|
||||
grep -qw nfsd /proc/filesystems || {
|
||||
echo "fileserver-nfs: the runner host kernel has no nfsd module; load it on the host:" >&2
|
||||
echo " echo nfsd | sudo tee /etc/modules-load.d/nfsd.conf && sudo modprobe nfsd" >&2
|
||||
exit 1
|
||||
}
|
||||
- uses: ./.gitea/actions/setup-java-gradle
|
||||
- run: docker compose -f adapter/outbound/fileserver/compose/nfs/compose.yml up -d --wait
|
||||
- run: docker compose -f src/adapter/outbound/fileserver/compose/nfs/compose.yml up -d --wait
|
||||
- run: ./gradlew :adapter:outbound:fileserver:test --tests '*NfsAmbiguityIntegrationTest'
|
||||
- if: ${{ always() }}
|
||||
run: docker compose -f adapter/outbound/fileserver/compose/nfs/compose.yml down -v
|
||||
run: docker compose -f src/adapter/outbound/fileserver/compose/nfs/compose.yml down -v
|
||||
|
||||
# The notification fault, race and restart suites run again on their own: one green run says least
|
||||
# about exactly these.
|
||||
|
||||
Reference in New Issue
Block a user