a.k.a. Magic Octagonal Prism, The Octagon, The Barrel
P.G. CO, circa 1980's.
(left plastic 2.2 inches, right metal ring and plastic 1.25 inches)
This is the same as Rubik's 3x3x3 Cube with the corners beveled along the vertical dimension,
and the same solution can be used.
as shown below,
it can look like a bit of a mess and,
as explained on Jaap's Page,
you may have to flip a single edge by flipping it and a beveled one,
or exchange two pieces by exchanging them and also a pair of beveled ones.