Armed forces continue to grapple with shortages in officer and other ranks