Bug #3021
OwnCloud update event dirties configuration file
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-owncloud | |||
Target version: | v6.6 | |||
Security class: | Resolution: | |||
Affected version: | v6.5 | NEEDINFO: | No |
Description
When "nethserver-owncloud-update"
event is executed a fragment of OwnCloud configuration file (/var/www/html/owncloud/config/config.php
) is duplicated:
Before event:
... 'trusted_domains' => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), ...
after event:
... 0 => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), 'trusted_domains' => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), ...
Each subsequent execution adds another "array"
fragment, with a different sequential increasing number, i.e.:
... 0 => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), 1 => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), 'trusted_domains' => array ( 0 => '192.168.1.1', 1 => 'myowncloud.test.lan', ), ...
To reproduce, just trigger the event:
signal-event nethserver-owncloud-update
In "/var/log/messages"
:
Feb 4 11:03:48 myowncloud esmith::event[12422]: Event: nethserver-owncloud-update Feb 4 11:03:48 myowncloud esmith::event[12422]: Migrating existing database accounts Feb 4 11:03:48 myowncloud esmith::event[12422]: Migrating existing database networks Feb 4 11:03:48 myowncloud esmith::event[12422]: Migrating existing database routes Feb 4 11:03:48 myowncloud esmith::event[12422]: Migrating existing database configuration Feb 4 11:03:48 myowncloud esmith::event[12422]: Migrating existing database hosts Feb 4 11:03:48 myowncloud esmith::event[12422]: Action: /etc/e-smith/events/nethserver-owncloud-update/S00initialize-default-databases SUCCESS [0.100196] Feb 4 11:03:48 myowncloud esmith::event[12422]: expanding /var/www/html/owncloud/apps/user_ldap/appinfo/register_command.php Feb 4 11:03:48 myowncloud esmith::event[12422]: expanding /etc/httpd/conf.d/owncloud.conf Feb 4 11:03:48 myowncloud esmith::event[12422]: expanding /etc/httpd/conf/httpd.conf Feb 4 11:03:48 myowncloud esmith::event[12422]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.119143] Feb 4 11:03:48 myowncloud esmith::event[12422]: Action: /etc/e-smith/events/nethserver-owncloud-update/S20nethserver-owncloud-conf SUCCESS [0.212569] Feb 4 11:03:48 myowncloud esmith::event[12422]: [INFO] service httpd restart Feb 4 11:03:48 myowncloud esmith::event[12422]: Interruzione di httpd: [ OK ]#015 Feb 4 11:03:48 myowncloud esmith::event[12422]: Avvio di httpd: [ OK ]#015 Feb 4 11:03:48 myowncloud esmith::event[12422]: [INFO] httpd restart Feb 4 11:03:48 myowncloud esmith::event[12422]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.350427] Feb 4 11:03:49 myowncloud esmith::event[12422]: Turned on maintenance mode Feb 4 11:03:54 myowncloud esmith::event[12422]: Checked database schema update Feb 4 11:03:54 myowncloud esmith::event[12422]: Updated database Feb 4 11:03:54 myowncloud esmith::event[12422]: Turned off maintenance mode Feb 4 11:03:54 myowncloud esmith::event[12422]: Update successful Feb 4 11:03:55 myowncloud esmith::event[12422]: No such app enabled: updater Feb 4 11:03:55 myowncloud esmith::event[12422]: Action: /etc/e-smith/events/nethserver-owncloud-update/S95nethserver-owncloud-conf-ldap SUCCESS [6.297508] Feb 4 11:03:55 myowncloud esmith::event[12422]: Event: nethserver-owncloud-update SUCCESSInstalled packages:
- nethserver-owncloud-1.1.2-1.ns6.noarch
- owncloud-3rdparty-7.0.4-13.1.noarch
- owncloud-7.0.4-13.1.noarch
Related issues
History
#1 Updated by Nicola Rauso over 6 years ago
- Related to Enhancement #3022: OwnCloud trusted domains added
#2 Updated by Filippo Carletti over 6 years ago
- Target version set to ~FUTURE
#3 Updated by Giacomo Sanchietti about 6 years ago
- Category set to nethserver-owncloud
#4 Updated by Giacomo Sanchietti about 6 years ago
- Status changed from NEW to TRIAGED
- Target version changed from ~FUTURE to v6.6
- % Done changed from 0 to 20
#5 Updated by Alessandro Polidori about 6 years ago
- Related to Feature #3191: Update ownCloud to 7.0.6 version added
#6 Updated by Alessandro Polidori about 6 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Alessandro Polidori
- % Done changed from 20 to 30
#7 Updated by Alessandro Polidori about 6 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Alessandro Polidori) - % Done changed from 30 to 60
A new php script /var/www/html/owncloud/config/fix_oc_config.php
replace correctly the "trusted_domains" key.
We have decided to don't fix old dirty values to avoid removing of some future owncloud values. This is beacuse the values present into the file are managed by ownCloud.
#8 Updated by Alessandro Polidori about 6 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
Repo: nethserver-testing
Packages:
nethserver-owncloud-1.1.3-1.2git5f2a121.ns6.noarch.rpm owncloud-3rdparty-7.0.6-2.2.noarch.rpm owncloud-7.0.6-2.2.noarch.rpm
Test
- Do a clean installation
- execute
signal-event nethserver-owncloud-update
- verify that "trusted_domains" key of /var/www/html/owncloud/config/config.php is correct (with no dirty values) for example:
'trusted_domains' => array ( 0 => '192.168.5.250', 1 => 'alenethserver.nethesis.it', ),
- verify that no dirty values is added to the file respect the version previous the signal-event
- Verify the previous also with update instead of clean installation
#9 Updated by Edoardo Spadoni about 6 years ago
- Assignee set to Edoardo Spadoni
#10 Updated by Edoardo Spadoni about 6 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Edoardo Spadoni) - % Done changed from 70 to 90
#11 Updated by Giacomo Sanchietti about 6 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
Released in nethserver-updates:
- owncloud-3rdparty-7.0.6-2.2.noarch.rpm
- owncloud-7.0.6-2.2.noarch.rpm
- nethserver-owncloud-1.1.4-1.ns6.noarch.rpm