Skip to content

Handle read only apps folders properly#28543

Merged
DeepDiver1975 merged 1 commit into
masterfrom
handle-cluster-setup
Aug 7, 2017
Merged

Handle read only apps folders properly#28543
DeepDiver1975 merged 1 commit into
masterfrom
handle-cluster-setup

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Jul 31, 2017

Copy link
Copy Markdown
Member

Description

This is planned to support clustered setup much better ....

Related Issue

refs https://github.com/owncloud/platform/issues/133

How Has This Been Tested?

  1. add the config parameter 'cluster.mode' -> true
  2. try to install
  3. try to operate as usual
  4. expectation: nothing will break apart ....

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DeepDiver1975 DeepDiver1975 added this to the development milestone Jul 31, 2017
@DeepDiver1975 DeepDiver1975 requested a review from PVince81 July 31, 2017 14:09
@felixboehm felixboehm added the p1-urgent Critical issue, need to consider hotfix with just that issue label Jul 31, 2017

@PVince81 PVince81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add back the check for "config_is_read_only" as upgrading to 10.0.3 would likely cause surprises for people who have it set.

If we want to remove it then deprecate it in 10.0.3 and remove completely in 11.0. But I'm not sure if we should remove it as some people without cluster setup might want to have the config read-only, so they wouldn't think about setting cluster mode.

Comment thread lib/private/Config.php Outdated
}

public function isReadOnly() {
if (!$this->getValue('installed', false)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also include the config_is_read_only key here ?

Comment thread lib/private/Installer.php Outdated
$appId = OC_App::cleanAppId($info['id']);
$basedir = OC_App::getInstallPath().'/'.$appId;
$appsFolder = OC_App::getInstallPath();
if ($appsFolder === null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you should also add is_writeable and is_readable here ? See https://github.com/owncloud/core/pull/28543/files#diff-ec8c121d705ff47eacbfdd23f36a9f6cL731.

<option value='<?php p($secure)?>' <?php p($selected) ?>><?php p($name) ?></option>
<?php endforeach;?>
</select>
<?php p($l->t('The config file is read only. Please adopt your setup by editing the config file manually.')); ?>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adopting a child ?

=> adjust

</select>
<?php p($l->t('The config file is read only. Please adopt your setup by editing the config file manually.')); ?>
<br>
<?php p($l->t('In a clustered setup please make sure to sync the file across all nodes.')); ?>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/the file/the config.php file/

to make sure this is clear

@DeepDiver1975

Copy link
Copy Markdown
Member Author

@PVince81 thanks for your feedback - I removed the config parameter 'cluster.mode' now totally. 'config_is_read_only' will do its job for now

@PVince81

PVince81 commented Aug 1, 2017

Copy link
Copy Markdown
Contributor

hmm, so does it mean that "config_read_only" will now also block the apps folder ? People who had this set will be surprised that they can't install new apps ?

@DeepDiver1975

Copy link
Copy Markdown
Member Author

hmm, so does it mean that "config_read_only" will now also block the apps folder ? People who had this set will be surprised that they can't install new apps ?

Thats my point about this all: it's a mess and needs cleanup .... this was the idea in having ONE config switch to rule them all ... 😉

@PVince81

PVince81 commented Aug 3, 2017

Copy link
Copy Markdown
Contributor

@DeepDiver1975 do we want to surprise these people ? If yes, will need proper communication

@DeepDiver1975

Copy link
Copy Markdown
Member Author

@DeepDiver1975 do we want to surprise these people ? If yes, will need proper communication

so you advocate for keeping two intendant checks

  • config_is_read_only for config stuff only
  • and test if apps folder is writable

@PVince81

PVince81 commented Aug 3, 2017

Copy link
Copy Markdown
Contributor

If this was OC 11 I'd be fine with breaking the way it works.

For OC 10 the easiest is just do nothing and maybe add a note about clustering in the documentation about the two settings to change:

  • config_is_read_only
  • the "apps_paths" setting with "writable" set to false

Now if the above doesn't work correctly then we should fix that at least.

@DeepDiver1975 DeepDiver1975 force-pushed the handle-cluster-setup branch 2 times, most recently from 30f9b82 to d93b2c9 Compare August 3, 2017 14:55
@DeepDiver1975

Copy link
Copy Markdown
Member Author

@PVince81 a much simpler solution now - only addressing if the apps folder is writable

@PVince81 PVince81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 that's better, thanks.

Please rename issue title and merge if you tested this and all still worked fine

@DeepDiver1975 DeepDiver1975 changed the title Introduce cluster.mode Handle read only apps folders properly Aug 3, 2017
@lock

lock Bot commented Aug 2, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 - To release p1-urgent Critical issue, need to consider hotfix with just that issue status/STALE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants