-
Notifications
You must be signed in to change notification settings - Fork 138
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 broken - testing upgrade too 5.0.6-0 & 5.0.7-0 #2794 #2796
Conversation
….6-0 & 5.0.7-0 rockstor#2794 Introduce 'poetry-plugin-dotenv' to enable Poetry to establish environmental variables from a .env file. Add PASSWORD_STORE_DIR variable to inform OS level 'password-store' app of our configuration. ## Includes: - Additional logging to poetry-install.txt to indicate plugins installed. - modify export statement for PASSWORD_STORE_DIR in build.sh, this is also now set via our recent rockstor-build.service file.
…tor#2794 Update poetry-plugin-dotenv to latest 0.6.10
Dev notesThe following, with our proposed poetry-plugin-dotenv==0.6.10 in place, appears to work:
via for example a linux client test of
Using @FroggyFlox reproducer as detailed in linked issue.
And restoring the .env contents: restores the above cli smb access. |
The default entry of:
does not work, likely as the pwd is used by the plugin to find it's default
Also does not work. So it seems we have to use So given we are required to set up pwd, and so need multiple command, and thus required
|
…kstor#2794 - Include new `.env` file in project.toml for sdist inclusion. - Adopt new `poetry run mnt-share share-name`, with required `cd`, in new `root preexec` Samba share config creation.
…kstor#2794 - fix incorrect plugin url reference in build.sh - NO SECRETS indicator in .env file.
…kstor#2794 - Fix legacy Poetry removal regression introduced when build.sh execution was moved to a systemd service from rpm %posttrans. - Add python-dotenv to .env file compatibility comments.
Proposed initrock migrationIn initrock we do patch-ups of outdated configs, along with DB migrations etc. it would be nice to ensure folks' prior smb.conf preexec configs are migrated prior to relying-on/starting our entire Django function. pre preexec format update
[07/Feb/2024 13:33:37] INFO [scripts.initrock:476] ### BEGIN Establishing SMB config preexec update...
[07/Feb/2024 13:33:37] INFO [scripts.initrock:486] smb.conf preexec format updated
[07/Feb/2024 13:33:37] INFO [scripts.initrock:489] The nmb service is currently active... restart it
[07/Feb/2024 13:33:37] DEBUG [system.osi:235] Running command: /usr/bin/systemctl restart nmb
[07/Feb/2024 13:33:38] INFO [scripts.initrock:489] The smb service is currently active... restart it
[07/Feb/2024 13:33:38] DEBUG [system.osi:235] Running command: /usr/bin/systemctl restart smb
[07/Feb/2024 13:33:38] INFO [scripts.initrock:496] ### DONE Establishing SMB config preexec update... With a re-run to ensure idempotency. [07/Feb/2024 13:45:23] INFO [scripts.initrock:476] ### BEGIN Establishing SMB config preexec update...
[07/Feb/2024 13:45:23] INFO [scripts.initrock:495] smb.conf preexec already updated
[07/Feb/2024 13:45:23] INFO [scripts.initrock:496] ### DONE Establishing SMB config preexec update... post preexec fromat update
|
A quirk has been observed when restarting all services, where we hang on our smb restart:
Moving to not restarting these services as this is not actually required when changing only the preexec entry. |
…kstor#2794 - Add smb.conf preexec migration procedure to initrock. - Modify samba.py smb.conf machine edits to aid above migration target.
Revised (no smb/nmb restart) log:
To assist with our migration the following is now our target preexec format:
|
Very good point... does it mean we can probably improve |
@FroggyFlox
OK, maybe. I'll have a quick look. It does change only the exact same line. I've purposefully done a dedicated additional procedure here as we still need that last migration first to account for pre Poetry installs so 4.1.0-0 stable updating to 4.6.x-0 stable. And although we are meant to jump only one stable each time, best we leave both in place was my thinking. As a catch all. |
…kstor#2794 - remove smb nmb restarts on prior preexec migrations.
Note on a confirmation of our regression fix re legacy Poetry removal:
We had (in testing branch) a path modification that worked from %posttrans but not from the new home of rockstor-build.service ! As yet unreleased in any rpm version fixed here as trivial modification to build.sh. |
…kstor#2794 - Add DJANGO_SETTINGS_MODULE environment variable to .env file. - 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.
…kstor#2794 - In development typo in build.sh
…kstor#2794 - Update build.sh `pipx inject poetry`: poetry-plugin-dotenv==0.6.11
Test of branch to dateWeb-UI admin user radmin: stable updates install 4.6.1-0 (derived from 15.3 installer and updated via howto to 15.4 base OS) As per reproducer in linked issue:
Access from 15.5 client OS:
Web-UI initiated update to rpm build using this pull requests branch to date: 5.0.7-2796
New Web-UI login presented and Web-UI login works as expected with working Web-UI.
with exiting write access maintained:
A subsequent reboot to ensure SMB (this issue/pr focus) is maintained:
|
Given the prior comment's upgrade test, I'll move to squash and re-present as non draft pull request. |
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 of our configuration, and to centralise DJANGO_SETTINGS_MODULE's definition.
Includes:
.env
file in project.toml for sdist inclusion.poetry run mnt-share share-name
, with requiredcd
, innew
root preexec
Samba share config creation.Note: draft status - in development.