| [06:49:31] | * kawaiipunkshetheyEMF3160[m] has joined #farmos |
| [11:05:50] | * tool172[m] has joined #farmos |
| [11:05:51] | <tool172[m]> | for docker updates. 3.2.2 is hanging on me I cna't remember why its been so long since i updated. docker-composed it and i show on the modules screen still in 2.2 |
| [11:06:02] | <tool172[m]> | well 2.1.1 |
| [11:10:58] | <tool172[m]> | ACTION uploaded an image: (52KiB) < https://matrix.org/_matrix/media/v3/download/matrix.org/cCKJXluwpKVuSaIb... > |
| [11:11:56] | * mstenta[m] has joined #farmos |
| [11:11:57] | <mstenta[m]> | Hi tool172 did you follow the update procedure outlined here? https://farmos.org/hosting/update/ |
| [11:12:07] | <tool172[m]> | I'll run it again |
| [11:12:15] | <tool172[m]> | it says no updates each time which is weird |
| [11:12:57] | <mstenta[m]> | If your module screen says farmOS 2.1.1 then you haven't updated. |
| [11:13:20] | <mstenta[m]> | Are you running farmOS in Docker? |
| [11:13:49] | <tool172[m]> | yes |
| [11:14:03] | <tool172[m]> | it wont update from update.php or exec upb |
| [11:14:22] | <mstenta[m]> | update.db / drush updb does not download new code. You need to do that before you run those |
| [11:14:55] | <mstenta[m]> | update.db / drush updb just runs Drupal's "update hooks" which are used to make changes to database/config when a new version is detected |
| [11:15:05] | <mstenta[m]> | but you need to run the new version first |
| [11:15:17] | <mstenta[m]> | and as it says at the top of that page I just linked... very important... |
| [11:15:21] | <mstenta[m]> | > ALWAYS BACKUP YOUR DATABASE, CODE, AND FILES BEFORE ATTEMPTING AN UPDATE! |
| [11:15:23] | <mstenta[m]> | :-) |
| [11:15:35] | <mstenta[m]> | especially a big update like 2.x to 3.x |
| [11:16:10] | <mstenta[m]> | that page shows the 4 steps to updating |
| [11:16:45] | <tool172[m]> | update.php doesnt run updates |
| [11:16:54] | <tool172[m]> | it just says your good |
| [11:16:54] | <mstenta[m]> | 1. Backup your database and files!... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/kEYLnzRLemOOJnJE...) |
| [11:17:17] | <tool172[m]> | i updated the image to 3.2.2 tag and docker composed it up, then update.php |
| [11:17:22] | <mstenta[m]> | tool172: it sounds like you are just doing step 3, without doing step 2 (and hopefully you did step 1!) |
| [11:17:37] | <tool172[m]> | i pulled the new image |
| [11:17:42] | <mstenta[m]> | ok. there are a few ways to set up docker... so we can check a few things... |
| [11:17:53] | <mstenta[m]> | first run docker ps and be sure that you are running the new version |
| [11:18:11] | <mstenta[m]> | you need to do docker compose down before docker compose up, otherwise docker will use the old image |
| [11:18:33] | <mstenta[m]> | if that's not the issue, then I'm curious what volumes you are mounting |
| [11:18:38] | <tool172[m]> | i did |
| [11:18:46] | <tool172[m]> | i run 12 stacks :{ |
| [11:19:03] | <mstenta[m]> | ok, i don't know that unless you tell me explicitly :-) |
| [11:19:15] | <tool172[m]> | let me pull up my volumes |
| [11:19:23] | <tool172[m]> | maybe i dorked it up there since i have a custom compose |
| [11:20:12] | <tool172[m]> | ./www:/opt/drupal |
| [11:20:29] | <mstenta[m]> | ok. yea. that's why. |
| [11:21:09] | <mstenta[m]> | explanation: that means the whole farmOS codebase is being mounted to the volume, so updating the container image is not updating the code. |
| [11:21:31] | <tool172[m]> | i think i did that a while back for a error in the beta |
| [11:21:39] | <mstenta[m]> | the recommended volume mount for "production" docker hosting is /opt/drupal/web/sites, which is only the settings.php and uploaded files basically |
| [11:21:41] | <tool172[m]> | i had to manually migrate some stuff |
| [11:21:52] | <mstenta[m]> | but you might want to be careful changing it |
| [11:22:07] | <mstenta[m]> | is this a "stock" farmOS instance? or have you added any customizations/extra modules/etc? |
| [11:22:20] | <tool172[m]> | come on man 5 years we both know i have customs |
| [11:22:33] | <tool172[m]> | i had ot hack it originally for the image saving |
| [11:22:48] | <tool172[m]> | to override some code |
| [11:22:54] | <tool172[m]> | i think google maps but i migrated since then |
| [11:22:57] | <tool172[m]> | we should be good |
| [11:23:00] | <mstenta[m]> | hmm ok... well... time to tease that apart i guess 😅 |
| [11:23:20] | <tool172[m]> | i'm just gonna rip the bandaid off |
| [11:23:22] | <tool172[m]> | thanks man |
| [11:23:45] | <mstenta[m]> | take a db backup first! |
| [11:23:48] | <symbioquine[m]> | Yeah, first step: Make sure you can create copies of your existing production environment to test/develop against. |
| [11:23:51] | <tool172[m]> | i am |
| [11:24:00] | <mstenta[m]> | it's definitely possible to end up in a broken state that is hard to get out of |
| [11:24:09] | <mstenta[m]> | but a backup avoids that 👍️ |
| [11:24:30] | <symbioquine[m]> | mstenta[m]: A tested backup/restoration strategy. |
| [11:24:39] | <tool172[m]> | i know....like when we did the other migration |
| [11:24:41] | <tool172[m]> | a few years ago |
| [11:25:26] | <mstenta[m]> | do you recall what customizations you made? |
| [11:25:55] | <mstenta[m]> | if you want to be extra thorough, you could download a stock 2.1.1 and run a diff on the whole codebase |
| [11:27:23] | <tool172[m]> | i'm going to just open the new one and migrate again |
| [11:27:27] | <tool172[m]> | i have the db saved |
| [11:27:31] | <tool172[m]> | easy peasy |
| [11:27:35] | <mstenta[m]> | oh. well... |
| [11:27:42] | <mstenta[m]> | there isn't a "migration" from v2 to v3 |
| [11:27:44] | <symbioquine[m]> | Hmmm, no new data? |
| [11:27:46] | <mstenta[m]> | it's an update |
| [11:27:57] | <tool172[m]> | i can import |
| [11:27:59] | <mstenta[m]> | we had to do a "migration" from v1 to v2 because it was such a huge change |
| [11:28:16] | <tool172[m]> | let me see what it does once i flip it |
| [11:28:19] | <tool172[m]> | it might work fine |
| [11:28:26] | <mstenta[m]> | haha ok! good luck! |
| [11:29:16] | <mstenta[m]> | as long as you didn't make any configuration changes (stored in the database), then an SQL import into the new version + running drush updb might work fine! |
| [11:29:46] | <mstenta[m]> | but... if you added any modules in your old instance, and those don't exist in the new codebase, you will run into problems |
| [11:53:58] | <tool172[m]> | files are present and it just lists permission issues which is probably why i backed it out.... |
| [11:54:01] | <tool172[m]> | oh the rabbit hole |
| [12:02:18] | <mstenta[m]> | Oh yea you'll also need to transfer any uploaded files/images |
| [12:04:44] | <tool172[m]> | i should have to its all in there correctly |
| [12:05:00] | <tool172[m]> | its the same reason i backed out of it in the first place. its a drupal permission thing i jjust need to solve |
| [13:00:46] | <tool172[m]> | is SCRAM default now? |
| [13:00:49] | <tool172[m]> | for postgres |
| [13:01:01] | <tool172[m]> | regarding farm os side |
| [13:02:50] | <mstenta[m]> | Do you mean for Drupal user passwords? |
| [13:03:02] | <tool172[m]> | database specifically |
| [13:03:11] | <mstenta[m]> | farmOS just uses whatever Drupal does, so that might be a Drupal question |
| [13:40:14] | <tool172[m]> | that was it |
| [13:40:36] | <tool172[m]> | i'm going to reset it up again...this time going forward since i'm not hacking beta to be in docker i should be good though right |
| [14:27:15] | <tool172[m]> | is there a tool to migrate my data and entities and kml and roll with new install easily? |
| [14:27:39] | <tool172[m]> | i can't export from 2.1.1 |
| [14:33:42] | <mstenta[m]> | Not that I know of |
| [14:33:58] | <mstenta[m]> | Other than CSV and KML exports/imports |
| [14:34:08] | <mstenta[m]> | But they are limited, and not designed for migration |
| [14:34:40] | <tool172[m]> | its codebase errors inbetween |
| [14:34:42] | <mstenta[m]> | Did you run into trouble exporting? |
| [14:34:52] | <tool172[m]> | yep |
| [14:36:44] | <tool172[m]> | 1 error i need to figure out and i can update |
| [14:36:58] | <mstenta[m]> | What is the error? |
| [14:37:01] | <tool172[m]> | ACTION uploaded an image: (62KiB) < https://matrix.org/_matrix/media/v3/download/matrix.org/dIwaCpYsbVkXrHuY... > |
| [14:37:09] | <tool172[m]> | this comes up in that container |
| [14:37:15] | <tool172[m]> | i have the filesystem |
| [14:37:19] | <tool172[m]> | i have the settings file |
| [14:37:23] | <tool172[m]> | all there |
| [14:37:56] | <mstenta[m]> | What OS are you running Docker on? |
| [14:38:03] | <tool172[m]> | ubuntu |
| [14:38:16] | <tool172[m]> | www-data is chowned |
| [14:38:47] | <mstenta[m]> | What is your volume config this time? |
| [14:38:58] | <tool172[m]> | it is correct |
| [14:39:01] | <tool172[m]> | per your rec |
| [14:39:23] | <tool172[m]> | this error comes up when i switch the volume rec |
| [14:39:33] | <mstenta[m]> | Copy and paste so I can be extra sure? :-) |
| [14:39:55] | <mstenta[m]> | Seeing your whole docker-compose.yml would help |
| [14:40:03] | <tool172[m]> | ./www:/opt/drupal/web/sites |
| [14:40:44] | <tool172[m]> | version: '3'... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/febDNQURsTenUOwf...) |
| [14:40:46] | <mstenta[m]> | ls -al ./www |
| [14:41:19] | <mstenta[m]> | You're still using the old farmOS 2.1.1 image? |
| [14:41:26] | <tool172[m]> | yea |
| [14:41:37] | <tool172[m]> | i wasnt joking its been a while |
| [14:41:51] | <mstenta[m]> | I guess i'm confused what you're trying to do |
| [14:41:58] | <tool172[m]> | upgrade to 3 |
| [14:42:14] | <tool172[m]> | so i tried to upgarde and existing per pic up top is 2.1.1 |
| [14:42:29] | <tool172[m]> | so i flipped the volume to your rec and i get massive permission errors |
| [14:42:29] | <mstenta[m]> | I thought you were setting up a new instance on v3 and trying to import an SQL dump into it |
| [14:42:33] | <tool172[m]> | i did that too |
| [14:42:35] | <tool172[m]> | it failed |
| [14:42:40] | <tool172[m]> | i'll run that again |
| [14:43:10] | <tool172[m]> | let me dump and reimport my db and set scram |
| [14:43:30] | <tool172[m]> | what is the highest suppported version of postgres right now 16 right? |
| [14:44:04] | <mstenta[m]> | I haven't tried 16 but probably works five |
| [14:44:07] | <mstenta[m]> | fine |
| [14:44:20] | <mstenta[m]> | We test against 15 I believe |
| [14:44:28] | <tool172[m]> | i'll do 15 then |
| [14:45:13] | <mstenta[m]> | Are you running postgres in Docker? |
| [14:45:20] | <tool172[m]> | yea in a stack |
| [14:45:24] | <tool172[m]> | i'll have to migrate it |
| [14:58:15] | <tool172[m]> | so i migrated the db |
| [14:58:30] | <tool172[m]> | installed the image 3.2.2 |
| [14:58:47] | <tool172[m]> | open web and "The website encountered an unexpected error/ Try again alter |
| [15:00:08] | <mstenta[m]> | Did you run update.php? |
| [15:00:23] | <mstenta[m]> | The error should show in the Docker log |
| [15:00:42] | <mstenta[m]> | But update.php is the first thing to do either way |
| [15:03:02] | <tool172[m]> | that's whre i get the erro |
| [15:03:03] | <tool172[m]> | ror |
| [15:08:31] | <mstenta[m]> | Are you able to see the specific error in the docker log? |
| [15:11:02] | <tool172[m]> | hang on i gotta kil uptime kuma |
| [15:11:05] | <tool172[m]> | it keeps scrolling me |
| [15:14:39] | <tool172[m]> | user_role enttiy type does not exist in EntityTypeManager.php line 139 no user role no session |
| [15:14:58] | <tool172[m]> | [Fri May 31 19:13:54.520433 2024] [php:notice] [pid 24] [client 192.168.224.1:43006] Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: The "user_role" entity type does not exist. in /opt/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php on line 139 #0 /opt/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/fQaGxfOndJfXoqVO...) |
| [15:16:07] | <mstenta[m]> | Huh never saw that one before 😅 |
| [15:16:14] | <mstenta[m]> | That's deep |
| [15:16:44] | <mstenta[m]> | Basically saying the user role entity (from Drupal core) doesn't exist |
| [15:16:59] | <tool172[m]> | yea and before that no session exists |
| [15:17:09] | <tool172[m]> | try modding settings.php for freeeaccess and update again? |
| [15:17:21] | <mstenta[m]> | Hmmmm yea something is not right |
| [15:17:27] | <mstenta[m]> | Very not right 😆 |
| [15:17:46] | <tool172[m]> | if i can export my assets like my cattle and my kmls and objects with revisiosn and logs i'm good |
| [15:18:05] | <mstenta[m]> | Can you try installing a fresh 3.2.2? Just to make sure that works by itself? |
| [15:18:11] | <tool172[m]> | it does |
| [15:18:15] | <tool172[m]> | i verfiied that |
| [15:18:16] | <mstenta[m]> | Take your old db out of the equation |
| [15:18:24] | <mstenta[m]> | Ok good |
| [15:18:48] | <tool172[m]> | this right now is postgres dump -> migrated to 15 then 3.22 with update.php |
| [15:19:43] | <tool172[m]> | [pid 24] [client 192.168.224.1:54210] Uncaught PHP Exception InvalidArgumentException: "No check has been registered for access_check.user.login_status" at /opt/drupal/web/core/lib/Drupal/Core/Access/CheckProvider.php line 97 |
| [15:19:45] | <tool172[m]> | thats the first error |
| [15:20:07] | <mstenta[m]> | Hmm just noticing... it says the referrer of the error above was install.php not update.php |
| [15:20:46] | <mstenta[m]> | Drupal will only direct you to install.php if it can't find the database |
| [15:21:09] | <mstenta[m]> | It doesn't think there is one, so assumes you are starting a new install |
| [15:21:25] | <tool172[m]> | so i ran update.php it had me select the db |
| [15:21:27] | <tool172[m]> | so i did |
| [15:21:29] | <mstenta[m]> | This happens if it doesn't find settings.php usually |
| [15:21:30] | <tool172[m]> | then this came up |
| [15:21:39] | <tool172[m]> | i can copy my old settings.php over |
| [15:21:42] | <tool172[m]> | its a fresh one |
| [15:21:43] | <mstenta[m]> | Update.php wont ask for a db |
| [15:21:51] | <mstenta[m]> | Oh yes you need to do that |
| [15:21:58] | <mstenta[m]> | Wait wait wai |
| [15:22:22] | <mstenta[m]> | This is too hard to follow sorry |
| [15:22:27] | <tool172[m]> | no |
| [15:22:37] | <tool172[m]> | lets do basics let me connect to db in settings.php |
| [15:22:39] | <tool172[m]> | see |
| [15:23:39] | <mstenta[m]> | Well you will also need to copy all the uploaded files from your old install too |
| [15:23:43] | <tool172[m]> | if i drop my config_sync directory would that hurt it? |
| [15:23:48] | <tool172[m]> | my settings file looks fine |
| [15:25:45] | <mstenta[m]> | Sorry tool172 this is too much to keep up with for me right now |
| [15:26:15] | <mstenta[m]> | I'm trying to help from my phone, not at my computer atm |
| [15:26:31] | <tool172[m]> | go do you. its raining here so i cant work outside |
| [15:26:49] | <mstenta[m]> | Here is what I would do (big picture): |
| [15:27:31] | <mstenta[m]> | 1. Install a fresh farmOS 3.2.2 via the Drupal installer, which will create your sites directory w/ settings.php etc |
| [15:27:45] | <mstenta[m]> | 2. Drop the db and recreate it from your db dump |
| [15:28:55] | <mstenta[m]> | 3. Copy all your other files from sites/default (except settings.php) on your old instance to the new instance (so you have all uploaded files/images in the right place) |
| [15:28:58] | <mstenta[m]> | 4. Run update.php |
| [15:29:19] | <mstenta[m]> | In a perfect world that is all that's necessary |
| [15:29:27] | <tool172[m]> | ok |
| [15:29:54] | <mstenta[m]> | (Assuming going from one "stock" farmOS version to another... customizations might throw a wrench of course) |
| [15:30:07] | <tool172[m]> | right |
| [15:30:19] | <tool172[m]> | i'll give that a whirl |
| [15:30:23] | <tool172[m]> | i haven't done that yet |
| [15:30:36] | <tool172[m]> | if not , ill manually rebuild the entities and copy the timestamps later |
| [15:31:05] | <mstenta[m]> | I'll cross my fingers for ya! 🙂🤞 |
| [16:07:03] | <tool172[m]> | thumbs up |
| [16:07:10] | <tool172[m]> | it worked the third time |
| [16:09:03] | <tool172[m]> | i had something messed up in it |
| [16:09:15] | <tool172[m]> | thanks for your help. I appreciate it |
| [16:09:44] | <tool172[m]> | project has come a long way |
| [16:29:57] | <mstenta[m]> | That's great! So glad to hear it tool172!! |