Hi we’re migrating from our onPrem instance to a Cloud instance and we’re encountering problems when importing one space. The error that we get an error
Found unmapped Ids in document ‘unknown name’ (Octopus.Core.Model.Variables.TenantVariable):
Reference path: Project ‘XXXXXX’ => Tenant ‘xxxx’
We’ve archived every certificate that has expired and made sure all the tenant variables have certificates that are valid. Any help would be appreciated.
Welcome to the Octopus Community and sorry to hear you are having issues with importing into Octopus.
I have seen it before where a Tenant can’t be deleted because it is linked to an archived certificate, I am wondering whether this is happening to your instance during the import.
Are you able to look at Certificates-2-D4C63A85E7894C5D8C20D9297FEA1A43 and see if it has any archived certificates linked to that Tenant (Tenant ‘SPThin). If it does are you able to delete that tenant from the archived certificate, try the export again so you get an updated export and then try the import again?
If this doesn’t work I did find this forum post where a similar issue happened to a customer and one of our support team resolved it by manually deleting that reference from the JSON documents in the export. It might be worth giving that a read to see if you can do something similar.
Let me know the outcome of checking the archived certificates and if that doesn’t work I can help you out with trying to edit the JSON for that export.
Thank you for the quick reply, yes I found the other post but i’m not sure what to delete in my import zip file I can find the Certificates-2-D4C63A85E7894C5D8C20D9297FEA1A43 inside 28 files only the ones named TenantVariables-…json
I went through all the archived certificates inside the space and removed all roles and environment linked to it the same result after export and import however.
An example how the reference is inside a TenantVariables-… file
I am not sure what happened here but it may be that when you archived some of the certificates Octopus either has not gracefully deleted that reference or its Bento (our import/export tool) not handelling it properly.
Let me know how you get on with deleting that in all the 28 files (for just the Certificates-2-D4C63A85E7894C5D8C20D9297FEA1A43), this is just a project export so it will not mess up the original project but feel free to do a Database Backup if you are worried and want that bit of extra security.
In trying to resolve this we’ve deleted all archived expired certificate and gone throught the tenant variables trying to find any reference to those certificates. We still get the error in importing.
But if we delete everything like you suggests then that basically creates and empty file since this is the only thing inside the files.
Just jumping in for Clare as she is on our UK team and offline for the day.
It’s possible there’s a reference to this Cert ID in an unexpected JSON. Have you searched every file in that export, or just a subset? Is this something you could upload for us to tinker with on our side? Keep in mind we would have access to your sensitive variables, certs, and accounts in that project.
I have a script that can purge all of the sensitive data in that export to make it more external-use friendly that I can send you, but that script will actually put dummy data in all of your certs. We could also try using a modified version of the script to find any references to that certificate.
Please let me know if you’d like a secure upload link, or the script itself.