Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mode of mkdir incorrect after setacl. #4663

Closed
zhoucheng361 opened this issue Apr 8, 2024 · 0 comments · Fixed by #4676
Closed

mode of mkdir incorrect after setacl. #4663

zhoucheng361 opened this issue Apr 8, 2024 · 0 comments · Fixed by #4676
Assignees
Labels
kind/bug Something isn't working

Comments

@zhoucheng361
Copy link
Contributor

What happened:

root@bench-01:~/juicefs# cat .github/scripts/hypo/acl_test.py
    def test_acl_5000(self):
        state = JuicefsMachine()
        v1 = state.init_folders()
        v3 = state.set_acl(default=True, entry=v1, group=v1, group_perm=set(), logical=False, mask=set(), not_recalc_mask=False, other_perm=set(), physical=False, recalc_mask=False, recursive=False, set_mask=False, sudo_user='root', user=v1, user_perm={'r'})
        state.mkdir(mode=0, parent=v1, subdir='aaaa', umask=0, user='root')
        state.teardown()

root@bench-01:~/juicefs# python3 .github/scripts/hypo/acl_test.py -k test_acl_5000
setup_logger ./log1
setup_logger ./log2
__init__
duration is 0.026491165161132812
2024-04-08 17:41:30,708 - INFO - run_cmd: sudo -u root setfacl -d      -m u::r,g::-,o::- /tmp/fsrand/
run_cmd:getfacl /tmp/fsrand/
2024-04-08 17:41:30,714 - INFO - do_set_acl /tmp/fsrand/ with u::r,g::-,o::- succeed
2024-04-08 17:41:30,714 - INFO - run_cmd: sudo -u root setfacl -d      -m u::r,g::-,o::- /tmp/jfs/fsrand/
run_cmd:getfacl /tmp/jfs/fsrand/
2024-04-08 17:41:30,720 - INFO - do_set_acl /tmp/jfs/fsrand/ with u::r,g::-,o::- succeed
2024-04-08 17:41:30,720 - INFO - do_mkdir /tmp/fsrand/aaaa with mode 0o0 succeed
2024-04-08 17:41:30,720 - INFO - do_mkdir /tmp/jfs/fsrand/aaaa with mode 0o0 succeed
F
======================================================================
FAIL: test_acl_5000 (__main__.TestFsrand2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".github/scripts/hypo/acl_test.py", line 123, in test_acl_5000
    state.mkdir(mode=0, parent=v1, subdir='aaaa', umask=0, user='root')
  File "/root/juicefs/.github/scripts/hypo/fsrand2.py", line 315, in mkdir
    parent = Folders.filter(lambda x: x != multiple()),
  File "/root/hypothesis/hypothesis-python/src/hypothesis/stateful.py", line 681, in rule_wrapper
    return f(*args, **kwargs)
  File "/root/juicefs/.github/scripts/hypo/fsrand2.py", line 315, in mkdir
    parent = Folders.filter(lambda x: x != multiple()),
  File "/root/hypothesis/hypothesis-python/src/hypothesis/stateful.py", line 802, in precondition_wrapper
    return f(*args, **kwargs)
  File "/root/juicefs/.github/scripts/hypo/fsrand2.py", line 326, in mkdir
    assert self.equal(result1, result2), f'\033[31mmkdir:\nresult1 is {result1}\nresult2 is {result2}\033[0m'
AssertionError: mkdir:
result1 is (0, 0, '0o40000')
result2 is (0, 0, '0o40400')

----------------------------------------------------------------------
Ran 1 test in 0.028s

FAILED (failures=1)

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
  • Metadata engine info (version, cloud provider managed or self maintained):
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment