Hey lovely folks!
I have been setting up the S3 Storage plugin, using it with Vultr’s S3-compatible object storage. We run in Kubernetes.
I have:
- Set up the credentials to connect in the ~/.aws/ folder
- Enabled the storage_s3 plugin
- Configured an extra storage backed in the indico.conf file
- Tested that the credentials are valid and that Indico can connect to the bucket (it can)
So far all of the above is working.
I then attempt to run the migrate copy command in a test instance with some basic events and demos, roughly like this:
indico s3 migrate copy -B indico -S indico -e '$VULTR_ENDPOINT' -p s3 test.json
This fails and I get the following output:
Error processing <RegistrationData(6, 55): None>: 'str' object has no attribute 'decode'
Processing RegistrationData (3 rows) [############------------------------] 1/3 33%
Error processing <RegistrationData(7, 55): None>: 'str' object has no attribute 'decode'
Processing RegistrationData (3 rows) [########################------------] 2/3 66%
Error processing <RegistrationData(22, 170): None>: 'str' object has no attribute 'decode'
Processing RegistrationData (3 rows) [####################################] 3/3 100%
Processing AttachmentFile (4 rows) [------------------------------------] 0/4 0%
Error processing <AttachmentFile(1, 1, [small]REDACTED.jpg, image/jpeg)>: Could not open "event/1/event/1-1-REDACTED.jpg": [Errno 2] No such file or directory: '/opt/indico/archive/event/1/event/1-1-REDACTED.jpg'
Processing AttachmentFile (4 rows) [#########---------------------------] 1/4 25%
Error processing <AttachmentFile(2, 2, [small]REDACTED.jpg, image/jpeg)>: Could not open "event/1/event/2-2-REDACTED.jpg": [Errno 2] No such file or directory: '/opt/indico/archive/event/1/event/2-2-REDACTED.jpg'
Processing AttachmentFile (4 rows) [##################------------------] 2/4 50%
Error processing <AttachmentFile(4, 4, REDACTED, image/jpeg)>: 'str' object has no attribute 'decode'
Processing AttachmentFile (4 rows) [###########################---------] 3/4 75%
Error processing <AttachmentFile(5, 5, REDACTED, image/avif)>: 'str' object has no attribute 'decode'
Processing AttachmentFile (4 rows) [####################################] 4/4 100%
All done!
Note that the redactions in the output are manual by me. Some of these attachments actually don’t exist (possibly some past failed cleanups?). The registration materials exist. After this process is completed, there are no files on the bucket either from registrations or attachments.
I am not an expert, but to me it looks like this is where it pops. I am not sure indeed why that .decode()is there, but hey, I’m an SRE, not a snake-tamer.
I noticed however that path is only taken if you don’t use rclone. So let’s use rclone, as it seems recommended anyway, and see where that gets us? I installed it, added it to the path, and set up a remote. I then tested that listing the remotes works as expected. It does.
Running the above again, with this minor change, we have:
indico s3 migrate copy -B indico -S indico -e '$VULTR_ENDPOINT' -p s3 -r s3 test.json
This fails… differently.
Processing RegistrationData (3 rows) [------------------------------------] 0/3 0%
Checking bucket indico
Error processing <RegistrationData(6, 55): None>: a bytes-like object is required, not 'str'
Processing RegistrationData (3 rows) [############------------------------] 1/3 33%
Error processing <RegistrationData(7, 55): None>: a bytes-like object is required, not 'str'
Processing RegistrationData (3 rows) [########################------------] 2/3 66%
Error processing <RegistrationData(22, 170): None>: a bytes-like object is required, not 'str'
File not found on disk: /opt/indico/archive/event/1/event/1-1-REDACTED.jpg
It then hangs indefinitely at the first file not found. In this case, I check the bucket and see that despite the errors, the 3 registration files are uploaded successfully.
Can I get some insight here? I’m quite stuck, I can create the missing files to get over the rclone issue, but it seems like a subpar approach, especially for a larger instance, and I’d prefer to resolve this cleanly.
Either way, thanks for your work ^-^