Step 1:
Navigate to nextcloud > html > edit version.php
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 | <?php $OC_Version = array (22,1,1,2); $OC_VersionString = '22.1.1' ; $OC_Edition = '' ; $OC_Channel = 'stable' ; $OC_VersionCanBeUpgradedFrom = array ( 'nextcloud' => array ( '21.0' => true, '22.0' => true, '22.1' => true, '22.2' => true, # Add this line ), 'owncloud' => array ( '10.5' => true, ), ); $OC_Build = '2021-08-26T13:27:46+00:00 1eea64f2c3eb0e110391c24830cea5f8d9c3e6a1' ; $vendor = 'nextcloud' ; |
Step 2: Run the ‘helm upgrade…’ command with the desired NextCloud version
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 | # Example: helm upgrade nextcloud nextcloud/nextcloud \ --set image.tag=22.2.0-fpm \ --set nginx.enabled=true \ --set nextcloud.host=dragoncoin.com \ --set nextcloud.username=dragon,nextcloud.password=SOMEVERYCOMPLEXANDVERYVERYLONGPASSWORD \ --set internalDatabase.enabled=false \ --set externalDatabase.existingSecret.enabled=true \ --set externalDatabase.type=postgresql \ --set externalDatabase.host='nextcloud-db-postgresql.default.svc.cluster.local' \ --set persistence.enabled=true \ --set persistence.existingClaim=nextcloud-claim \ --set persistence.size=100Ti \ --set livenessProbe.enabled=false \ --set readinessProbe.enabled=false \ --set nextcloud.phpConfigs.upload_max_size=40G \ --set nextcloud.phpConfigs.upload_max_filesize=40G \ --set nextcloud.phpConfigs.post_max_size=40G \ --set nextcloud.phpConfigs.memory_limit=80G |
Step 3: Check the logs and wait for the upgrading process to complete
Previous pods terminated to make way for new pods
1 2 3 4 | admin@controller:~$ k get pod NAME READY STATUS RESTARTS AGE nextcloud-67855fc94c-lc2xr 0/2 Terminating 0 74m nextcloud-db-postgresql-0 1/1 Running 0 91m |
1 2 3 4 | admin@controller:~$ k get pod NAME READY STATUS RESTARTS AGE nextcloud-79b5b775fd-2s4bj 2/2 Running 0 56s nextcloud-db-postgresql-0 1/1 Running 0 92m |
Expected 502 errors during pod upgrades
1 2 3 | admin@controller:~$ k logs nextcloud-79b5b775fd-2s4bj nextcloud-nginx 2021/11/01 05:36:49 [error] 32#32: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.0.95, server: , request: "GET /status.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dragoncoin.com" 10.10.0.95 - dragon [01/Nov/2021:05:36:49 +0000] "GET /status.php HTTP/1.1" 502 157 "-" "Mozilla/5.0 (Linux) mirall/3.2.2git (build 5903) (Nextcloud, linuxmint-5.4.0-89-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)" "192.168.0.164" |
Logs showing that the upgrading process has progressed… and eventually completed
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | admin@controller:~$ kubectl logs nextcloud-79b5b775fd-2s4bj nextcloud Initializing nextcloud 22.2.0.2 ... Upgrading nextcloud from 22.1.1.2 ... Initializing finished Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Updating database schema Updated database Updating <lookup_server_connector> ... Updated <lookup_server_connector> to 1.10.0 Updating <oauth2> ... Updated <oauth2> to 1.10.0 Updating <files> ... Updated <files> to 1.17.0 Updating <cloud_federation_api> ... Updated <cloud_federation_api> to 1.5.0 Updating <dav> ... Fix broken values of calendar objects Starting ... Updated <dav> to 1.19.0 Updating <files_sharing> ... Updated <files_sharing> to 1.14.0 Updating <files_trashbin> ... Updated <files_trashbin> to 1.12.0 Updating <files_versions> ... Updated <files_versions> to 1.15.0 Updating <sharebymail> ... Updated <sharebymail> to 1.12.0 Updating <workflowengine> ... Updated <workflowengine> to 2.4.0 Updating <systemtags> ... Updated <systemtags> to 1.12.0 Updating <theming> ... Updated <theming> to 1.13.0 Updating <accessibility> ... Migrate old user config 0/0 [>---------------------------] 0% Starting ... 0/0 [->--------------------------] 0% Starting ... Updated <accessibility> to 1.8.0 Updating <contactsinteraction> ... Updated <contactsinteraction> to 1.3.0 Updating <federatedfilesharing> ... Updated <federatedfilesharing> to 1.12.0 Updating <provisioning_api> ... Updated <provisioning_api> to 1.12.0 Updating <settings> ... Updated <settings> to 1.4.0 Updating <twofactor_backupcodes> ... Updated <twofactor_backupcodes> to 1.11.0 Updating <updatenotification> ... Updated <updatenotification> to 1.12.0 Updating <user_status> ... Updated <user_status> to 1.2.0 Updating <weather_status> ... Updated <weather_status> to 1.2.0 Checking for update of app accessibility in appstore Checked for update of app "accessibility" in App Store Checking for update of app activity in appstore Checked for update of app "activity" in App Store Checking for update of app audioplayer in appstore Checked for update of app "audioplayer" in App Store Checking for update of app breezedark in appstore Checked for update of app "breezedark" in App Store Checking for update of app bruteforcesettings in appstore Checked for update of app "bruteforcesettings" in App Store Checking for update of app camerarawpreviews in appstore Checked for update of app "camerarawpreviews" in App Store Checking for update of app cloud_federation_api in appstore Checked for update of app "cloud_federation_api" in App Store Checking for update of app cms_pico in appstore Checked for update of app "cms_pico" in App Store Checking for update of app contactsinteraction in appstore Checked for update of app "contactsinteraction" in App Store Checking for update of app dav in appstore Checked for update of app "dav" in App Store Checking for update of app documentserver_community in appstore Checked for update of app "documentserver_community" in App Store Checking for update of app drawio in appstore Checked for update of app "drawio" in App Store Checking for update of app external in appstore Checked for update of app "external" in App Store Checking for update of app federatedfilesharing in appstore Checked for update of app "federatedfilesharing" in App Store Checking for update of app files in appstore Checked for update of app "files" in App Store Checking for update of app files_antivirus in appstore Checked for update of app "files_antivirus" in App Store Checking for update of app files_markdown in appstore Checked for update of app "files_markdown" in App Store Checking for update of app files_mindmap in appstore Checked for update of app "files_mindmap" in App Store Checking for update of app files_pdfviewer in appstore Checked for update of app "files_pdfviewer" in App Store Checking for update of app files_rightclick in appstore Checked for update of app "files_rightclick" in App Store Checking for update of app files_sharing in appstore Checked for update of app "files_sharing" in App Store Checking for update of app files_trashbin in appstore Checked for update of app "files_trashbin" in App Store Checking for update of app files_versions in appstore Checked for update of app "files_versions" in App Store Checking for update of app files_videoplayer in appstore Checked for update of app "files_videoplayer" in App Store Checking for update of app forms in appstore Checked for update of app "forms" in App Store Checking for update of app logreader in appstore Checked for update of app "logreader" in App Store Checking for update of app lookup_server_connector in appstore Checked for update of app "lookup_server_connector" in App Store Checking for update of app maps in appstore Checked for update of app "maps" in App Store Checking for update of app music in appstore Checked for update of app "music" in App Store Checking for update of app news in appstore Checked for update of app "news" in App Store Checking for update of app notifications in appstore Checked for update of app "notifications" in App Store Checking for update of app oauth2 in appstore Checked for update of app "oauth2" in App Store Checking for update of app password_policy in appstore Checked for update of app "password_policy" in App Store Checking for update of app photos in appstore Checked for update of app "photos" in App Store Checking for update of app privacy in appstore Checked for update of app "privacy" in App Store Checking for update of app provisioning_api in appstore Checked for update of app "provisioning_api" in App Store Checking for update of app quicknotes in appstore Checked for update of app "quicknotes" in App Store Checking for update of app recommendations in appstore Checked for update of app "recommendations" in App Store Checking for update of app registration in appstore Checked for update of app "registration" in App Store Checking for update of app richdocuments in appstore Checked for update of app "richdocuments" in App Store Checking for update of app serverinfo in appstore Checked for update of app "serverinfo" in App Store Checking for update of app settings in appstore Checked for update of app "settings" in App Store Checking for update of app sharebymail in appstore Checked for update of app "sharebymail" in App Store Checking for update of app spreed in appstore Checked for update of app "spreed" in App Store Checking for update of app support in appstore Checked for update of app "support" in App Store Checking for update of app survey_client in appstore Checked for update of app "survey_client" in App Store Checking for update of app systemtags in appstore Checked for update of app "systemtags" in App Store Checking for update of app tasks in appstore Checked for update of app "tasks" in App Store Checking for update of app text in appstore Checked for update of app "text" in App Store Checking for update of app theming in appstore Checked for update of app "theming" in App Store Checking for update of app twofactor_backupcodes in appstore Checked for update of app "twofactor_backupcodes" in App Store Checking for update of app updatenotification in appstore Checked for update of app "updatenotification" in App Store Checking for update of app user_status in appstore Checked for update of app "user_status" in App Store Checking for update of app video_converter in appstore Checked for update of app "video_converter" in App Store Checking for update of app viewer in appstore Checked for update of app "viewer" in App Store Checking for update of app weather_status in appstore Checked for update of app "weather_status" in App Store Checking for update of app workflowengine in appstore Checked for update of app "workflowengine" in App Store Starting code integrity check... |
After about 5 minutes (depending on the system hardware), NextCloud should be rendered back online. At this point, the upgrade has completed.
Categories:
Shaun
Hi.
I have a question regarding :”Navigate to nextcloud > html > edit version.php” is that in the pod(container)? And why this step important?
I only changed the pull image to 22.2.xx. after a helm upgrade everything worked fine. But after a server reboot my internal mariadb went in to a crashloop. How ever probally a different problem…
Thanks
Cheers
Shaun
kimconnect
Hi Shaun,
The version.php file is located in persistent storage, typically NFS associated with PVC of the pod. The idea is to set variable $OC_VersionCanBeUpgradedFrom to include newer versions of the app.
MariaDB crashing could be indicative of a problem with db pod. I would run ‘kubectl logs MARIADBPODNAME’ to view its errors and status. Often, the username/password of DB on helm upgrade doesn’t match the persistent database’s prior configs.
Good luck and happy helming!
Kim