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

Automatic upgrade after package upgrade #12125

Closed
PVince81 opened this issue Nov 12, 2014 · 15 comments
Closed

Automatic upgrade after package upgrade #12125

PVince81 opened this issue Nov 12, 2014 · 15 comments
Milestone

Comments

@PVince81
Copy link
Contributor

Since OC 7 there's a "Update now" button that needs to be clicked manually.

Ideally admins should rather run ./occ upgrade to make sure to not run into PHP timeouts.

The idea is to provide a mechanism to run an unattended upgrade:

  1. In the case of distro packages, automatically run ./occ upgrade on the instance
  2. In the case of tarballs, provide a config.php option to disable the "Update now" button and run the upgrade automatically (but need to look into potential concurrency issues if multiple people open OC at the same time)

CC @jnweiger

@PVince81
Copy link
Contributor Author

Additionally it reminds me of #10602. In pre-install the package should first enable maintenance mode to prevent people accessing the OC instance while the files are overwritten.

So the idea is:

  • preinstall: ./occ maintenance:mode --on
  • postinstall: ./occ upgrade

This would also assume that the admin already have a backup mechanism in place.

@jnweiger
Copy link
Contributor

I've added a draft to the specfile at https://build.opensuse.org/package/show/home:jnweiger:branches:isv:ownCloud:community:7.0/owncloud

Should that do the job? It also should obsolete messing around with apache, I suppose!

When we say 'occ upgrade', does that automatically end maintenance mode?

@PVince81
Copy link
Contributor Author

@jnweiger last time when I upgraded to 7.0.3 on openSUSE, I did the following:

  1. Manually set maintenance to true
  2. zypper update
  3. ./occ upgrade

After that it seemed that the maintenance mode was gone, so the answer to your question is: yes

@jnweiger
Copy link
Contributor

@PVince81 thanks!

@MorrisJobke
Copy link
Contributor

@PVince81 @jnweiger Keep in mind, that the user of the webserver could be something really special and not determinable. I guess an output like "You need to run upgrade manually" would be less harmful. Or am I wrong?

@jnweiger
Copy link
Contributor

@MorrisJobke In my branch I am running occ as root during install. Should it be run as webserver user instead?

Detemining the name of the webserver user is not an issue. This is already part of the installation procedure.

@MorrisJobke
Copy link
Contributor

@jnweiger Yes. Because it sometimes also modifies files (I remind some config.php fixes) that the webserver should be able to write afterwards. cc @LukasReschke Didn't you add this?

@LukasReschke
Copy link
Member

Yup. Run occ ever only as webserver user. Everything else might lead to problems and should also not work (at least for some commands it doesn't)

@jnweiger
Copy link
Contributor

@LukasReschke thanks! (Sounds like we want to have that as an assertion in occ ... )
I've added su to my branch. I still lack a test suite for update scenarios, though...

@jnweiger
Copy link
Contributor

@jnweiger jnweiger reopened this Jan 29, 2015
@jnweiger
Copy link
Contributor

@jnweiger
Copy link
Contributor

Implementation is in debian.owncloud-server.preinst debian.owncloud-server.postinst
Confirmed working well for owncloud 7->8 ugrade. Please reopen, if needed for 7.0.x updates.

@MorrisJobke MorrisJobke added this to the 8.0-current milestone Feb 10, 2015
@mcnesium
Copy link

mcnesium commented Mar 5, 2015

Doesnt look like it works over here. OC 8 -> 8.0.1

eepo3cee

@mcnesium
Copy link

has this been snafu-related?

@mcnesium
Copy link

It had, obviously. The current method is way better than it used to be for users (if it finally works*). Thank you for changing that!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants