Eight people were killed when a school being used to house displaced people came under attack.