This was the case with the Gibeonites. They had deceived Israel by pretending to come from a distant land when they were really from nearby. And they suffered the consequences of that deception. Their lives were spared, which was their objective. So they did achieve their objective. But they were made servants or slaves for the rest of, not just their lives, but their peoples' lives.
So they received menial duties belonging only to the lowest classes of people. Genesis 9:25 tells us that the curse of Noah (on the children of Ham) was thus fulfilled to the letter in the case of the Hivites, the Gibeonites. Remember Hivites were the Gibeonites so that curse that was pronounced on the children of Ham for whatever that sin was that was committed against Noah, was fulfilled there. I am sure that is not the only time it was fulfilled, but it was at least carried on there. But notice verse 27 of Joshua 9 where we find the same phrase with a significant addition.