The Canadian government took action to end the lockouts affecting some of the country's largest ports on Tuesday.