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

(t) Samba shares not accessible - 5.0.6-0 & 5.0.7-0 #2794 #2797

Conversation

phillxnet
Copy link
Member

@phillxnet phillxnet commented Feb 8, 2024

Introduce 'poetry-plugin-dotenv' to enable Poetry to establish environmental variables from a .env file. Add PASSWORD_STORE_DIR & DJANGO_SETTINGS_MODULE variables to inform OS level 'password-store' app, & our .venv Django of their configuration.

Fixes #2794

Includes:

  • Additional logging to poetry-install.txt to indicate plugins installed.
  • Include new .env file in project.toml for sdist inclusion.
  • NO SECRETS indicator in new .env file.
  • Add source .env to build.sh to ease development, the .env file is also read by build.sh's dedicated rockstor-build.service.
  • Pin, in build.sh, poetry-plugin-dotenv to latest 0.6.11
  • Adopt new poetry run mnt-share share-name, with required cd, in new root preexec Samba share config creation.
  • Incidentally fix legacy Poetry removal regression introduced when build.sh execution was moved to a systemd service from rpm %posttrans.
  • Add smb.conf preexec migration procedure to initrock.
  • Remove redundant smb & nmb restarts from prior preexec migrations.
  • Resource .env file in all relevant rockstor*.service files via EnvironmentFile= directive.
  • Normalise on /usr/local/bin/poetry run script invocation in all relevant rockstor*.service files.
  • Modify developer instructions (build.sh) to account for new poetry-plugin-dotenv.

Caveat

This does not address the following similar preexec failure observed (without clear cause) using 15.5 on both client & host.

smbclient --version
Version 4.17.12-git.455.b299ac1e60150500.3.20.1SUSE-oS15.0-x86_64
smbclient //192.168.2.234/test_share01 -U radmin --password=pass
tree connect failed: NT_STATUS_ACCESS_DENIED

With the following samba host side log in /var/log/samba/log.philip-mg i.e. client hostname specific log on rockstor server.

[2024/02/06 11:45:03.514875,  1] ../../source3/smbd/smb2_service.c:706(make_connection_snum)
  root preexec gave 83 - failing connection

The following issue, with as yet undetermined cause, has been created to address this caveat:
Samba: root preexec gave 83 - failing connection #2798

Introduce 'poetry-plugin-dotenv' to enable Poetry to establish
environmental variables from a .env file. Add PASSWORD_STORE_DIR &
DJANGO_SETTINGS_MODULE variables to inform OS level 'password-store'
app, & our .venv Django of their configuration.

## Includes:
- Additional logging to poetry-install.txt to indicate plugins installed.
- Include new `.env` file in project.toml for sdist inclusion.
- NO SECRETS indicator in new .env file.
- Add `source .env` to build.sh to ease development, the .env file is
also read by build.sh's dedicated rockstor-build.service.
- Pin, in build.sh, poetry-plugin-dotenv to latest 0.6.11
- Adopt new `poetry run mnt-share share-name`, with required `cd`, in
new `root preexec` Samba share config creation.
- Incidentally fix legacy Poetry removal regression introduced when
build.sh execution was moved to a systemd service from rpm %posttrans.
- Add smb.conf preexec migration procedure to initrock.
- Remove redundant smb & nmb restarts from prior preexec migrations.
- Resource .env file in all relevant rockstor*.service files
via `EnvironmentFile=` directive.
- Normalise on `/usr/local/bin/poetry run` script invocation
in all relevant rockstor*.service files.
- Modify developer instructions (build.sh) to account for new
poetry-plugin-dotenv.
@phillxnet
Copy link
Member Author

phillxnet commented Feb 8, 2024

Testing

Following the same test procedure as detailed in this pull request's prior draft version:
#2796 (comment)
we have the same outcome, i.e. existing shares migrated successfully to the new format. And a continuity from last stable to current testing with this PR pre-merged.

An additional test to confirm new SMB exports are as intended also succeeded:

smbclient //192.168.2.105/test_share02 -U radmin --password=pass
Try "help" to get a list of possible commands.
smb: \> mkdir pr2797
smb: \> ls
  .                                   D        0  Thu Feb  8 14:49:20 2024
  ..                                  D        0  Thu Feb  8 14:47:34 2024
  pr2797                              D        0  Thu Feb  8 14:49:20 2024

                7864320 blocks of size 1024. 5233152 blocks available
smb: \> q

@phillxnet phillxnet merged commit 051cf22 into rockstor:testing Feb 12, 2024
@phillxnet phillxnet deleted the 2794-(t)-Samba-shares-not-accessible-5.0.6-0-&-5.0.7-0 branch February 12, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant