There are three separate problems that I see there. First, the people who've stayed in and made it a career are close to retirement. Second, in the middle the people are much less inclined to stay in for a career. They are getting very good experience and they go out to the private sector.
There were hiring shortages at DFAIT; they have tried to overcome those, but you have to make the career more attractive. What they get paid to do that job in the government is nowhere near what a private corporation will pay them, and they lure these people out.
The other problem is that when you put the departments of trade, commerce, and external affairs together, the pot of gold at the end of the rainbow is the ambassador's chair. Trade is a stepping stone, so you get people who want to do a little bit of trade and then shift over to the diplomatic side because they figure it's an easier track to becoming an ambassador.
That doesn't mean trade people can't become ambassadors; they can and do, and in the important posts.