No it was not. Show me any military analyst that stated Ukraine could last longer than a few weeks or months after the invasion in 2022. And after the weak response from the West in 2014, I don't see how invading Ukraine was insane on Russia's part.
It's not up to military analysts to get this right, it is up to the aggressor to know their own and their opposition's capabilities to within a reasonable degree of error before going in on something irreversible like this.
With hindsight, we can conclude it was madness. Before the war we maybe could have concluded that it would be better to err on the side of caution because of what it will do to foreign relations.