JDK-8157287 : java/nio/file/FileStore/Basic.java failed with "java.nio.file.AccessDeniedException : /zones/zoneone/root "
Type:Bug
Component:core-libs
Sub-Component:java.nio
Affected Version:9
Priority:P3
Status:Resolved
Resolution:Fixed
Submitted:2016-05-19
Updated:2019-09-04
Resolved:2016-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
java/nio/file/FileStore/Basic.java failed with "java.nio.file.AccessDeniedException : /zones/zoneone/root "
Comments
Fix Request
This patch improves test reliability in 8u and keeps codebases in sync (I see 8u221/222). Patch applies cleanly to 8u and passes the affected test on Linux x86_64.
There are a couple of tests that enumerate the file systems in order to test APIs. NFS is sometimes problematic as it causes processes to hang and tests to timeout. A hard problem.
In any case, for this specific test then it can safely skip the file system when AccessDeniedException is thrown. That will insulate us a bit in zone configurations like this.
20-05-2016
The test is passing on slcal363 when run as mach5-one. Perhaps we can discuss initial conditions for network and file system based tests in the future or continue to deal with these issues as they occur if we continue to use containers. Another example in the list below are the PDIT based NFS file systems which may be on or off line and may have permissions set by the PDIT organization.
mach5-one@slcal363:/tmp$ /opt/jdk/bin/java -cp . Basic
/ (rpool/ROOT/solaris) (name=rpool/ROOT/solaris type=zfs)
/devices (/devices) (name=/devices type=devfs)
/dev (/dev) (name=/dev type=dev)
/system/contract (ctfs) (name=ctfs type=ctfs)
/proc (proc) (name=proc type=proc)
/etc/mnttab (mnttab) (name=mnttab type=mntfs)
/system/volatile (swap) (name=swap type=tmpfs)
/system/object (objfs) (name=objfs type=objfs)
/etc/dfs/sharetab (sharefs) (name=sharefs type=sharefs)
/lib/libc.so.1 (/usr/lib/libc/libc_hwcap1.so.1) (name=/usr/lib/libc/libc_hwcap1.so.1 type=lofs)
/dev/fd (fd) (name=fd type=fd)
/var (rpool/ROOT/solaris/var) (name=rpool/ROOT/solaris/var type=zfs)
/tmp (swap) (name=swap type=tmpfs)
/var/share (rpool/VARSHARE) (name=rpool/VARSHARE type=zfs)
/rpool (rpool) (name=rpool type=zfs)
/scratch (scratch) (name=scratch type=zfs)
/system/zones (rpool/VARSHARE/zones) (name=rpool/VARSHARE/zones type=zfs)
/var/share/pkg (rpool/VARSHARE/pkg) (name=rpool/VARSHARE/pkg type=zfs)
/var/share/pkg/repositories (rpool/VARSHARE/pkg/repositories) (name=rpool/VARSHARE/pkg/repositories type=zfs)
/media/ORACLE_SSM (/dev/dsk/c2t0d0p0:1) (name=/dev/dsk/c2t0d0p0:1 type=pcfs)
/fsnadmin (10.248.24.250:/export/job_control_tool) (name=10.248.24.250:/export/job_control_tool type=nfs)
/zones (rpool/zones) (name=rpool/zones type=zfs)
/usr/local/packages (slcavere02.us.oracle.com:/export/local/x86/solaris/110/packages) (name=slcavere02.us.oracle.com:/export/local/x86/solaris/110/packages type=nfs)
20-05-2016
If I run the test as root it passes. The tests run as a non privileged user, mach5-one. It is the case that there is a filesystem that is not accessible to mach5-one when this test runs as Hamlin points out. I am going to remove the file system in question until we sort out the issues with test expectations in containers. This test should start passing, due to providing an expected environment. I see nothing wrong with a test written to have all file systems accessible by the user. There are some cases with containers where entries are added to the kernel mount tables and kernel network tables that are not expected and unusual. We may not be able to remove some of the unusual entries in some cases.
20-05-2016
This part of the test is essentially doing ` df -k`. I assume the configuration must have changed recently to be running into this.
20-05-2016
This test is sensitive to the list of mounted file systems, not clear how to test these APIs reliably in face of unusual environments.