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