The wine meaning came first
The word travels from Latin oculus — the eye, the bung hole of a barrel — through the Old French ouillage, the amount of wine needed to top a barrel back up. Coopers cared about it because the empty space is where the wine spoils. In a cellar, ullage is a problem to be filled.