Duplicate DB name Updating to 2021.10 from 2020.03

If you have a directory located at /eaasi/portal in your backup, then just restore it as-is to your EaaSI installation directory. The installer should then migrate its content correctly.

alright~ I got the keycloak-users file to be generated!
After copying the ENTIRE backup folder, not just the eaasbackup/portal folder.

and so I logged in using the keycloak thing there. I noticed that the contents are a little strange

username,email,password
eaasi_group,eaasi@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##

several users have the same exact name.

When I log in as the eaasi_group user and the bottom-most “zfurste” user I don’t see any images saved when I go to
image
and when i go to

I think there should be some resources because when I was looking at the backup folder I found these two iso files in the objects folder:

Binary file eaas-home-backup-Oct152020/objects/Eric_MicrosoftEncarta98/iso/Encarta98_2.iso matches
Binary file eaas-home-backup-Oct152020/objects/Eric_MicrosoftEncarta98/iso/Encarta98_1.iso matches

Do I just have to recreate these or should they have been imported when doing the update?

Thanks again for all your help!

Yeah, that list of users looks strange indeed. Could you also send me the corresponding log as described earlier?

That call did not return anything

$ sudo journalctl -u eaas | grep eaasi-web-api > eaasi-web-api.log
kiritharan@eaasi-prod:~$ 

Should it be grepping for eaasi-web-api or something else for the database?

Here are also the two database calls looking at the serialized data and below is the server log.

$ sudo docker exec -it eaasi-database psql eaasi webapi -c '\dt'
                     List of relations
 Schema |               Name               | Type  | Owner  
--------+----------------------------------+-------+--------
 public | SequelizeMeta                    | table | webapi
 public | application_log                  | table | webapi
 public | bookmark                         | table | webapi
 public | eaasi_role                       | table | webapi
 public | eaasi_task                       | table | webapi
 public | emulation_project                | table | webapi
 public | emulation_project_resource       | table | webapi
 public | emulation_project_task_successor | table | webapi
 public | user_imported_content            | table | webapi
 public | user_imported_environment        | table | webapi
 public | user_imported_image              | table | webapi
 public | user_imported_software           | table | webapi
(12 rows)


$ sudo docker exec -it eaasi-database psql eaasi webapi -c 'TABLE "SequelizeMeta"'
                           name                            
-----------------------------------------------------------
 000-create-eaasiRole.js
 000-create-eaasiTask.js
 000-create-eventType.js
 000-create-language.js
 000-create-machineInterface.js
 000-create-mimeType.js
 000-create-operationType.js
 000-create-unitOfInformation.js
 000-create_country.js
 000-create_mediaType.js
 000-create_mimeType.js
 001-create-audioDevice.js
 001-create-eaasiUser.js
 002-create-colorDepth.js
 002-create-eaasiUserHash.js
 002-create-imported-software-resource.js
 003-create-bookmark.js
 003-create-chipset.js
 003-create-configNetwork.js
 003-create-frequencyUnit.js
 004-create-cpuArchitecture.js
 004-create-emulator.js
 005-create-contentObject.js
 006-create-displayDevice.js
 007-create-displayInterface.js
 007-create-displayRes.js
 008-create-fileExtension.js
 009-create-fileFormat.js
 010-create-fileSystem.js
 011-create-developer.js
 012-create-file.js
 012-create-fmtOperation.js
 013-create-gpuDevice.js
 014-create-kbLayout.js
 015-create-machineType.js
 017-create-networkDevice.js
 018-create-networkService.js
 019-create-objFileOp.js
 019-create-systemRequirements.js
 020-create-osVersion.js
 021-create-pointerDevType.js
 022-create-programLang.js
 023-create-readWriteStatus.js
 024-create-region.js
 025-create-softwareLicense.js
 026-create-softwareObject.js
 027-create-softwareProduct.js
 028-create-softwareType.js
 029-create-storageDeviceType.js
 030-create-timezone.js
 031-create-timezoneLabel.js
 032-create-userInformation.js
 034-create-softwareVersion.js
 035-create-configuredOS.js
 036-create-configSoftware.js
 036-create-processorDevice.js
 037-create-configMachine.js
 038-create_audioDevDrivSoft.js
 039-create-pointerDevice.js
 041-create-softwareEnv.js
 042-create-audioDevHasEquiv.js
 043-create-audioDevMachInterface.js
 044-create-computingEnv.js
 045-create-configAudioDev.js
 046-create-configGpuDev.js
 049-create-keyboardDevice.js
 050-create-cfgKeyboardDevice.js
 051-create-cfgGpuDevHasDispDev.js
 053-create-cfgNetworkEmulatesNetworkSvc.js
 054-create-cfgNetworkHasCfgMach.js
 056-create-cfgNetworkDevice.js
 057-create-cfgNetworkMachExpNwSvc.js
 059-create-fileExtension.js
 060-create-storageDevice.js
 061-create-fmtImplementation.js
 064-create-cfgOsHasUserInfo.js
 065-create-configuredOsLang.js
 066-create-cfgPointerDevice.js
 068-create-cfgSwHasUserInfo.js
 069-create-cfgSwUsesFmtImplementation.js
 070-create-cfgStorageDevice.js
 071-create-contentEnv.js
 072-create-osVersColorDepthSettings.js
 073-create-osVersKeyboardLangSettings.js
 073-create-osVersKeyboardLayoutSettings.js
 074-create-osVersDisplayResSettings.js
 075-create-osVersKbLayoutSettings.js
 075-create-osVersLangSettings.js
 076-create-osVersRegionSettings.js
 077-create-softwareVersLangSettings.js
 080-create-contentObjHasObjFile.js
 081-create-dispDevHasColorDepth.js
 082-create-dispDevHasDispInterface.js
 083-create-dispDevHasDriverSoftware.js
 084-create-dispDevHasDispResolution.js
 087-create-fileFmtHasFileExt.js
 089-create-gpuDevHasDispInterface.js
 090-create-gpuDevHasDriverSoftware.js
 091-create-gpuDevHasMachInterface.js
 092-create-gpuDevHasEquivalent.js
 093-create-KeybDevHasDriverSw.js
 094-create-KeybDevHasLang.js
 095-create-KeybDevHasMachInterface.js
 096-create-networkDevHasDriverSw.js
 097-create-networkDevHasMachInterface.js
 100-create-fileOperation.js
 100-create-osVerHasAltID.js
 102-create-osVerHasProgLang.js
 103-create-osVerHasSwLic.js
 104-create-osVerIncSwVer.js
 105-create-osVerIsCompatWCfgMach.js
 106-create-osVerHasTimezSet.js
 107-create-ptrDevHasDriverSw.js
 108-create-ptrDevHasMachInterface.js
 109-create-swEnvHasPartConfgSw.js
 110-create-swEnvHasDiskImage.js
 112-create-swFamVerHasPtSwVer.js
 113-create-swFamHasPtSwProd.js
 114-create-swObjIsManifestOsVer.js
 115-create-swObjHasAltId.js
 117-create-swObjHasObjFile.js
 119-create-swObjIsManifestSwVer.js
 120-create-swProdHasAltName.js
 121-create-swProdHasSwType.js
 122-create-swVerHasAltId.js
 122-create-swVerHasAltName.js
 123-create-swVerHasDev.js
 123-create-swVerHasFileOp.js
 123-create-swVerHasLangSettings.js
 123-create-swVerHasSysReq.js
 125-create-SwVerHasFmtImp.js
 126-create-SwVerHasProgLang.js
 127-create-SwVerHasSwLic.js
 127-create-SwVerIncSwVer.js
 128-create-swVerCompatCpuEnv.js
 129-create-storageDevHasDriverSw.js
 130-create-storageDevHasMachInterface.js
 131-create-sysReqIncAudioDev.js
 132-create-sysReqNetworkDev.js
 133-create-sysReqIncGpuDev.js
 134-create-sysReqProcessor.js
 136-create-sysReqInPtrDevType.js
 137-create-sysReqInSwVer.js
 138-create-sysReqIncStorageDevTyp.js
 139-create-sysReqKeyboardDev.js
 143-create-applicationLog.js
 145-create-fileOperationHasFileExt.js
 146-create-fileOperationNearestFileFmt.js
 148-create-processorDeviceHasDriverSw.js
 148-create-processorDeviceHasMachInter.js
 148-create-recommendationLevel.js
 149-create-configuredDisk.js
 150-create-configuredDiskHasPartition.js
 151-create-machineRecommendation.js
 156-create-fileFormatHasMimeType.js
 004-create-eaasiTask.js
 008-create-applicationLog.js
 20200618161213-create-emulation-project.js
 20200618161225-create-emulation-project-resource.js
 20200618161227-create-emulation-project-task-successor.js
 20211020193035-insert-default-eaasi-roles.js
 20211020201524-delete-legacy-tables.js
 20211020213045-delete-emulators.js
 20211020213740-delete-temp-environments.js
 20211020213910-delete-imported-software-resources.js
 20211021141205-update-eaasi-tasks.js
 20211022152408-rename-tables-for-imported-resources.js
 20211022160402-rename-columns-for-imported-resources.js
 20211022164522-rename-columns-for-bookmarks.js
 20211109170504-create-keycloak-users.js
(170 rows)

servermarch172022.log (552.1 KB)

@oooleg do you need any other documentation from me on this?
I am not sure where else to look to see that our old images can be accessible.

My apologies, @oooleg
There was output for that command I just was looking at this again and realized it was being written to a file, not to be printed out… My bad.
I see a couple of FetchError: invalid json response in the March 16 attempt.

eaasi-web-api.logmarch28 (96.8 KB)

Importing users has been successful according to the log, but no ownership information has been found in the database:

Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Imported 6 legacy user(s)
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Updating user-ids in table "bookmark"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Updating user-ids in table "user_imported_content"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Updating user-ids in table "user_imported_software"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Updating user-ids in table "user_imported_environment"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api      | Table "user_imported_image" not found! Skipping it.

I’m not sure, how that can be fixed now. Your backed up database seems to be incomplete or broken. Do you have any other copies?

Another problem appears to be, that the back-end failed to import legacy image-archive, because your server ran out of storage.

looking at the .sql file for the database dump i can confirm that the user imported environments are missing…

--
-- Data for Name: user_imported_environment; Type: TABLE DATA; Schema: public; Owner: eaasi_dev
--

COPY public.user_imported_environment (id, "userID", "eaasiID", "createdAt", "updatedAt") FROM stdin;
\.

there would normally be lines of data below that copy but there’s nothing.
I guess the dump is incomplete. I don’t have any other copies. I think we may just have to manually add the images that are within the objects folder here

thanks again for your help i think this issue can be closed unless you have any other suggestions :slight_smile:

Yes, the simplest solution would probably be to add specific ownership records for each resource into the user_imported_* tables manually. Just specify resource IDs as eaasiID and assign them to user IDs from Keycloak as reported by the migration under:

Mar 15 14:09:06 eaasi-prod docker-compose[1677783]: eaasi-web-api      | Importing legacy users into Keycloak...
Mar 15 14:09:07 eaasi-prod docker-compose[1677783]: eaasi-web-api      | --> User created: OLD-USER-ID -> NEW-USER-ID
...

The above snippet means, that a legacy user with ID OLD-USER-ID has been mapped to a user in Keycloak with ID NEW-USER-ID, so your tables should now use these newly allocated IDs as userID.

Also, ownership records for different resource kinds should be added to corresponding tables to work properly. Object resources are located at <eaasi-install-dir>/objects and records should be added to table user_imported_content. Images on the other hand are located at <eaasi-install-dir>/minio/data/image-archive/images and records should be added to table user_imported_image. Environments are located at <eaasi-install-dir>/minio/data/image-archive/environments and records should be added for each private environment to table user_imported_environment.