1. They decided to keep their oath (16-21)
The Israelites discovered, three days after making the oath, that they had been deceived. The Gibeonites were actually living near them and should have been driven out. When the Israelites pressed forward in battle, they spared the four cities of Gibeon. The leaders didn't like this, but, they decided that keeping their oath before God was top priority. By doing so they glorified God. Though they spared their cities, they decided to make them servants for the whole assembly.
2. Falling into the merciful hands of God (22-27)
Joshua was upset. He tried to place them under a curse (23). They were made slaves in the house of God. But God blessed them. They were saved from annihilation and they served a deeply meaningful and glorious role (Ps 84:10). Mankind is ready to curse, but God is ready to bless.