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

Web-UI update fails to recreate venv #2652 #2654

Conversation

phillxnet
Copy link
Member

Unset no longer required, and counterproductive to Poetry venv rebuild, VIRTUAL_ENV environmental variable within the programmatically created AT update script.

Fixes #2652

See issue text for development context.

Unset no longer required, and counterproductive to
Poetry venv rebuild, VIRTUAL_ENV environmental
variable within the programmatically created AT
update script.
@FroggyFlox
Copy link
Member

Thanks a lot for taking the time to find the fix create the issue, and prepare the PR!

If I'm correct, this fix will apply only to future updates after the one containing this PR, but I don't see any other way so far. We always have the functioning update through cli so far.

@phillxnet
Copy link
Member Author

@FroggyFlox Re:

If I'm correct, this fix will apply only to future updates after the one containing this PR

Yes, but we have only seen this failure (without by-hand recreation) on our as-yet unsupported 15.5 base OS. So getting this out before we begin that support was the hope. Plus we only cover 15.5 in testing (officially) as of yet.

Thanks for the clarification on this one. Quite important point as it goes.

I've now successfully built and installed a 15.5 hosted rpm with this patch pre-applied, and given we have tested this fix in development re it's modified update script fixing the observed issue, I'll go ahead and get this merged.

@phillxnet phillxnet merged commit 1699d7b into rockstor:testing Aug 14, 2023
@phillxnet phillxnet deleted the 2652-Web-UI-update-fails-to-recreate-venv branch August 14, 2023 18:14
@phillxnet
Copy link
Member Author

Testing:

An rpm with these modification in place as version 5.0.2-2654 successfully updated via Web-UI to 5.0.2-2655 (built to test a later unrelated pull request).

journalctl -f
...
Aug 15 13:07:21 rleap15-5 systemd[1]: Started Session 7 of User root.
Aug 15 13:07:21 rleap15-5 atd[16488]: pam_unix(atd:session): session opened for user root by (uid=25)
Aug 15 13:07:37 rleap15-5 dbus-daemon[653]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.54' (uid=0 pid=16602 comm="/usr/lib/zypp/plugins/commit/snapper-zypp-plugin ")
Aug 15 13:07:37 rleap15-5 systemd[1]: Starting DBus interface for snapper...
Aug 15 13:07:37 rleap15-5 dbus-daemon[653]: [system] Successfully activated service 'org.opensuse.Snapper'
Aug 15 13:07:37 rleap15-5 systemd[1]: Started DBus interface for snapper.
Aug 15 13:07:38 rleap15-5 [RPM][16901]: Transaction ID 64db6a8a started
Aug 15 13:07:38 rleap15-5 [RPM][16901]: erase rockstor-5.0.2-2654.x86_64: success
Aug 15 13:07:38 rleap15-5 systemd[1]: Reloading.
Aug 15 13:07:39 rleap15-5 systemd[1]: Reloading.
Aug 15 13:07:40 rleap15-5 [RPM][16901]: install rockstor-5.0.2-2655.x86_64: success
Aug 15 13:07:40 rleap15-5 systemd[1]: Reloading.
Aug 15 13:07:40 rleap15-5 [RPM][16901]: erase rockstor-5.0.2-2654.x86_64: success
Aug 15 13:07:40 rleap15-5 [RPM][16901]: Transaction ID 64db6a8a finished: 0
Aug 15 13:08:26 rleap15-5 atd[16488]: pam_unix(atd:session): session closed for user root
Aug 15 13:08:26 rleap15-5 systemd[1]: session-7.scope: Deactivated successfully.
rleap15-5:~ # tail -n 1 /opt/rockstor/poetry-install.txt 
Installing the current project: rockstor (5.0.2)

and root's notification email detailing this update:

From root@localhost  Tue Aug 15 13:08:26 2023
X-Original-To: root
Delivered-To: root@localhost
Subject: Output from your job       12
To: root@localhost
Date: Tue, 15 Aug 2023 13:08:26 +0100 (WEST)
From: root <root@localhost>

Failed to stop rockstor-jslibs.tar.gz.service: Unit rockstor-jslibs.tar.gz.service not loaded.
Failed to stop rockstor-jslibs.tar.gz.sha256sum.service: Unit rockstor-jslibs.tar.gz.sha256sum.service not loaded.
Failed to stop rockstor-tasks-huey.db.service: Unit rockstor-tasks-huey.db.service not loaded.
Failed to stop rockstor-tasks-huey.db-shm.service: Unit rockstor-tasks-huey.db-shm.service not loaded.
Failed to stop rockstor-tasks-huey.db-wal.service: Unit rockstor-tasks-huey.db-wal.service not loaded.
Repository 'Buildbot-Testing' is up to date.
Repository 'Local-Repository' is up to date.
Repository 'home_rockstor' is up to date.
Repository 'home_rockstor_branches_Base_System' is up to date.
Retrieving repository 'Update repository of openSUSE Backports' metadata [...............done]
Building repository 'Update repository of openSUSE Backports' cache [...done]
Repository 'Non-OSS Repository' is up to date.
Repository 'Open H.264 Codec (openSUSE Leap)' is up to date.
Repository 'Main Repository' is up to date.
Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up to date.
Repository 'Main Update Repository' is up to date.
Repository 'Update Repository (Non-Oss)' is up to date.
All repositories have been refreshed.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following package is going to be upgraded:
  rockstor

1 package to upgrade.
Overall download size: 2.3 MiB. Already cached: 0 B. After the operation, additional 5.0 B will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: rockstor-5.0.2-2655.x86_64 (Local-Repository) (1/1),   2.3 MiB    

Checking for file conflicts: [...done]
(1/1) Installing: rockstor-5.0.2-2655.x86_64 [.........done]
Executing %posttrans script 'rockstor-5.0.2-2655.x86_64.rpm' [..
Retrieving Poetry metadata

The latest version (1.1.15) is already installed.

Creating jslibs/js/lib & populating from rockstor-jslibs.tar.gz
...
If installing from source, from scratch, for development:
1. Run 'cd /opt/rockstor'.
2. Run 'systemctl start postgresql'.
3. Run 'export DJANGO_SETTINGS_MODULE=settings'.
4. Run 'poetry run initrock' as root (equivalent to rockstor-pre.service).
5. Run 'systemctl enable --now rockstor-bootstrap'.
..done]
There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.

N.B. contextual information re our outstanding issue #2651 & rockstor/rockstor-rpmbuild#43 where we currently fail to restart our services:

rleap15-5:~ # zypper ps -s
The following running processes use deleted files:

PID   | PPID  | UID | User | Command   | Service
------+-------+-----+------+-----------+---------
13597 | 13580 | 0   | root | python3.6 | rockstor
13598 | 13580 | 0   | root | python3.6 | rockstor
13604 | 13596 | 0   | root | python3.6 | rockstor
13607 | 13596 | 0   | root | python3.6 | rockstor

You may wish to restart these processes.
See 'man zypper' for information about the meaning of values in the above table.

No core libraries or services have been updated since the last system boot.
Reboot is probably not necessary.

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.

2 participants