-
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
Add rockstor-build systemd service #2793 #2795
Add rockstor-build systemd service #2793 #2795
Conversation
Move build.sh execution from within rpm %posttrans script to it's own dedicated rockstor-build.service. Enabling greater fidelity and control over the environment and timing; and eases development and user feedback on build.sh failures in the future. Partnered with rockstor.spec changes in rockstor-rpmbuild repo. ## Includes - New rockstor-build.service file. - After= & Requires= entries in rockstor-pre on rockstor-build, to extend our service cascade. - Trivial build.sh and pkg_mgmt.py comment updates. - Add the new rockstor-build.service to initrock.py to assist in asserting the service akin to all other rockstor services. Mostly redundant given our rpm service management, but nice-to-have.
TestingAn rpm build with these proposed changes and those in the linked/partnered rpmbuild repo successfully installed and started all service: creating our .venv with the newly added rockstor-build.servcie:
And after a subsequent reboot we have the following status output from the same new service:
Indicating that we have successful conditional .venv re-construction via systemd now. A re-test of elements of the above, to prove .venv rebuild when the directory does not exist:
Succeeded in all services starting successfully and a new .venv having been constructed from Poetries cached downloads from PyPi. Poetry reinstall:To prove that our new systemd service and also install our requried poetrywe have:
On the subsequent instance we have our new poetry install and it having created our new .venv, with all services working as expected. |
UpdatingA prior V10 DB rockstor instance (15.3 stable installer derived but dup'ed to 15.4) also successfully updated to this new rpm. Successuffly rebuilding the venv and instantiating the new Poetry. This test also helps with proving no adverse interations with a long %posttrans (db_upgrade.sh) and our new rockstor-build.service. Also note that we now have the more accessible system journal (rather than zypper history log) to view our new services run of build.sh outcome:
With our expected
|
Given this is yet-another partnered pull request with one rockstor-rpmbuild the testing procedure is somewhat labour-some. But from the above comments this looks to be good to go. Easing he way for our pending Samba fix and further updates from this new rockstor*.services arrangement. But to me this feels a lot more appropriate that what we had: i.e. a super stretched use of the %posttrans scriptlet in rpm. Which has proven to be difficult for folks to repo on where failures are concerned, i.e. systemd is way more familiar than zypper logs. And examination/experimentation likewise far more familiar knowledge. I'll go ahead and merge this; a little overly architectural for RC phase of testing, but this way we start our next stable channel we mean to go on. Plus we have had way too many sensitivities re our build.sh working in terminal and not in %posttrans. Systemd gives us way more flexibility to modify our env for build.sh where-as rpm provides very little. |
Move build.sh execution from within rpm %posttrans script to it's own dedicated rockstor-build.service. Enabling greater fidelity and control over the environment and timing; and eases development and user feedback on build.sh failures in the future.
Partnered with rockstor.spec changes in rockstor-rpmbuild repo.
Includes
Fixes #2793
Partner Pull Request: