Owncloud 10.0.7-20180221 problem with upgrade

owncloud

#1

Today I tried to upgrade to Owncloud 10.0.7-20180221 but now I have a big problem: at the end of the upgrade I had a critical error “Setup script failed!” and now even after reboot Owncloud doesn’t start.

Could someone help me please?

Here /var/log/univention/appcenter.log

23431 actions.start                    18-05-21 10:29:23 [    INFO]: Starting docker-app-owncloud (via systemctl): docker-app-owncloud.service.
 23431 actions.start                    18-05-21 10:29:23 [   DEBUG]: /etc/init.d/docker-app-owncloud returned with 0
 23431 actions.start.progress           18-05-21 10:29:23 [   DEBUG]: 100
 23431 actions.upgrade                  18-05-21 10:29:26 [    INFO]: Calling ['docker', 'cp', '/etc/timezone', '7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b:/etc/timezone']
 23431 actions.upgrade                  18-05-21 10:29:27 [    INFO]: Calling ['docker', 'cp', '/etc/localtime', '7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b:/etc/localtime']
 23431 actions.upgrade                  18-05-21 10:29:28 [    INFO]: Calling ['docker', 'cp', u'/etc/owncloud.secret', u'7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b:/etc/owncloud.secret']
 23431 actions.configure                18-05-21 10:29:29 [   DEBUG]: Calling configure
 23431 actions.configure.progress       18-05-21 10:29:29 [   DEBUG]: 0
 23431 actions.configure                18-05-21 10:29:29 [    INFO]: Configuring 4.2/owncloud=10.0.7-20180221
 23431 actions.configure.container.7b05 18-05-21 10:29:29 [   DEBUG]: Using container.7b05 for container 7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b
 23431 actions.configure.container.7b05 18-05-21 10:29:29 [   DEBUG]: Calling docker exec 7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b which ucr
 23431 actions.configure                18-05-21 10:29:29 [ WARNING]: ucr cannot be found, falling back to changing the database file directly
 23431 actions.configure.progress       18-05-21 10:29:30 [   DEBUG]: 100
 23431 actions.upgrade.progress         18-05-21 10:29:30 [   DEBUG]: 50
 23431 actions.upgrade                  18-05-21 10:29:30 [    INFO]: Executing interface restore_data_before_setup for owncloud
 23431 actions.upgrade                  18-05-21 10:29:30 [    INFO]: No interface defined
 23431 actions.upgrade                  18-05-21 10:29:30 [    INFO]: Executing interface setup for owncloud
 23431 actions.upgrade                  18-05-21 10:29:30 [    INFO]: Copying App Center's setup to container's /usr/share/univention-docker-container-mode/setup_custom
 23431 actions.upgrade.container.7b05   18-05-21 10:29:30 [   DEBUG]: Using container.7b05 for container 7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b
 23431 actions.upgrade.container.7b05   18-05-21 10:29:30 [   DEBUG]: Calling docker exec 7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b /usr/share/univention-docker-container-mode/setup_custom --username Administrator --app owncloud --error-file /var/univention/tmp/tmpdCeKvQ --password-file /var/univention/tmp/tmpYJJaTF --app-version 10.0.7-20180221
 23431 actions.upgrade.container.7b05   18-05-21 10:29:30 [    INFO]: enabling ldap app in docker setup script
 23431 actions.upgrade.container.7b05   18-05-21 10:29:31 [    INFO]: ownCloud or one of the apps require upgrade - only a limited number of commands are available
 23431 actions.upgrade.container.7b05   18-05-21 10:29:31 [    INFO]: You may use your browser or the occ upgrade command to do the upgrade
 23431 actions.upgrade.container.7b05   18-05-21 10:29:35 [    INFO]: ownCloud or one of the apps require upgrade - only a limited number of commands are available
 23431 actions.upgrade.container.7b05   18-05-21 10:29:35 [    INFO]: You may use your browser or the occ upgrade command to do the upgrade
 23431 actions.upgrade.container.7b05   18-05-21 10:29:39 [    INFO]: ownCloud or one of the apps require upgrade - only a limited number of commands are available
 23431 actions.upgrade.container.7b05   18-05-21 10:29:39 [    INFO]: You may use your browser or the occ upgrade command to do the upgrade
 23431 packages                         18-05-21 10:29:42 [   DEBUG]: Releasing LOCK
 23431 actions.upgrade                  18-05-21 10:29:42 [CRITICAL]: Setup script failed!
 23431 actions.upgrade                  18-05-21 10:29:42 [ WARNING]: Aborting...
 23431 actions.remove                   18-05-21 10:29:42 [   DEBUG]: Calling remove
 23431 actions.remove.progress          18-05-21 10:29:42 [   DEBUG]: 0
 23431 actions.remove                   18-05-21 10:29:42 [    INFO]: Going to remove ownCloud (10.0.7-20180221)
 23431 actions.remove                   18-05-21 10:29:47 [   DEBUG]: Calling prescript (prerm)
 23431 actions.remove                   18-05-21 10:29:47 [   DEBUG]: /var/cache/univention-appcenter/appcenter.software-univention.de/4.2/owncloud_20171212183310.prerm does not exist
 23431 packages                         18-05-21 10:29:47 [   DEBUG]: Holding LOCK
 23431 packages                         18-05-21 10:29:49 [   DEBUG]: Releasing LOCK
 23431 actions.upgrade-search           18-05-21 10:29:51 [   DEBUG]: Calling upgrade-search
 23431 actions.upgrade-search.progress  18-05-21 10:29:51 [   DEBUG]: 0
 23431 actions.upgrade-search           18-05-21 10:29:51 [   DEBUG]: Checking 4.2/owncloud=10.0.7-20180221
 23431 actions.upgrade-search           18-05-21 10:29:51 [    INFO]: 4.2/owncloud=10.0.7-20180221: Not running, cannot check further
 23431 actions.upgrade-search.progress  18-05-21 10:29:51 [   DEBUG]: 100
 23431 actions.remove                   18-05-21 10:29:51 [   ERROR]: No such attribute: modify/delete: memberUid: no such value
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/remove.py", line 51, in main
    return self.do_it(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install_base.py", line 105, in do_it
    self._do_it(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_remove.py", line 50, in _do_it
    self._unregister_host(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/register.py", line 299, in _unregister_host
    remove_object_if_exists('computers/%s' % app.docker_server_role, lo, pos, hostdn)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/udm.py", line 84, in remove_object_if_exists
    obj.remove()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 734, in remove
    return self._remove(remove_childs)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1251, in _remove
    self._ldap_post_remove()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/memberserver.py", line 537, in _ldap_post_remove
    univention.admin.handlers.simpleComputer._ldap_post_remove(self)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2688, in _ldap_post_remove
    groupObject.fast_member_remove([self.dn], self.oldattr.get('uid', []), ignore_license=1)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/groups/group.py", line 487, in fast_member_remove
    return self.lo.modify(self.dn, ml, ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 505, in modify
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError: No such attribute: modify/delete: memberUid: no such value
 23431 utils                            18-05-21 10:29:51 [   DEBUG]: send_information: action=upgrade app=owncloud value={'code': 137, 'stderr': []} status=416
 23431 utils                            18-05-21 10:29:51 [   DEBUG]: tracking information: {'status': 416, 'uuid': '59826929-0157-417d-b9eb-29f19e5c96bc', 'app': u'owncloud', 'value': {'code': 137, 'stderr': []}, 'version': u'10.0.7-20180221', 'role': 'domaincontroller_slave', 'action': 'upgrade', 'system-uuid': '450b2894-a736-4b30-8e68-55d9e8eba008'}
 23431 actions.upgrade-search           18-05-21 10:29:53 [   DEBUG]: Calling upgrade-search
 23431 actions.upgrade-search.progress  18-05-21 10:29:53 [   DEBUG]: 0
 23431 actions.upgrade-search           18-05-21 10:29:53 [   DEBUG]: Checking 4.2/owncloud=10.0.7-20180221
 23431 actions.upgrade-search           18-05-21 10:29:53 [    INFO]: 4.2/owncloud=10.0.7-20180221: Not running, cannot check further
 23431 actions.upgrade-search.progress  18-05-21 10:29:53 [   DEBUG]: 100
 23431 actions.upgrade.progress         18-05-21 10:29:53 [   DEBUG]: 100
````Preformatted text`

#2

I forgot to say the the currently installed release version of UCS is 4.3-0 errata84

I noticed also this error:

univention-app shell owncloud
Cannot run command: 4.2/owncloud=10.0.7-20180221 is not running in a container

#3

I’m still fighting with this problem.
Today I tried to remove owncloud and I got:

univention-app remove owncloud
Going to remove ownCloud (10.0.7-20180221)
Password for Administrator: 
Configuring 4.2/owncloud=10.0.7-20180221
Starting docker-app-owncloud (via systemctl): docker-app-owncloud.service.
Executing interface store_data for owncloud
Copying App Center's store_data to container's /usr/share/univention-docker-container-mode/store_data_custom
Error response from daemon: Container 7b05fb6d3b911b08defa4a0141b3fa4c6e68edac2c98ff0c6a788c8b903ef44b is not running
Image upgrade script (pre) failed
Storing data for 4.2/owncloud=10.0.7-20180221 failed
Could not backup container!
Aborting...
4.2/owncloud=10.0.7-20180221: Not running, cannot check further

What’s happening? Could someone help me? Thanks!


#4

Hi.

Can you provide more information about your setup and the commands you used to upgrade?

I just downloaded the new 10.0.7 appliance, and performed the upgrade of the ownCloud app to 10.0.8 and it worked.


#5

Sorry, I can’t provide more informations about this problem because I decide to install a new server with Nextcloud and move all my users there.

Thanks.


#6

I’m pretty sure that the problems with the upgrade are related to this bug I’ve analysed and described here. The result of said bug is that the container cannot be restarted (it only works once directly after the app has been installed, but each following attempt at starting the container fails).

During the update one of the first thing that’s attempted is starting the container. As that fails, the upgrade fails.

According to @damrose the app vendor is working on a fix. Hopefully that fix will include instructions how to get out of the situation once one is in it — if we cannot upgrade to a fixed version, the fixed version doesn’t help us much.

During my investigation I’ve also looked at Nextcloud’s app installation scripts. They’re much saner and avoid these pitfalls by passing LDAP parameters into the container via environment variables instead of bind mounts. Much safer and less error-prone.


#7

Thanks @Moritz_Bunkus for your reply. It seems I took the right decision… until now no problems with Nexcloud (but I did only one upgrade)… we’ll see… thanks.


#8

Passing the LDAP variables, if we are talking about the same thing, as a mount was a temporary fix to allow the users who are still on the 9.1 version of ownCloud to migrate with all their settings, users and data. I don’t know how nextcloud is doing this, or if their concerned with it at all.

The critical error during the update is fixed now, and we are in the final stages of releasing the app with 10.0.8 so that users can update to it. It was caused by something the docker container tried to do, but it was not visible in the univention log that you posted. this behavior does not happen with the new app.

About the sanity of our scripts - we try to improve them constantly. I think they are now much “saner” then their were before.


#9

Thanks @dmitry, good to know that the critical error during the update was fixed, we really need good script, well done!