Hi. Margot is right, this could be the start of something serious, but equally it could be something very simple such as a urinary tract infection (easily treated). You won't know without going to a vet, so that's the first priority. Once you know what is happening, then you might need to sit down and have a talk with your husband about the best thing to do. But, vet first, if it were me. Weakened back legs are typical of arthritic joints that happen in old age, but again this can be treated with anti-inflammatory medication from the vet.
Tony
I am so sorry. It is so hard to watch them grow old.
You don't say that you have been to the Vet. Not sure, at this point, if you have considered that. There "may" be an underlying cause that "may" be able to be treated. Of course, there is the chance he us in kidney failure and this is the beginning if a decline.
If he is having problems getting up, he is most likely in pain and you don't say if you have him on medication for that.
You know your dog best and realize he is struggling. At 17, he has certainly lived a good, long life. It often comes down to a quality of life issue. Do we want to watch them struggle every day? Do we want them to be in pain? Sometimes, the last act of love we can do for our pets is to give them a peaceful passing.
I think you know what the best decision is.
Many of us here understand,
Hugs