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

NS7 migration: handle space in share samba name #7295

Closed
stephdl opened this issue Feb 4, 2025 · 3 comments
Closed

NS7 migration: handle space in share samba name #7295

stephdl opened this issue Feb 4, 2025 · 3 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@stephdl
Copy link

stephdl commented Feb 4, 2025

The migration from NS7 to NS8 is broken when you use samba shares with spaces in the name of the share
Steps to reproduce

  • install a NS7 with account provider AD
  • creates some samba shares with a space inside the name
  • install ns8 migration
  • try to migrate to a NS8

Expected behavior

I expect no issue

Actual behavior

we cannot migrate the server, once connected, no error so far, we try to migrate the account provider, however we cannot finish the migration, we have errors in the UI and with errors in logs


mode of '/srv/shares' changed from 0775 (rwxrwxr-x) to 0755 (rwxr-xr-x)
Now reading shares metadata from stdin...
Enabled share foo
Enabled share helene foo
setfacl: /srv/shares/helene: No such file or directory
setfacl: foo: No such file or directory
Traceback (most recent call last):
  File "/home/samba1/.config/actions/import-module/80import_shares", line 46, in <module>
    subprocess.run(['podman', 'exec',
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['podman', 'exec', '--interactive', '--env=RSYNCD_NETWORK=10.5.4.0/24', '--env=RSYNCD_ADDRESS=10.5.4.1', '--env=RSYNCD_PORT=20003', '--env=RSYNCD_USER=samba1', '--env=RSYNCD_PASSWORD=520047505c45-aadb-4abc-adce-64d3aaf3212e', '--env=RSYNCD_SYSLOG_TAG=samba1', 'samba-dc', 'rsyncd-import-shares']' returned non-zero exit status 123.

Components

https://github.com/NethServer/ns8-samba/releases/tag/2.3.0

See also

see https://mattermost.nethesis.it/nethesis/pl/pw6gsotcc7gmtfr5xa3ebh7g1o

DavidePrincipi added a commit to NethServer/ns8-samba that referenced this issue Feb 4, 2025
If the share name contains a space, the final setfacl command fails because it cannot match the correct directory name.

This fix improves the iteration logic over share names using NUL char as item separator instead of spaces and newlines.

Refs NethServer/dev#7295
@DavidePrincipi
Copy link
Member

DavidePrincipi commented Feb 4, 2025

In testing 2.3.1-dev.2

Test case

Check the bug is not reproducible.

  • create samba share name with spaces
  • add files with spaces in name

no issue to migrate the AD + samba file system to NS8

@DavidePrincipi DavidePrincipi added this to the NethServer 8.4 milestone Feb 4, 2025
@DavidePrincipi DavidePrincipi moved this from ToDo to In Progress in NethServer Feb 4, 2025
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Feb 4, 2025
@DavidePrincipi DavidePrincipi removed their assignment Feb 4, 2025
@nethbot nethbot moved this from In Progress to Testing in NethServer Feb 4, 2025
@nrauso nrauso self-assigned this Feb 4, 2025
@nrauso
Copy link

nrauso commented Feb 5, 2025

test case VERIFIED

@nrauso nrauso added the verified All test cases were verified successfully label Feb 5, 2025
@github-actions github-actions bot removed the testing Packages are available from testing repositories label Feb 5, 2025
@nethbot nethbot moved this from Testing to Verified in NethServer Feb 5, 2025
@DavidePrincipi
Copy link
Member

@github-project-automation github-project-automation bot moved this from Verified to Done in NethServer Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Status: Done
Development

No branches or pull requests

3 participants