Mirrors and Snapshots unreadable after aptly upgrade
After upgrading from a locally built 0.6 version to the debian repo 0.7 version, we're receiving the following error on aptly mirror list:
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:17:58 Error decoding mirror: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
No mirrors found, create one with `aptly mirror create ...`.
And the following on aptly snapshot list:
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
2014/07/31 11:21:58 Error decoding snapshot: codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80, dec: 128
No snapshots found, create one with `aptly snapshot create...`.
We've currently rolled back to the 0.6 version and things are working, but is there any way forward for us without re-creating everything under aptly 0.7?
I've also upgraded aptly on a different server from 0.6 to 0.7 (both versions came from the debian repo) and that one worked fine. I didn't install the 0.6 version and it may have been a build of master (version reports 0.6~dev).
@bsundsrud what version of go have you been using to build 0.6~dev version? Could it be that it was go 1.1?
Looks like it was actually go 1.0, the system golang was installed via the Ubuntu Trusty repos (installed version is golang-go 2:1-5)
The release version of Trusty has golang-go 2:1.2.1 -- you might have a leftover from a Trusty beta?
Sorry, the server isn't Trusty, it's actually Precise.
Yes, precise looks more like that... let me try to reproduce that and look for the fix. Actually go1.0 has never been supported for aptly.
Yeah I noticed that. Don't spend too much time on it, I've already planned out how to do a more manual migration. This should probably be chalked up to "doing unsupported things is dangerous". I found the old checkout, it was built off of bc7972ff6 which is basically 0.5.
@bsundsrud, I tried to track the issue which looks different, but most probably is the same. aptly built using go1.1 refuses to read DB generated by aptly built with go1.2+. The problem was that internal encoding of time.Time by msgpack library changes dramatically when going from go1.1 to go1.2. I wonder how this could have worked for go1.1.
I've already raised minimum version of go to 1.2 in documentation. Binary releases of aptly have always been built with go1.2+.
Cool, thanks for the info.
Please let me know if I could help with your DB migration. I've reproduced exactly the issue you've reported. I'll try to see if I could have a fix for that.
Ok, the issue you reported is related directly to the time.Time encoding. I can try building a workaround.
The fix is there, it would go into bugfix version aptly 0.7.1. I plan to release it tomorrow.
aptly 0.7.1 has been released. @bsundsrud it should be able to read your DB without problems. You might need to do mirror update for all your mirrors to get internal date fixed, but this should be harmless.
Thanks for the quick fix, it seems to be working after a mirror update to all the mirrors.
how to do "aptly mirror update" for all mirrors when "aptly mirror list" gives only those errors and not the names of the mirrors?