Tuesday, 2022-01-04

ozzzo_workI need to upgrade Swift from queens to train. I'm looking at this document: https://docs.openstack.org/operations-guide/ops-upgrades.html16:40
ozzzo_workThe first sentence appears to be referring to an easier upgrade process for Swift. Where can I find that document?16:41
timburke__ozzzo_work, swift has been committed for many, many years to ensuring that upgrades can be done smoothly and with near-zero downtime. unfortunately, i don't think we've documented it very well, though -- the best write-up i recall was by notmyname ages ago: https://web.archive.org/web/20201111163653/https://www.swiftstack.com/blog/2013/12/20/upgrade-openstack-swift-no-downtime/16:53
timburke__even though it's from 2013, the process looks mostly the same today. starting in ussuri you'll be able to further reduce client impact with seamless reloads: https://opendev.org/openstack/swift/commit/1107f241716:58
timburke__the tl;dr is: upgrade storage servers first (typically object, then container, then account, if you can do it fine-grained like that), then proxies. proxies require a little more care, since you'll want to take them out of your load-balancer and wait for connections to drain before upgrading. old configs work with new code, though there may be some circumstances where you'll want to effect some config change prior to upgrading. 17:09
timburke__release notes should do a good job of calling out when and under what circumstances that may be desirable17:09
ozzzo_workthank you timburke__ !18:02
ozzzo_workthis is very helpful18:02
ozzzo_workWhat about rolling back? I'd like to test the upgrade in the lab a few times before starting on dev/qa/prod. How hard is it, to roll back versions?18:06
timburke__in a lab environment, it's probably fine -- you might need to clear out the hashes.pkl files on your object nodes or some things like that. depending on how much trouble it is to set up, you might be better rebuilding the environment on the old version, though -- there are some things (like schema migrations in the container layer) that don't really roll back18:10
timburke__definitely recommend testing your upgrade procedure a few times before doing it in prod, big +1 there ;-)18:10
opendevreviewTim Burke proposed openstack/swift master: common: Stop translating log messages  https://review.opendev.org/c/openstack/swift/+/82342318:37
opendevreviewTim Burke proposed openstack/swift master: common: Stop translating a bunch of printed messages and exceptions  https://review.opendev.org/c/openstack/swift/+/82342418:37
timburke__i tried to split that up between things that are definitely covered by https://bugs.launchpad.net/swift/+bug/1674543 and everything else. i maybe should have split that second one up even better (operator-facing vs client-facing, say) but got impatient. at any rate, i suspect we may want some discussion on the second one18:41
ozzzo_worktimburke__: : how can we work around the schema migrations? Can we save the old containers and re-use them when rolling back?19:29
timburke__ozzzo_work, trouble is you'd lose whatever updates landed between the snapshot and rollback19:34
timburke__fwiw, old code should mostly deal with new schemas fine, but (1) it's not a well-tested workflow and (2) you won't get to repeatedly test the migration for those containers19:34
ozzzo_worktimburke__: : Obviously we can't do that in dev/qa/prod but I think it would be fine in the lab;  it is only used for testing. The problem with rebuilding is that it takes a long time, so we only want to do that as a last resort20:06
ozzzo_worklooking at the rocky, stein and train release notes, I don't see any talk about database schema changes. Should I be looking elsewhere, or is it safe to assume that schema changes would be mentioned in the release notes?20:07
timburke__makes sense. fwiw, i'm usually more worried about the client impact from service restarts during an upgrade than schema changes and the like20:08
timburke__those aren't typically called out in the release notes; it's not generally something that operators need to think about20:09
ozzzo_workI guess I should assume the opposite then; there most likely are db schema changes from queens->train20:13
opendevreviewTim Burke proposed openstack/swift master: squash: Trim tempurl signature with obscuremap in the logs (CVE-2017-8761)  https://review.opendev.org/c/openstack/swift/+/82343221:30
timburke__ozzzo_work, yeah, looks like we added the shard_range table to container DBs in rocky (2.18.0, specifically)22:33

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!